
Attached an updated version of the script with inline unified diffs, and update regex. If you run the script and find other problems, send me the cs id and I'll look into it before the conversion. On Fri, Feb 10, 2017 at 7:41 AM, Berker Peksağ <berker.peksag@gmail.com> wrote:
On Fri, Feb 10, 2017 at 4:36 AM, Senthil Kumaran <senthil@uthcode.com> wrote:
On Thu, Feb 9, 2017 at 4:28 PM, Ezio Melotti <ezio.melotti@gmail.com> wrote:
No need to wait, I put together a script that shows the result of the rewriting :)
Thank you, Ezio!
I and Ezio were working on this today afternoon and agreed that if we do rewrite of various formats issue NNNN to bpo-NNNN then doing it over entire commit message gives much better experience than doing it over the first line.
We can judge this by looking at the actual output (from the script that Ezio shared).
http://orsenthil.github.io/cpython-hg-to-git/
This picked up 1000 random revisions and added some tricky corner cases that we identified and did the re-write.
Please view the output of commit logs converted here http://orsenthil.github.io/cpython-hg-to-git/ and see if it looks better than the status quo.
Thanks, Senthil and Ezio! Looks pretty good to me. I noticed some edge cases:
* -46692:46918 merged from branch aimacintyre-sf1454481 +46692:46918 merged from branch aimacintyre-bpo-1454481
It's a branch name, so it shouldn't be changed, but it actually refers to a valid issue id. This is now fixed.
* -SF bug #1012315: weakref.WeakValueDictionary should override .has_key() +SF bpo-1012315: weakref.WeakValueDictionary should override .has_key()
-Backport checkin: Fix typo (from SF bug #1086127). +Backport checkin: Fix typo (from SF bpo-1086127).
- used on BTree databases. [SF bug id 788421] + used on BTree databases. [SF bpo-788421]
Is it possible to replace 'SF bug #NNNN' with 'bpo-NNNN'?
I had intentionally left it for these cases, but thinking about it, removing SF might actually be a good idea, since it might be confusing and it's already possible to distinguish them from the id. This is now fixed.
* -SF 798269: bug fix for doctest (sf bug id: 798254 +bpo-798269: bug fix for doctest (sf bug id: 798254
'bug id NNNN' matches but not 'bug id: NNNN'.
There are a few commit messages with this structure. I thought the id was the same but at least in this case they are different (and both valid). Regardless, it was an easy fix, so I updated the regex.
* -Resolves SF bugs 697989, 697988, 697986. +Resolves SF bpo-697989, 697988, 697986.
This doesn't look like a common case and we can just ignore it :)
Yes, I didn't bother fixing this, also because it's not as trivial as the other fixes.
--Berker