verify: do not prevent verify repository containing hidden changesets stable
authorYuya Nishihara <yuya@tcha.org>
Wed, 19 Feb 2014 22:19:45 +0900
branchstable
changeset 20530 78f547cdc362
parent 20529 ca970d6acedb
child 20533 87e52e642562
child 20535 5f683209f5b6
verify: do not prevent verify repository containing hidden changesets Since a959f7167077, repo.cancopy() cannot be used to check if the repo is a bundlerepository. repo.url() should always have "scheme:", so it isn't necessary to parse by util.url().
mercurial/verify.py
tests/test-phases.t
--- a/mercurial/verify.py	Wed Feb 19 21:16:43 2014 +0900
+++ b/mercurial/verify.py	Wed Feb 19 22:19:45 2014 +0900
@@ -38,7 +38,7 @@
     mf = repo.manifest
     lrugetctx = util.lrucachefunc(repo.changectx)
 
-    if not repo.cancopy():
+    if not repo.url().startswith('file:'):
         raise util.Abort(_("cannot verify bundle or remote repos"))
 
     def err(linkrev, msg, filename=None):
--- a/tests/test-phases.t	Wed Feb 19 21:16:43 2014 +0900
+++ b/tests/test-phases.t	Wed Feb 19 22:19:45 2014 +0900
@@ -549,4 +549,13 @@
   o  0 public A
   
 
+test verify repo containing hidden changesets, which should not abort just
+because repo.cancopy() is False
 
+  $ cd ../initialrepo
+  $ hg verify
+  checking changesets
+  checking manifests
+  crosschecking files in changesets and manifests
+  checking files
+  7 files, 8 changesets, 7 total revisions