develooper Front page | perl.perl5.porters | Postings from January 2009

applying patches and upstream

Thread Next
Nicholas Clark
January 13, 2009 11:15
applying patches and upstream
Message ID:
Oops, I seem to have deleted the relevant messages I would need to reply to.

I see that Rafael tweaked Porting/ so that

    perl Porting/Maintainers --opened

would list the files that git sees as modified. I've tweaked it so that if
there are no files modified, it does something useful:

    $ perl Porting/Maintainers --opened
    (No files are modified)

rather than happening to show you the usage message. (A bug, but not showing
you anything would have been less than useful)

I've also tweaked it so that the upstream status shows in the file base
listing too. So

    $ perl Porting/Maintainers --opened
    (No files are modified)
    $ echo >> lib/
    $ perl Porting/Maintainers --opened
    lib/     [CPAN   ] CPAN andk Andreas J. Koenig <>

So here we can see that our potential change to lib/ shouldn't really
be committed - instead we should send the patch upstream to Andreas. Other
output might be:

    $ perl Porting/Maintainers --opened
    lib/    [unknown] Shell ferreira Adriano Ferreira <>
    lib/   [blead  ] Switch rgarcia Rafael Garcia-Suarez <>

ie Rafael says "commit it to blead, please", whilst we don't know what Adriano
wants yet.

As ever, if a file is not part of anything dual life we get a question mark:

    $ perl Porting/Maintainers Porting/
    Porting/ ?

However, git am doesn't seem to play nicely with the above ideas, as it makes
a local commit straight off. (On the assumption that if it breaks tests, you
can revert or amend the commit locally, before pushing).

So I added a feature. If there is a single command line argument, and it looks
like a commit, show the status for all the files modified by that. So:

    $ perl Porting/Maintainers HEAD
    Porting/ ?

because that was the last thing I committed. Not that useful here, but very
interesting after git am. Should the patch be unwound, and forwarded onwards?

To demonstrate that it works for a more interesting commit:

    $ perl Porting/Maintainers HEAD~7
    win32/Makefile  [unknown] win32 jand Jan Dubois <>
    win32/ [unknown] win32 jand Jan Dubois <>

So, hopefully now, it's really easy and fast (hence suitably lazy and
impatient) to figure out what the best thing to do with a patch is.

Um, should this get added to pod/perlrepository.pod? Anyone want to convert it
to pod and make a patch?

Nicholas Clark

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About