General requests about tickets and patches

1 view
Skip to first unread message

Mitesh Patel

unread,
Jul 20, 2010, 2:18:58 AM7/20/10
to sage-...@googlegroups.com, sage-r...@googlegroups.com
Gentle reminders:

* Please remember to include the ticket number in the first line of the
commit string of each Mercurial patch. This makes it much easier to
find the ticket for a particular changeset with 'hg log some_file.py'.

* Please remember to update ticket "Author(s)" and "Reviewer(s)". We
use Minh Nguyen's rnotes script to generate release notes from various
ticket fields:

http://bitbucket.org/mvngu/rnotes/overview

* If a ticket has a non-trivial patch history and/or dependence on
other tickets, please consider adding a note (e.g., in the description
or a post-positive-review comment) that tells the release manager which
patches/tickets to apply in which order.

Thanks!

Dan Drake

unread,
Jul 21, 2010, 3:04:31 AM7/21/10
to sage-r...@googlegroups.com
Hello from your co-release manager,

On Tue, 20 Jul 2010 at 01:18AM -0500, Mitesh Patel wrote:
> Gentle reminders:
>
> * Please remember to include the ticket number in the first line of the
> commit string of each Mercurial patch. This makes it much easier to
> find the ticket for a particular changeset with 'hg log some_file.py'.

As a corollary / addendum to this: please make sure you have the CORRECT
ticket number! I just went through the list of patches we're working on
for 4.5.2.alpha0, and found four or five in which the commit message
referred to a completely wrong ticket number. At least one was just a
simple typo (9736 instead of 9376) but one was wrong in a subtle way: it
had a long message, and was split off from an earlier ticket. The short
commit message only listed the earlier ticket, which would be very
confusing for anyone trying to match up the Mercurial history with the
trac server.

So reviewers, please check that the ticket number is present and correct
in the commit message!

Thanks,

Dan

--
--- Dan Drake
----- http://mathsci.kaist.ac.kr/~drake
-------

signature.asc

Jason Grout

unread,
Jul 21, 2010, 3:26:05 AM7/21/10
to sage-r...@googlegroups.com

Can we make the merge script automatically tag the commit message with
the correct ticket number? That avoids the human error mentioned above.
Can the merge script just prepend "Ticket #XXXX: " to the first line
of the commit message?

Thanks,

Jason

Dan Drake

unread,
Jul 21, 2010, 5:20:21 AM7/21/10
to sage-r...@googlegroups.com
On Wed, 21 Jul 2010 at 12:26AM -0700, Jason Grout wrote:
> Can we make the merge script automatically tag the commit message with
> the correct ticket number? That avoids the human error mentioned
> above. Can the merge script just prepend "Ticket #XXXX: " to the first
> line of the commit message?

That sounds like a great idea. We could even be a little smarter than
that. Here's some psuedocode:

ticket_num = ticket number given on command line
if ticket_num is not in commit message:
prepend "Ticket ticket_num:" to commit message

Something like re.match(r'\D' + ticket_num + r'\D',
known_commit_message) should correctly determine if the right ticket
number is there.

Looking through sage-apply-ticket briefly, I think we'd have to do that
by processing downloaded patch files, which could be tricky.

signature.asc

John H Palmieri

unread,
Jul 22, 2010, 12:10:32 AM7/22/10
to sage-release
I opened #9319 for this sort of issue a few weeks ago. (There is no
patch there, just a short wish list.) Feel free to add to that.

--
John

Dan Drake

unread,
Jul 22, 2010, 1:20:18 AM7/22/10
to sage-r...@googlegroups.com
On Wed, 21 Jul 2010 at 09:10PM -0700, John H Palmieri wrote:
> > That sounds like a great idea. We could even be a little smarter than
> > that. Here's some psuedocode:
> >
> >    ticket_num = ticket number given on command line
> >    if ticket_num is not in commit message:
> >        prepend "Ticket ticket_num:" to commit message
> >
> > Something like re.match(r'\D' + ticket_num + r'\D',
> > known_commit_message) should correctly determine if the right ticket
> > number is there.
> >
> > Looking through sage-apply-ticket briefly, I think we'd have to do that
> > by processing downloaded patch files, which could be tricky.
>
> I opened #9319 for this sort of issue a few weeks ago. (There is no
> patch there, just a short wish list.) Feel free to add to that.

I'm epsilon away from having some working code that automatically
prepends "ticket xxxx:" to patches with a bad commit message, and also
checks for a reasonably-formed header. I'll post any progress there.

signature.asc
Reply all
Reply to author
Forward
0 new messages