changeset 17268:8c31b652bdfe stable

largefiles: support revsets for revert Previous to this, revert only accepted revsets if the largefiles extension was disabled.
author Matt Harbison <matt_harbison@yahoo.com>
date Fri, 20 Jul 2012 18:13:19 -0400
parents 979b107eaea2
children acfab0754584
files hgext/largefiles/overrides.py tests/test-largefiles.t
diffstat 2 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/largefiles/overrides.py	Wed Jul 25 16:40:38 2012 +0900
+++ b/hgext/largefiles/overrides.py	Fri Jul 20 18:13:19 2012 -0400
@@ -567,7 +567,7 @@
                 os.unlink(repo.wjoin(lfutil.standin(lfile)))
 
         try:
-            ctx = repo[opts.get('rev')]
+            ctx = scmutil.revsingle(repo, opts.get('rev'))
             oldmatch = None # for the closure
             def overridematch(ctx, pats=[], opts={}, globbed=False,
                     default='relpath'):
--- a/tests/test-largefiles.t	Wed Jul 25 16:40:38 2012 +0900
+++ b/tests/test-largefiles.t	Fri Jul 20 18:13:19 2012 -0400
@@ -869,6 +869,8 @@
   reverting .hglf/sub2/large6 (glob)
   $ cat sub2/large6
   large6
+  $ hg revert --no-backup -C -r '.^' sub2
+  reverting .hglf/sub2/large6 (glob)
   $ hg revert --no-backup sub2
   reverting .hglf/sub2/large6 (glob)
   $ hg status