# HG changeset patch # User Pierre-Yves David # Date 1495285570 -7200 # Node ID ed566a59f66052fb17bbb07f3b1b43be84cf9be5 # Parent 931bb962e0ebfb53a73e6993628aa305098cbeec 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. diff -r 931bb962e0eb -r ed566a59f660 mercurial/repair.py --- 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) diff -r 931bb962e0eb -r ed566a59f660 tests/test-obsolete.t --- 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