Mercurial > hg
changeset 32623:ed566a59f660
strip: also backup obsmarkers
We are about to give 'strip' the ability to remove obsmarkers. Before we start
removing data we must make sure it is preserved somewhere. So the backup bundle
created by 'strip' now contains obsmarkers.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Sat, 20 May 2017 15:06:10 +0200 |
parents | 931bb962e0eb |
children | dd76646ed799 |
files | mercurial/repair.py tests/test-obsolete.t |
diffstat | 2 files changed, 12 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/repair.py Tue May 30 20:48:43 2017 -0400 +++ b/mercurial/repair.py Sat May 20 15:06:10 2017 +0200 @@ -49,7 +49,7 @@ bundletype = "HG10UN" outgoing = discovery.outgoing(repo, missingroots=bases, missingheads=heads) - contentopts = {'cg.version': cgversion} + contentopts = {'cg.version': cgversion, 'obsolescence': True} return bundle2.writenewbundle(repo.ui, repo, 'strip', name, bundletype, outgoing, contentopts, vfs, compression=comp)
--- a/tests/test-obsolete.t Tue May 30 20:48:43 2017 -0400 +++ b/tests/test-obsolete.t Sat May 20 15:06:10 2017 +0200 @@ -1184,6 +1184,17 @@ $ hg log -G --hidden @ 0:a78f55e5508c (draft) [tip ] 0 + $ hg debugbundle .hg/strip-backup/e016b03fd86f-c41c6bcc-backup.hg + Stream params: sortdict([('Compression', 'BZ')]) + changegroup -- "sortdict([('version', '02'), ('nbchanges', '4')])" + e016b03fd86fcccc54817d120b90b751aaf367d6 + e008cf2834908e5d6b0f792a9d4b0e2272260fb8 + f27abbcc1f77fb409cf9160482fe619541e2d605 + b0551702f918510f01ae838ab03a463054c67b46 + obsmarkers -- 'sortdict()' + version: 1 (139 bytes) + e008cf2834908e5d6b0f792a9d4b0e2272260fb8 b0551702f918510f01ae838ab03a463054c67b46 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + f27abbcc1f77fb409cf9160482fe619541e2d605 0 {e008cf2834908e5d6b0f792a9d4b0e2272260fb8} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} $ hg pull .hg/strip-backup/* pulling from .hg/strip-backup/e016b03fd86f-c41c6bcc-backup.hg