Patchwork [4,of,5,v3] treemanifests: fix local clone

login
register
mail settings
Submitter Martin von Zweigbergk
Date Feb. 5, 2016, 12:51 a.m.
Message ID <d4c9c950062026c21d05.1454633506@waste.org>
Download mbox | patch
Permalink /patch/12991/
State Superseded
Commit bb45190a54b754dafa66b24c2414d33401c0596e
Headers show

Comments

Martin von Zweigbergk - Feb. 5, 2016, 12:51 a.m.
# HG changeset patch
# User Martin von Zweigbergk <martinvonz@google.com>
# Date 1454463077 28800
#      Tue Feb 02 17:31:17 2016 -0800
# Node ID d4c9c950062026c21d0585097e2891057f060838
# Parent  b912213022a9c63d7e3e01c7f963f04e00b91ecf
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.

Patch

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
@@ -534,3 +534,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