Three wishes for Mercurial-Roundup integration
Hi,
When a commit message references more than one bug (with text matching #\d+), only the first gets a message for the changeset. I would like all referenced bugs to get a message.
When a bug number (#\d+) is not in the first line of the commit message, no message is sent. Is there a reason for this or is it a bug? (Note: I’m not sure about this one, I may misremember.)
To let us track the backport of changesets from cpython/packaging to distutils2, I would like the script to look at changesets in the distutils2 repo and send messages to Roundup when a bug number is detected.
Thanks in advance
Ezio prompted me to clarify something: I’m asking for votes more than code with my message. I can probably change/fix 2) and 3) myself, but I’d like feedback for 1).
On 8/31/2011 10:39 AM, Éric Araujo wrote:
- When a commit message references more than one bug (with text matching #\d+), only the first gets a message for the changeset. I would like all referenced bugs to get a message.
+1 I would have expected this to be the case already. While there is something to be said for one issue -- one patch, there are legitimate exceptions. It is possible for two different surface level behavior bugs to be fixed by one underlying code patch. Also, I would prefer one patch for multiple typos fixed at the same time.
- When a bug number (#\d+) is not in the first line of the commit message, no message is sent. Is there a reason for this or is it a bug? (Note: I’m not sure about this one, I may misremember.)
+1 I would have expected this also. While it is usually a good idea to put the issue number in the first line, I see this as a social issue rather than a technical issue. If an issue numbers on later lines is regarded as an error, then the technical fix would be to reject the patch with a message to the submitter. 'Errors should not pass silently'.
- To let us track the backport of changesets from cpython/packaging to distutils2, I would like the script to look at changesets in the distutils2 repo and send messages to Roundup when a bug number is detected.
+1 This would also help bug submitters who are using disutils2 on pre-3.3 releases to know that the fix is available to them also.
Terry Jan Reedy
Hi,
On Wed, Aug 31, 2011 at 5:39 PM, Éric Araujo <merwok@netwok.org> wrote:
Hi,
- When a commit message references more than one bug (with text matching #\d+), only the first gets a message for the changeset. I would like all referenced bugs to get a message.
I'm -0 on this. Even if it shouldn't be too difficult to implement I'm not sure it's worth doing it, since it's not something that happens often enough and when it does you usually want to explain something more to the second issue anyway. Moreover fixes should be related to a single issue.
- When a bug number (#\d+) is not in the first line of the commit message, no message is sent. Is there a reason for this or is it a bug? (Note: I’m not sure about this one, I may misremember.)
From a quick look at the code I don't see any obvious reason why this shouldn't work, if it really doesn't I guess it can be fixed. (I prefer to always write the issue number at beginning of the line though.)
- To let us track the backport of changesets from cpython/packaging to distutils2, I would like the script to look at changesets in the distutils2 repo and send messages to Roundup when a bug number is detected.
It would be useful for the devguide repo too, now that we have a 'devguide' component (and possibly for 'benchmarks' too, as you suggested on #python-dev).
Thanks in advance
Best Regards, Ezio Melotti
On Wed, Aug 31, 2011 at 8:44 PM, Ezio Melotti <ezio.melotti@gmail.com>wrote:
- When a bug number (#\d+) is not in the first line of the commit message, no message is sent. Is there a reason for this or is it a bug? (Note: I’m not sure about this one, I may misremember.)
From a quick look at the code I don't see any obvious reason why this shouldn't work, if it really doesn't I guess it can be fixed. (I prefer to always write the issue number at beginning of the line though.)
I did a small test 0 and the regex seems to match fine1 even when the issue number is on the other lines. However the log message sent to the tracker is limited to the first line only. This seems intentional ( 'commit_msg': description.splitlines()0).
Best Regards, Ezio Melotti
Am 31.08.2011 16:39, schrieb Éric Araujo:
Hi,
- When a commit message references more than one bug (with text matching #\d+), only the first gets a message for the changeset. I would like all referenced bugs to get a message.
+1. Just make sure that only issues that should be closed are closed (i.e. if the commit message is """Close #1234: better fix than proposed in #5678""", #1234 should be closed, and #5678 get a reference).
- When a bug number (#\d+) is not in the first line of the commit message, no message is sent. Is there a reason for this or is it a bug? (Note: I’m not sure about this one, I may misremember.)
I can't imagine why that would be. So if it is indeed the case, it's a bug.
- To let us track the backport of changesets from cpython/packaging to distutils2, I would like the script to look at changesets in the distutils2 repo and send messages to Roundup when a bug number is detected.
Sure. Should be a simple [hooks] entry.
Georg
On Thu, Sep 1, 2011 at 4:13 AM, Georg Brandl <g.brandl@gmx.net> wrote:
Am 31.08.2011 16:39, schrieb Éric Araujo:
Hi,
- When a commit message references more than one bug (with text matching #\d+), only the first gets a message for the changeset. I would like all referenced bugs to get a message.
+1. Just make sure that only issues that should be closed are closed (i.e. if the commit message is """Close #1234: better fix than proposed in #5678""", #1234 should be closed, and #5678 get a reference).
+1 here as well.
Cheers, Nick.
-- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia
Le 31/08/2011 20:13, Georg Brandl a écrit :
- When a commit message references more than one bug (with text matching #\d+), only the first gets a message for the changeset. I would like all referenced bugs to get a message. +1. Just make sure that only issues that should be closed are closed (i.e. if the commit message is """Close #1234: better fix than proposed in #5678""", #1234 should be closed, and #5678 get a reference).
You, Nick and Terry are +1, Ezio -1. I originally changed my mind and agreed with Ezio after discussing it on IRC, on the basis that duplicate bug should be sorted out in the tracker, but the majority here is in favor. I’ll wait a bit for other opinions.
- When a bug number (#\d+) is not in the first line of the commit message, no message is sent. Is there a reason for this or is it a bug? (Note: I’m not sure about this one, I may misremember.)
I did misremember, this works well.
- To let us track the backport of changesets from cpython/packaging to distutils2, I would like the script to look at changesets in the distutils2 repo and send messages to Roundup when a bug number is detected. Sure. Should be a simple [hooks] entry.
Changing this requires admin access to hg.python.org, doesn’t it? Can Antoine or you make the changes (benchmarks, devguide, d2)? Thanks.
Cheers
On Sat, Sep 3, 2011 at 2:53 AM, Éric Araujo <merwok@netwok.org> wrote:
Le 31/08/2011 20:13, Georg Brandl a écrit :
- When a commit message references more than one bug (with text matching #\d+), only the first gets a message for the changeset. I would like all referenced bugs to get a message. +1. Just make sure that only issues that should be closed are closed (i.e. if the commit message is """Close #1234: better fix than proposed in #5678""", #1234 should be closed, and #5678 get a reference).
You, Nick and Terry are +1, Ezio -1. I originally changed my mind and agreed with Ezio after discussing it on IRC, on the basis that duplicate bug should be sorted out in the tracker, but the majority here is in favor. I’ll wait a bit for other opinions.
Wanting this is rare enough that I don't mind doing it manually on the occasions when it happens to arises. I'd advise against spending too much effort on it if it turns out to be tricky.
The last case where it might have been helpful to me was one where a coverage patch added new tests (issue A) that picked up a bug (issue B) and I made a single commit with both the new test and the fix for the bug. I don't remember the exact details any more, but it was something along those lines.
Cheers, Nick.
-- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia
Am 02.09.2011 18:53, schrieb Éric Araujo:
- To let us track the backport of changesets from cpython/packaging to distutils2, I would like the script to look at changesets in the distutils2 repo and send messages to Roundup when a bug number is detected. Sure. Should be a simple [hooks] entry.
Changing this requires admin access to hg.python.org, doesn’t it? Can Antoine or you make the changes (benchmarks, devguide, d2)? Thanks.
This should be done; please let me know if it doesn't work as intended.
Georg
Le 03/09/2011 08:42, Georg Brandl a écrit :
Am 02.09.2011 18:53, schrieb Éric Araujo:
- To let us track the backport of changesets from cpython/packaging to distutils2, I would like the script to look at changesets in the distutils2 repo and send messages to Roundup when a bug number is detected. Sure. Should be a simple [hooks] entry.
Changing this requires admin access to hg.python.org, doesn’t it? Can Antoine or you make the changes (benchmarks, devguide, d2)? Thanks.
This should be done; please let me know if it doesn't work as intended.
This changeset: http://hg.python.org/distutils2/rev/3749fcae0dce failed to update this report: http://bugs.python.org/issue12222
On 10/06/11 16:34, Éric Araujo wrote:
Le 03/09/2011 08:42, Georg Brandl a écrit :
Am 02.09.2011 18:53, schrieb Éric Araujo:
- To let us track the backport of changesets from cpython/packaging to distutils2, I would like the script to look at changesets in the distutils2 repo and send messages to Roundup when a bug number is detected. Sure. Should be a simple [hooks] entry.
Changing this requires admin access to hg.python.org, doesn’t it? Can Antoine or you make the changes (benchmarks, devguide, d2)? Thanks.
This should be done; please let me know if it doesn't work as intended.
This changeset: http://hg.python.org/distutils2/rev/3749fcae0dce failed to update this report: http://bugs.python.org/issue12222
Did you get a "sent email to roundup" message on push?
Georg
Le 06/10/2011 19:25, Georg Brandl a écrit :
Did you get a "sent email to roundup" message on push?
Just pushed to the distutils2 repo:
remote: adding changesets remote: adding manifests remote: adding file changes remote: added 6 changesets with 13 changes to 8 files remote: Traceback (most recent call last): remote: File "/data/hg/repos/hooks/hgroundup.py", line 57, in update_issue remote: _update_issue(*args, **kwargs) remote: File "/data/hg/repos/hooks/hgroundup.py", line 69, in _update_issue remote: repourl = posixpath.join(ui.config('web', 'baseurl'), 'rev/') remote: File "/usr/lib/python2.6/posixpath.py", line 67, in join remote: elif path == '' or path.endswith('/'): remote: AttributeError: 'NoneType' object has no attribute 'endswith' remote: error: changegroup.roundup hook raised an exception: 'NoneType' object has no attribute 'endswith'
Thanks
Am 12.10.2011 18:10, schrieb Éric Araujo:
Le 06/10/2011 19:25, Georg Brandl a écrit :
Did you get a "sent email to roundup" message on push?
Just pushed to the distutils2 repo:
remote: adding changesets remote: adding manifests remote: adding file changes remote: added 6 changesets with 13 changes to 8 files remote: Traceback (most recent call last): remote: File "/data/hg/repos/hooks/hgroundup.py", line 57, in update_issue remote: _update_issue(*args, **kwargs) remote: File "/data/hg/repos/hooks/hgroundup.py", line 69, in _update_issue remote: repourl = posixpath.join(ui.config('web', 'baseurl'), 'rev/') remote: File "/usr/lib/python2.6/posixpath.py", line 67, in join remote: elif path == '' or path.endswith('/'): remote: AttributeError: 'NoneType' object has no attribute 'endswith' remote: error: changegroup.roundup hook raised an exception: 'NoneType' object has no attribute 'endswith'
OK; should be fixed now.
Georg
Le jeudi 06 octobre 2011 à 16:34 +0200, Éric Araujo a écrit :
Le 03/09/2011 08:42, Georg Brandl a écrit :
Am 02.09.2011 18:53, schrieb Éric Araujo:
- To let us track the backport of changesets from cpython/packaging to distutils2, I would like the script to look at changesets in the distutils2 repo and send messages to Roundup when a bug number is detected. Sure. Should be a simple [hooks] entry.
Changing this requires admin access to hg.python.org, doesn’t it? Can Antoine or you make the changes (benchmarks, devguide, d2)? Thanks.
This should be done; please let me know if it doesn't work as intended.
This changeset: http://hg.python.org/distutils2/rev/3749fcae0dce failed to update this report: http://bugs.python.org/issue12222
Are you sure? From here it seems to have worked fine.
Le 06/10/2011 19:29, Antoine Pitrou a écrit :
Le jeudi 06 octobre 2011 à 16:34 +0200, Éric Araujo a écrit :
This changeset: http://hg.python.org/distutils2/rev/3749fcae0dce failed to update this report: http://bugs.python.org/issue12222 Are you sure? From here it seems to have worked fine.
You can see messages created by the push to the cpython repo, but no message for the push to the distutils2 repo.
Regards
Hi,
On 02/09/2011 19.53, Éric Araujo wrote:
Le 31/08/2011 20:13, Georg Brandl a écrit :
- When a commit message references more than one bug (with text matching #\d+), only the first gets a message for the changeset. I would like all referenced bugs to get a message. +1. Just make sure that only issues that should be closed are closed (i.e. if the commit message is """Close #1234: better fix than proposed in #5678""", #1234 should be closed, and #5678 get a reference). You, Nick and Terry are +1, Ezio -1. I originally changed my mind and agreed with Ezio after discussing it on IRC, on the basis that duplicate bug should be sorted out in the tracker, but the majority here is in favor. I’ll wait a bit for other opinions.
Clearly with -1 I meant "wishes -= 1", since now even this last one should be fixed ;) (http://hg.python.org/hooks/rev/ebdd1c1c365b)
Best Regards, Ezio Melotti
participants (6)
-
Antoine Pitrou
-
Ezio Melotti
-
Georg Brandl
-
Nick Coghlan
-
Terry Reedy
-
Éric Araujo