Patchwork [10,of,10,stable] largefiles: make verify --lfa and --lfc work without --large

login
register
mail settings
Submitter Mads Kiilerich
Date Jan. 25, 2013, 5:17 a.m.
Message ID <f13013728e39adec1d02.1359091029@mk-desktop>
Download mbox | patch
Permalink /patch/731/
State Accepted
Commit 2e3ec9e6ee6e9b7c61ca178917db6f01582039bc
Headers show

Comments

Mads Kiilerich - Jan. 25, 2013, 5:17 a.m.
# HG changeset patch
# User Mads Kiilerich <madski@unity3d.com>
# Date 1359068264 -3600
# Branch stable
# Node ID f13013728e39adec1d025a41f6fbe903b8615121
# Parent  b8393fb225f2051c768d98acd11bdb531c9f95c6
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.

Patch

diff --git a/hgext/largefiles/overrides.py b/hgext/largefiles/overrides.py
--- a/hgext/largefiles/overrides.py
+++ b/hgext/largefiles/overrides.py
@@ -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
 
diff --git a/hgext/largefiles/uisetup.py b/hgext/largefiles/uisetup.py
--- a/hgext/largefiles/uisetup.py
+++ b/hgext/largefiles/uisetup.py
@@ -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',
diff --git a/tests/test-largefiles.t b/tests/test-largefiles.t
--- a/tests/test-largefiles.t
+++ b/tests/test-largefiles.t
@@ -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