On Fri, Mar 4, 2011 at 11:56 PM, Antoine Pitrou
On Fri, 04 Mar 2011 22:45:24 +0100 "Martin v. Löwis"
wrote: It's not really needed; but since it works with 6+ hex digits there might be false positives.
I searched the messages, and it turns out that primarily long numbers would give false positives:
Python 1.6a2 (#7, Apr 24 2000, 23:02:54) [GCC pgcc-2.91.66 19990314 minidom (as the proposed documentation in patch 101821 explains) does Closed as Duplicate; see bug 435026 for details. It's an the test is extended to 2000000 objects on my machine IRIX rattler 6.5 10120734 IP32 hash("DNSSEC") == 8704052292078464 [New Thread 2305843009213881680 (LWP 23166)]
So I guess mandating square brackets is reasonable - alternatively, mandating a fixed length could have worked as well, I guess.
The two forms used in hg's output are 10-digit and 40-digit ids (the latter only with --debug, IIUC). The only reason to use another form (especially shorter) is if you type the changeset id by hand rather than paste it, which must not be very common.
To me this sounds like "it is common, but this practice should be abandoned at all costs", which is not too user friendly. =) Both 10-digit ids and 40-digits ids can be autolinked provided that they have at least one hexadecimal letter. The probability of getting all digits in 10-digit sequence is less than 1%. But for manual typing I'd still prefer to have square bracket type of links. -- anatoly t.