largefiles: make verify --lfa and --lfc work without --large
authorMads Kiilerich <madski@unity3d.com>
Thu, 24 Jan 2013 23:57:44 +0100
changeset 18547 2e3ec9e6ee6e
parent 18546 fb0e8966a4be
child 18548 e71c2ff93167
largefiles: make verify --lfa and --lfc work without --large The slightly obscure --lfa and --lfc only worked as modifiers to --large and could be combined. The documentation was however not clear what they did. Instead they now imply --large and the description is updated.
hgext/largefiles/overrides.py
hgext/largefiles/uisetup.py
tests/test-largefiles.t
--- a/hgext/largefiles/overrides.py	Mon Feb 04 02:46:53 2013 +0100
+++ b/hgext/largefiles/overrides.py	Thu Jan 24 23:57:44 2013 +0100
@@ -274,7 +274,7 @@
     contents = opts.pop('lfc', False)
 
     result = orig(ui, repo, *pats, **opts)
-    if large:
+    if large or all or contents:
         result = result or lfcommands.verifylfiles(ui, repo, all, contents)
     return result
 
--- a/hgext/largefiles/uisetup.py	Mon Feb 04 02:46:53 2013 +0100
+++ b/hgext/largefiles/uisetup.py	Thu Jan 24 23:57:44 2013 +0100
@@ -52,11 +52,12 @@
     entry = extensions.wrapcommand(commands.table, 'verify',
                                    overrides.overrideverify)
 
-    verifyopt = [('', 'large', None, _('verify largefiles')),
+    verifyopt = [('', 'large', None,
+                  _('verify that all largefiles in current revision exists')),
                  ('', 'lfa', None,
-                     _('verify all revisions of largefiles not just current')),
+                  _('verify largefiles in all revisions, not just current')),
                  ('', 'lfc', None,
-                     _('verify largefile contents not just existence'))]
+                  _('verify local largefile contents, not just existence'))]
     entry[1].extend(verifyopt)
 
     entry = extensions.wrapcommand(commands.table, 'debugstate',
--- a/tests/test-largefiles.t	Mon Feb 04 02:46:53 2013 +0100
+++ b/tests/test-largefiles.t	Thu Jan 24 23:57:44 2013 +0100
@@ -1217,7 +1217,7 @@
 
 - verifying all revisions will fail because we didn't clone all largefiles to d:
   $ echo 'T-shirt' > $TESTTMP/d/.hg/largefiles/eb7338044dc27f9bc59b8dd5a246b065ead7a9c4
-  $ hg verify -q --large --lfa --lfc
+  $ hg verify -q --lfa --lfc
   changeset 0:30d30fe6a5be: large1 references missing $TESTTMP/d/.hg/largefiles/4669e532d5b2c093a78eca010077e708a071bb64
   changeset 0:30d30fe6a5be: sub/large2 references missing $TESTTMP/d/.hg/largefiles/1deebade43c8c498a3c8daddac0244dc55d1331d
   changeset 1:ce8896473775: large1 references missing $TESTTMP/d/.hg/largefiles/5f78770c0e77ba4287ad6ef3071c9bf9c379742f