Commits

Anonymous committed 38ee1db

Linkify hg changesets id before svn revisions.

  • Participants
  • Parent commits f70521a

Comments (0)

Files changed (1)

extensions/local_replace.py

 # these regexs have test in tests/test_local_replace.py
 
 substitutions = [
-    # r12345, r 12345, rev12345, rev 12345, revision12345, revision 12345
-    (re.compile(r'\b(?<![/?&;])(?P<revstr>r(ev(ision)?)?\s*)(?P<revision>\d+)'),
-     r'<a href="http://hg.python.org/lookup/r\g<revision>">\g<revstr>\g<revision></a>'),
-
     # deadbeeffeed  (hashes with exactly twelve or forty chars)
     (re.compile(r'\b(?<![/?&;])(?P<revision>[a-fA-F0-9]{40})\b'),
      r'<a href="http://hg.python.org/lookup/\g<revision>">\g<revision></a>'),
     (re.compile(r'\b(?<![/?&;])(?P<revision>[a-fA-F0-9]{12})\b'),
      r'<a href="http://hg.python.org/lookup/\g<revision>">\g<revision></a>'),
 
+    # r12345, r 12345, rev12345, rev 12345, revision12345, revision 12345
+    (re.compile(r'\b(?<![/?&;])(?P<revstr>r(ev(ision)?)?\s*)(?P<revision>\d+)'),
+     r'<a href="http://hg.python.org/lookup/r\g<revision>">\g<revstr>\g<revision></a>'),
+
     # Lib/somefile.py, Lib/somefile.py:123, Modules/somemodule.c:123, ...
     (re.compile(r'(?P<sep>(?<!\w/)|(?<!\w)/)(?P<path>(?:Demo|Doc|Grammar|'
                 r'Include|Lib|Mac|Misc|Modules|Parser|PC|PCbuild|Python|'