changeset 15740:62aa9305399d

phases: copy phases data on local clone
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Mon, 26 Dec 2011 13:47:37 +0100
parents be55285470cf
children 60344b83e442
files mercurial/store.py tests/test-phases-exchange.t
diffstat 2 files changed, 23 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/store.py	Tue Dec 27 23:56:20 2011 +0100
+++ b/mercurial/store.py	Mon Dec 26 13:47:37 2011 +0100
@@ -232,7 +232,7 @@
         mode = None
     return mode
 
-_data = 'data 00manifest.d 00manifest.i 00changelog.d 00changelog.i'
+_data = 'data 00manifest.d 00manifest.i 00changelog.d 00changelog.i phaseroots'
 
 class basicstore(object):
     '''base class for local repository stores'''
@@ -410,7 +410,7 @@
 
     def copylist(self):
         d = ('data dh fncache'
-             ' 00manifest.d 00manifest.i 00changelog.d 00changelog.i')
+             ' 00manifest.d 00manifest.i 00changelog.d 00changelog.i phaseroots')
         return (['requires', '00changelog.i'] +
                 ['store/' + f for f in d.split()])
 
--- a/tests/test-phases-exchange.t	Tue Dec 27 23:56:20 2011 +0100
+++ b/tests/test-phases-exchange.t	Mon Dec 26 13:47:37 2011 +0100
@@ -566,5 +566,26 @@
   2 0 a-C - 54acac6f23ab
   1 0 a-B - 548a3d25dbf0
   0 0 a-A - 054250a37db4
+  $ cd ..
+Test Clone behavior
 
+A. Clone without secret changeset
 
+1.  cloning non-publishing repository
+
+(Phase should be preserved°
+
+  $ hg clone -U mu Tau
+  $ hgph -R Tau
+  10 1 A-secret - 435b5d83910c
+  9 0 a-H - 967b449fbc94
+  8 0 a-F - b740e3e5c05d
+  7 0 a-E - e9f537e46dea
+  6 0 n-B - 145e75495359
+  5 0 n-A - d6bcb4f74035
+  4 0 a-D - b555f63b6063
+  3 0 a-C - 54acac6f23ab
+  2 0 b-A - f54f1bb90ff3
+  1 0 a-B - 548a3d25dbf0
+  0 0 a-A - 054250a37db4
+