1) When submitting a patch, make sure there is reasonable *commit
message* (use hg qrefresh -e to set the message). The message is
allowed to span multiple lines, but the first line should stand by
itself (this will be displayed by hg log). Also the correct(!) ticket
number should appear on the first line of the commit message. Long
lines should be wrapped.
2) Patches should be made using *hg export tip*, and not hg diff.
3) When authoring or reviewing a ticket, add your *real name* as
Author/Reviewer. Also add your name to
http://trac.sagemath.org/sage_trac/#AccountNamesmappedtoRealNames
4) Write instructions for merging the patches (which patches to apply,
which dependencies there are, URLs of spkgs) in the *ticket
description*, not only in a comment.
Thanks,
Jeroen.
Does the patch merging script not automatically do this? I thought at
one time somebody added this. Again, the patch merging script already
knows this, and if the script did it, the number would be uniformly
formatted.
Thanks,
Jason
This is not the case. It would be possible to do this automatically.
But then it's not clear how to handle the case where the commit message
already contains the ticket number. Even more difficult is the case
when the author adds a *wrong* ticket number to the commit message.
Currently, I can easily check this. Because of this, I choose not to
automatically add a ticket number to a commit message.
Jeroen.
If the script automatically prepended:
Trac #xxxx:
to the start of every commit message, then:
1. the ticket number text would be uniform
2. if a wrong ticket number was indicated, it would be obvious which was
the correct ticket number, as it's always first in the standard format
3. people would eventually get in the habit of not adding the ticket
number, and we wouldn't have to deal with inconsistent formatting of the
number, wrong ticket numbers, forgetting to add ticket numbers, etc.
Thanks,
Jason
Trac #xxxx:
to the start of every commit message, then:
1. the ticket number text would be uniform
2. if a wrong ticket number was indicated, it would be obvious which was the correct ticket number, as it's always first in the standard format
3. people would eventually get in the habit of not adding the ticket number, and we wouldn't have to deal with inconsistent formatting of the number, wrong ticket numbers, forgetting to add ticket numbers, etc.
> 2) Patches should be made using *hg export tip*, and not hg diff.
Don't forget that you need to use --git if you have touched any binary files. It may be best to add this to your .hgrc (I think this was mentioned in another thread recently).
-Ivan
Could we change the default to "git = true" as a patch to the version
of hg we distribute with Sage? Or, alternatively, have a patch that
prints a warning
whenever Sage's hg is used but git = false? The second option would
be safer, since a user might accidentally switch between using the
Sage hg and
a system-wide one...
>
> -Keshav
>
> On Mar 31, 4:00 pm, Ivan Andrus <darthand...@gmail.com> wrote:
>> On Mar 28, 2011, at 11:36 AM, Jeroen Demeyer wrote:
>>
>> > 2) Patches should be made using *hg export tip*, and not hg diff.
>>
>> Don't forget that you need to use --git if you have touched any binary files. It may be best to add this to your .hgrc (I think this was mentioned in another thread recently).
>>
>> -Ivan
>
> --
> To post to this group, send an email to sage-...@googlegroups.com
> To unsubscribe from this group, send an email to sage-devel+...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/sage-devel
> URL: http://www.sagemath.org
>
--
William Stein
Professor of Mathematics
University of Washington
http://wstein.org
Great idea! Post a ticket.
Done for sage-4.7.alpha5
Of course you get lots of silly commit messages like
Trac #11141: #11141: add PolyGUI and cygdb to SAGE_LOCAL/bin/.hgignore
Of course, temporarily the script could see if there was a ticket number
already starting the commit message, maybe a regular expression
something like (note: I haven't tested the following; it's likely that
I'm misremembering regexp syntax):
^([Tt]rac)?\w* (#)?\w*xxxx(:)?
If that is found, the script could replace it with the automated trac
number.
Thanks,
Jason
If you're able to come up with a good (Perl-style) regular expression
which does The Right Thing, then I'm happy to use it. Unfortunately,
there is currently no standard way to specify ticket numbers in the
commit message, so it's not so clear what the regular expression should do.
Jeroen.