[PATCH] Add a source_tree field to Project.

Dirk Wallenstein halsmit at t-online.de
Fri Apr 1 19:34:23 EST 2011

On Thu, Mar 31, 2011 at 06:32:33PM -0300, Guilherme Salgado wrote:
> On Wed, 2011-03-30 at 18:25 -0300, Guilherme Salgado wrote:
> > On Wed, 2011-03-30 at 12:10 +0800, Jeremy Kerr wrote:
> > > Hi Guilherme,
> > > 
> > > >  apps/patchwork/models.py                      |    1 +
> > > >  lib/sql/migration/008-project-source-tree.sql |    3 +++
> > > >  2 files changed, 4 insertions(+), 0 deletions(-)
> > > >  create mode 100644 lib/sql/migration/008-project-source-tree.sql
> > > 
> > > Looks good. I'd like to wait until there is a user of this field before 
> > > merging the change though - or are you using this for linaro-internal things?
> > 
> > I'm using it on a script I'm writing to fetch the git history of every
> > project and scan that looking for patches that have been committed. Just
> > like the existing patchwork-update-commits script does but this one is
> > fully automated, and to make it more easily testable I'm experimenting
> > with python-dulwich to scan the git history. 
> So, although I could do most things using python-dulwich it was failing
> in some cases and I just don't have the time to chase down these
> failures and fix them, so I resorted to running git on a subprocess. I'm
> still writing the script in python as that allows me to have at least
> some test coverage, which is something very valuable to me.
> This new version of the script works similarly to the previous version.
> There are a few things that need to be changed but it has some tests and
> is able to scan the qemu tree and update the status of a couple patches.
> Also note that it updates the commit_ref of a patch, which will allow us
> to generate a link to the project's gitweb once we have the commit_url
> field.
> I'd appreciate some feedback on this; specially whether or not this is
> something that's going to be useful upstream and, if so, if the current
> approach is reasonable.

I think something like that would be really really useful.

I was wondering about a way to include patches that were slightly
modified when they were applied.  The author, author date, and subject
do not change in most cases (ok, maybe the subject is extended at the
start to add a section, and maybe space and case changes). 

I think if author and author date match, and if a case insensitive
space-less version of the mail-subject is contained in the
commit-subject it is the corresponding commit.


More information about the Patchwork mailing list