Matt Mackall  committed f0bde4b

revsets: add support for 'r123' revision labels

This is controlled by an hgsubversion.nativerevs boolean (off by default).

  • Participants
  • Parent commits bdc9b21
  • Branches default

Comments (0)

Files changed (2)

File hgsubversion/

         for tunnel in ui.configlist('hgsubversion', 'tunnels'):
             hg.schemes['svn+' + tunnel] = svnrepo
+    if revset and ui.configbool('hgsubversion', 'nativerevs'):
+        extensions.wrapfunction(revset, 'stringset', util.revset_stringset)
 _old_local = hg.schemes['file']
 def _lookup(url):
     if util.islocalrepo(url):

File hgsubversion/

     'svnrev': revset_svnrev,
+def revset_stringset(orig, repo, subset, x):
+    if x.startswith('r') and x[1:].isdigit():
+        return revset_svnrev(repo, subset, ('string', x[1:]))
+    return orig
 def getfilestoresize(ui):
     """Return the replay or stupid file memory store size in megabytes or -1"""
     size = ui.configint('hgsubversion', 'filestoresize', 200)