changeset 25508:b8fd605b0c88

largefiles: ignore hidden changesets with 'verify --large --lfa' Previously, if there were any hidden changesets, the --lfa argument would cause the command to abort with a hint about using --hidden when it tripped over a hidden changeset.
author Matt Harbison <matt_harbison@yahoo.com>
date Sat, 06 Jun 2015 22:10:18 -0400
parents 5bee483705e8
children 576d6c74784b
files hgext/largefiles/lfcommands.py tests/test-lfconvert.t
diffstat 2 files changed, 10 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/largefiles/lfcommands.py	Wed Jun 10 14:49:27 2015 -0700
+++ b/hgext/largefiles/lfcommands.py	Sat Jun 06 22:10:18 2015 -0400
@@ -364,9 +364,7 @@
     matches the revision ID).  With --all, check every changeset in
     this repository.'''
     if all:
-        # Pass a list to the function rather than an iterator because we know a
-        # list will work.
-        revs = range(len(repo))
+        revs = repo.revs('all()')
     else:
         revs = ['.']
 
--- a/tests/test-lfconvert.t	Wed Jun 10 14:49:27 2015 -0700
+++ b/tests/test-lfconvert.t	Sat Jun 06 22:10:18 2015 -0400
@@ -320,13 +320,21 @@
 Verify will fail (for now) if the usercache is purged before converting, since
 largefiles are not cached in the converted repo's local store by the conversion
 process.
+  $ cd largefiles-repo-hg
+  $ cat >> .hg/hgrc <<EOF
+  > [experimental]
+  > evolution=createmarkers
+  > EOF
+  $ hg debugobsolete `hg log -r tip -T "{node}"`
+  $ cd ..
+
   $ hg -R largefiles-repo-hg verify --large --lfa
   checking changesets
   checking manifests
   crosschecking files in changesets and manifests
   checking files
   9 files, 8 changesets, 13 total revisions
-  searching 8 changesets for largefiles
+  searching 7 changesets for largefiles
   changeset 0:d4892ec57ce2: large references missing $TESTTMP/largefiles-repo-hg/.hg/largefiles/2e000fa7e85759c7f4c254d4d9c33ef481e459a7 (glob)
   changeset 1:334e5237836d: sub/maybelarge.dat references missing $TESTTMP/largefiles-repo-hg/.hg/largefiles/34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c (glob)
   changeset 2:261ad3f3f037: stuff/maybelarge.dat references missing $TESTTMP/largefiles-repo-hg/.hg/largefiles/34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c (glob)