* 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
* 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.
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
So reviewers, please check that the ticket number is present and correct
in the commit message!
--- Dan Drake
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.
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.