[PATCH 3 of 4] treemanifests: fix local clone

Martin von Zweigbergk martinvonz at google.com
Wed Feb 3 01:01:56 EST 2016


# HG changeset patch
# User Martin von Zweigbergk <martinvonz at google.com>
# Date 1454463077 28800
#      Tue Feb 02 17:31:17 2016 -0800
# Node ID 8f1c2d81ff45633457a1ba8b8f91d5bd347a0605
# Parent  40dcae5ac5a8fd677d61413f419bfd131e1f89c6
treemanifests: fix local clone

When doing a local clone with treemanifests, the .hg/store/meta/
directory currently does not get copied. To fix it, all we need to do
is to add it to the list of directories to copy.

diff --git a/mercurial/store.py b/mercurial/store.py
--- a/mercurial/store.py
+++ b/mercurial/store.py
@@ -504,7 +504,7 @@
                     raise
 
     def copylist(self):
-        d = ('data dh fncache phaseroots obsstore'
+        d = ('data meta dh fncache phaseroots obsstore'
              ' 00manifest.d 00manifest.i 00changelog.d 00changelog.i')
         return (['requires', '00changelog.i'] +
                 ['store/' + f for f in d.split()])
diff --git a/tests/test-treemanifest.t b/tests/test-treemanifest.t
--- a/tests/test-treemanifest.t
+++ b/tests/test-treemanifest.t
@@ -539,3 +539,13 @@
   [255]
   $ grep treemanifest repo-ancient/.hg/requires
   [1]
+
+Local clone works
+
+  $ hg clone -U deeprepo local-clone
+  $ hg -R local-clone verify
+  checking changesets
+  checking manifests
+  crosschecking files in changesets and manifests
+  checking files
+  8 files, 3 changesets, 10 total revisions


More information about the Mercurial-devel mailing list