<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Mon, 5 Dec 2016 at 04:14 Antoine Pitrou <<a href="mailto:solipsis@pitrou.net">solipsis@pitrou.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Sun, 04 Dec 2016 00:40:49 +0000<br class="gmail_msg">
Brett Cannon <<a href="mailto:brett@snarky.ca" class="gmail_msg" target="_blank">brett@snarky.ca</a>> wrote:<br class="gmail_msg">
> - I got the code for <a href="http://hg.python.org/hglookup" rel="noreferrer" class="gmail_msg" target="_blank">hg.python.org/hglookup</a><br class="gmail_msg">
> - Asking if there's any reason I can't post it publicly<br class="gmail_msg">
<br class="gmail_msg">
None than I can think of.<br class="gmail_msg">
<br class="gmail_msg">
> - Need to figure out the best way to extract all commit IDs from a<br class="gmail_msg">
> Mercurial repository<br class="gmail_msg">
<br class="gmail_msg">
Probably iterate over all entries in the revlog and inspect the "extra"<br class="gmail_msg">
field as is done in hglookup? That way you can build a static mapping<br class="gmail_msg">
of SVN rev -> hg changeset ID, and save it e.g. to a file.<br class="gmail_msg">
<br class="gmail_msg">
> - Need to update the code to use the commit IDs (both 12 and 40<br class="gmail_msg">
> character lengths) for linking to hg commits<br class="gmail_msg">
> - Need to update the code to accept 10 or longer hashes from git<br class="gmail_msg">
> (default used to be 7, but git 2.11 now calculates the shortest,<br class="gmail_msg">
> unamibiguous hash and CPython is big enough to need 10 characters)<br class="gmail_msg">
<br class="gmail_msg">
I'm not sure I understand those two points, but that probably doesn't<br class="gmail_msg">
matter.<br class="gmail_msg"></blockquote><div><br></div><div><a href="http://hg.python.org/lookup">hg.python.org/lookup</a> says any hexadecimal number that is 12 or 40 digits is an hg commit ID, but git uses 10 or 40 digits for our repo for a commit hash. The 10 digit and 12 digit lengths don't clash but the 40 digit one does.</div></div></div>