[Tracker-discuss] [issue610] Hyperlink git hashes of 10 or 11 characters

2016-12-25 Thread Ezio Melotti

Ezio Melotti added the comment:

Done in https://hg.python.org/tracker/python-dev/rev/18a7bc95ec31
Thanks for the patch!

--
assignedto:  -> ezio.melotti
status: chatting -> resolved

___
PSF Meta Tracker 

___
___
Tracker-discuss mailing list
Tracker-discuss@python.org
https://mail.python.org/mailman/listinfo/tracker-discuss
Code of Conduct: https://www.python.org/psf/codeofconduct/


[Tracker-discuss] [issue610] Hyperlink git hashes of 10 or 11 characters

2016-12-24 Thread Brett C.
Brett C. added the comment:

Here is the patch with tests (not actually run, though, since I don't have the 
DB setup).

___
PSF Meta Tracker 
<http://psf.upfronthosting.co.za/roundup/meta/issue610>
___
diff -r 1b16b4c8ab77 extensions/local_replace.py
--- a/extensions/local_replace.py   Fri Dec 02 01:21:29 2016 +0200
+++ b/extensions/local_replace.py   Sat Dec 24 09:32:31 2016 -0800
@@ -74,10 +74,11 @@
 
 seps = r'\b(?[a-fA-F0-9]{40})\b' % seps),
+# deadbeeffeed  (hg hashes with exactly twelve or forty chars,
+# git has 10 or more as it grows as time goes on)
+(re.compile(r'%s(?P(git|hg)?[a-fA-F0-9]{40})\b' % seps),
  r'http://hg.python.org/lookup/\g">\g'),
-(re.compile(r'%s(?P[a-fA-F0-9]{12})\b' % seps),
+(re.compile(r'%s(?P(git|hg)?[a-fA-F0-9]{10,12})\b' % seps),
  r'http://hg.python.org/lookup/\g">\g'),
 
 # r12345, r 12345, rev12345, rev. 12345, revision12345, revision 12345
diff -r 1b16b4c8ab77 extensions/test/local_replace_data.txt
--- a/extensions/test/local_replace_data.txtFri Dec 02 01:21:29 2016 +0200
+++ b/extensions/test/local_replace_data.txtSat Dec 24 09:32:31 2016 -0800
@@ -28,6 +28,28 @@
 ## hg revisions
 
http://code.google.com/p/spyderlib/source/detail?spec=svne5d86b685619a470d593aa5f9ee360ba60779bc1&r=323c6c697f045166e384cdc15803d40eebed0a2b
 http://code.google.com/p/spyderlib/source/detail?spec=svne5d86b685619a470d593aa5f9ee360ba60779bc1&r=323c6c697f045166e384cdc15803d40eebed0a2b";>http://code.google.com/p/spyderlib/source/detail?spec=svne5d86b685619a470d593aa5f9ee360ba60779bc1&r=323c6c697f045166e384cdc15803d40eebed0a2b
+41a99a2a7198
+http://hg.python.org/lookup/41a99a2a7198";>41a99a2a7198
+hg41a99a2a7198
+http://hg.python.org/lookup/hg41a99a2a7198";>hg41a99a2a7198
+41a99a2a7198e85c21643a5f1fdb598f07f11f9d
+http://hg.python.org/lookup/41a99a2a7198e85c21643a5f1fdb598f07f11f9d";>41a99a2a7198e85c21643a5f1fdb598f07f11f9d
+hg41a99a2a7198e85c21643a5f1fdb598f07f11f9d
+http://hg.python.org/lookup/hg41a99a2a7198e85c21643a5f1fdb598f07f11f9d";>hg41a99a2a7198e85c21643a5f1fdb598f07f11f9d
+##
+## git revisions
+4581b90a75
+http://hg.python.org/lookup/4581b90a75";>4581b90a75
+git4581b90a75
+http://hg.python.org/lookup/git4581b90a75";>git4581b90a75
+4581b90a75f
+http://hg.python.org/lookup/4581b90a75f";>4581b90a75f
+git4581b90a75f
+http://hg.python.org/lookup/git4581b90a75f";>git4581b90a75f
+4581b90a75f185df5f94af476cfc7e778fd11a24
+http://hg.python.org/lookup/4581b90a75f185df5f94af476cfc7e778fd11a24";>4581b90a75f185df5f94af476cfc7e778fd11a24
+git4581b90a75f185df5f94af476cfc7e778fd11a24
+http://hg.python.org/lookup/git4581b90a75f185df5f94af476cfc7e778fd11a24";>git4581b90a75f185df5f94af476cfc7e778fd11a24
 ##
 ## issues - the lowest issue id on 

[Tracker-discuss] [issue610] Hyperlink git hashes of 10 or 11 characters

2016-12-22 Thread Ezio Melotti

Ezio Melotti added the comment:

I'm +0.5 on the prefix idea -- by default it should work without prefix (both 
for backward compatibility and because most people will copy/paste CSIDs 
without bothering adding the prefix).  It could be still useful in case people 
want to explicitly disambiguate or to be used by bots though.
A few tests should be added in test_local_replace.py, otherwise the patch LGTM.

___
PSF Meta Tracker 

___
___
Tracker-discuss mailing list
Tracker-discuss@python.org
https://mail.python.org/mailman/listinfo/tracker-discuss
Code of Conduct: https://www.python.org/psf/codeofconduct/


[Tracker-discuss] [issue610] Hyperlink git hashes of 10 or 11 characters

2016-12-22 Thread Maciej Szulik

Maciej Szulik added the comment:

Still LGTM.

___
PSF Meta Tracker 

___
___
Tracker-discuss mailing list
Tracker-discuss@python.org
https://mail.python.org/mailman/listinfo/tracker-discuss
Code of Conduct: https://www.python.org/psf/codeofconduct/


[Tracker-discuss] [issue610] Hyperlink git hashes of 10 or 11 characters

2016-12-22 Thread Brett C.
Brett C. added the comment:

I went ahead and implemented the idea of hg or git prefixes on the commit 
numbers.

___
PSF Meta Tracker 
<http://psf.upfronthosting.co.za/roundup/meta/issue610>
___
diff -r 1b16b4c8ab77 extensions/local_replace.py
--- a/extensions/local_replace.py   Fri Dec 02 01:21:29 2016 +0200
+++ b/extensions/local_replace.py   Thu Dec 22 10:54:37 2016 -0800
@@ -74,10 +74,11 @@
 
 seps = r'\b(?[a-fA-F0-9]{40})\b' % seps),
+# deadbeeffeed  (hg hashes with exactly twelve or forty chars,
+# git has 10 or more as it grows as time goes on)
+(re.compile(r'%s(?P(git|hg)?[a-fA-F0-9]{40})\b' % seps),
  r'http://hg.python.org/lookup/\g">\g'),
-(re.compile(r'%s(?P[a-fA-F0-9]{12})\b' % seps),
+(re.compile(r'%s(?P(git|hg)?[a-fA-F0-9]{10,12})\b' % seps),
  r'http://hg.python.org/lookup/\g">\g'),
 
 # r12345, r 12345, rev12345, rev. 12345, revision12345, revision 12345
___
Tracker-discuss mailing list
Tracker-discuss@python.org
https://mail.python.org/mailman/listinfo/tracker-discuss
Code of Conduct: https://www.python.org/psf/codeofconduct/

[Tracker-discuss] [issue610] Hyperlink git hashes of 10 or 11 characters

2016-12-22 Thread Brett C.

Brett C. added the comment:

Do people think it would be worth adding prefix support? E.g. 
/lookup/git1234567890 so as to help future-proof number collisions and 
ambiguity? We could also add "hg" prefix support (svn already has "r").

___
PSF Meta Tracker 

___
___
Tracker-discuss mailing list
Tracker-discuss@python.org
https://mail.python.org/mailman/listinfo/tracker-discuss
Code of Conduct: https://www.python.org/psf/codeofconduct/


[Tracker-discuss] [issue610] Hyperlink git hashes of 10 or 11 characters

2016-12-22 Thread Maciej Szulik

Maciej Szulik added the comment:

SGTM

___
PSF Meta Tracker 

___
___
Tracker-discuss mailing list
Tracker-discuss@python.org
https://mail.python.org/mailman/listinfo/tracker-discuss
Code of Conduct: https://www.python.org/psf/codeofconduct/


[Tracker-discuss] [issue610] Hyperlink git hashes of 10 or 11 characters

2016-12-21 Thread Berker Peksag

Berker Peksag added the comment:

Looks good to me too. I can do the merging if David or Ezio are busy.

--
nosy: +berker.peksag

___
PSF Meta Tracker 

___
___
Tracker-discuss mailing list
Tracker-discuss@python.org
https://mail.python.org/mailman/listinfo/tracker-discuss
Code of Conduct: https://www.python.org/psf/codeofconduct/


[Tracker-discuss] [issue610] Hyperlink git hashes of 10 or 11 characters

2016-12-21 Thread Maciej Szulik

Maciej Szulik added the comment:

LGTM, Ezio or David mind merging this?

--
nosy: +ezio.melotti, maciej.szulik, r.david.murray
status: unread -> chatting

___
PSF Meta Tracker 

___
___
Tracker-discuss mailing list
Tracker-discuss@python.org
https://mail.python.org/mailman/listinfo/tracker-discuss
Code of Conduct: https://www.python.org/psf/codeofconduct/


[Tracker-discuss] [issue610] Hyperlink git hashes of 10 or 11 characters

2016-12-19 Thread Brett C.

New submission from Brett C.:

The GitHub mirror is currently at length 10, but git will grow the minimum 
length as necessary to guarantee uniqueness, so might as well support 11 
characters now.

--
messages: 3211
nosy: brett.cannon
priority: feature
status: unread
title: Hyperlink git hashes of 10 or 11 characters

___
PSF Meta Tracker 

___
___
Tracker-discuss mailing list
Tracker-discuss@python.org
https://mail.python.org/mailman/listinfo/tracker-discuss
Code of Conduct: https://www.python.org/psf/codeofconduct/