Mercurial > hg-stable
changeset 17249:7d4747c711a9 stable
clone: copy obsolete markers during local clone
This change adds `obsstore` to the list of files copied by local clone,
until now changesets were copied without their obsolete markers.
Note: extinct changesets were and are still included by such clones to
enable hardlinking. There is no obvious reason to prevent their exchange
here.
Rebased by Patrick Mezard <patrick@mezard.eu>
author | Pierre-Yves.David@ens-lyon.org |
---|---|
date | Wed, 25 Jul 2012 19:02:35 +0200 |
parents | 6ffb35b2284c |
children | 18f935b4c05a |
files | mercurial/store.py tests/test-obsolete.t |
diffstat | 2 files changed, 50 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/store.py Wed Jul 25 19:34:31 2012 +0200 +++ b/mercurial/store.py Wed Jul 25 19:02:35 2012 +0200 @@ -232,7 +232,8 @@ mode = None return mode -_data = 'data 00manifest.d 00manifest.i 00changelog.d 00changelog.i phaseroots' +_data = ('data 00manifest.d 00manifest.i 00changelog.d 00changelog.i' + ' phaseroots obsstore') class basicstore(object): '''base class for local repository stores''' @@ -411,7 +412,7 @@ self.fncache.rewrite(existing) def copylist(self): - d = ('data dh fncache phaseroots' + d = ('data dh fncache phaseroots obsstore' ' 00manifest.d 00manifest.i 00changelog.d 00changelog.i') return (['requires', '00changelog.i'] + ['store/' + f for f in d.split()])
--- a/tests/test-obsolete.t Wed Jul 25 19:34:31 2012 +0200 +++ b/tests/test-obsolete.t Wed Jul 25 19:02:35 2012 +0200 @@ -178,6 +178,53 @@ ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 {'date': '1338 0', 'user': 'test'} 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 {'date': '1339 0', 'user': 'test'} +clone support +(markers are copied and extinct changesets are included to allow hardlinks) + + $ hg clone tmpb clone-dest + updating to branch default + 3 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ hg -R clone-dest log -G --hidden + @ changeset: 5:5601fb93a350 + | tag: tip + | parent: 1:7c3bad9141dc + | user: test + | date: Thu Jan 01 00:00:00 1970 +0000 + | summary: add new_3_c + | + | x changeset: 4:ca819180edb9 + |/ parent: 1:7c3bad9141dc + | user: test + | date: Thu Jan 01 00:00:00 1970 +0000 + | summary: add new_2_c + | + | x changeset: 3:cdbce2fbb163 + |/ parent: 1:7c3bad9141dc + | user: test + | date: Thu Jan 01 00:00:00 1970 +0000 + | summary: add new_c + | + | o changeset: 2:245bde4270cd + |/ user: test + | date: Thu Jan 01 00:00:00 1970 +0000 + | summary: add original_c + | + o changeset: 1:7c3bad9141dc + | user: test + | date: Thu Jan 01 00:00:00 1970 +0000 + | summary: add b + | + o changeset: 0:1f0dee641bb7 + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: add a + + $ hg -R clone-dest debugobsolete + 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f 0 {'date': '56 12', 'user': 'test'} + cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 {'date': '1337 0', 'user': 'test'} + ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 {'date': '1338 0', 'user': 'test'} + 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 {'date': '1339 0', 'user': 'test'} + Destination repo have existing data ---------------------------------------