##// END OF EJS Templates
merge with stable
Augie Fackler -
r46087:93a0f3ba merge default
parent child Browse files
Show More
@@ -1,287 +1,287 b''
1 """strip changesets and their descendants from history
1 """strip changesets and their descendants from history
2
2
3 This extension allows you to strip changesets and all their descendants from the
3 This extension allows you to strip changesets and all their descendants from the
4 repository. See the command help for details.
4 repository. See the command help for details.
5 """
5 """
6 from __future__ import absolute_import
6 from __future__ import absolute_import
7
7
8 from mercurial.i18n import _
8 from mercurial.i18n import _
9 from mercurial.pycompat import getattr
9 from mercurial.pycompat import getattr
10 from mercurial import (
10 from mercurial import (
11 bookmarks as bookmarksmod,
11 bookmarks as bookmarksmod,
12 cmdutil,
12 cmdutil,
13 error,
13 error,
14 hg,
14 hg,
15 lock as lockmod,
15 lock as lockmod,
16 mergestate as mergestatemod,
16 mergestate as mergestatemod,
17 node as nodemod,
17 node as nodemod,
18 pycompat,
18 pycompat,
19 registrar,
19 registrar,
20 repair,
20 repair,
21 scmutil,
21 scmutil,
22 util,
22 util,
23 )
23 )
24
24
25 nullid = nodemod.nullid
25 nullid = nodemod.nullid
26 release = lockmod.release
26 release = lockmod.release
27
27
28 cmdtable = {}
28 cmdtable = {}
29 command = registrar.command(cmdtable)
29 command = registrar.command(cmdtable)
30 # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for
30 # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for
31 # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should
31 # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should
32 # be specifying the version(s) of Mercurial they are tested with, or
32 # be specifying the version(s) of Mercurial they are tested with, or
33 # leave the attribute unspecified.
33 # leave the attribute unspecified.
34 testedwith = b'ships-with-hg-core'
34 testedwith = b'ships-with-hg-core'
35
35
36
36
37 def checklocalchanges(repo, force=False):
37 def checklocalchanges(repo, force=False):
38 s = repo.status()
38 s = repo.status()
39 if not force:
39 if not force:
40 cmdutil.checkunfinished(repo)
40 cmdutil.checkunfinished(repo)
41 cmdutil.bailifchanged(repo)
41 cmdutil.bailifchanged(repo)
42 else:
42 else:
43 cmdutil.checkunfinished(repo, skipmerge=True)
43 cmdutil.checkunfinished(repo, skipmerge=True)
44 return s
44 return s
45
45
46
46
47 def _findupdatetarget(repo, nodes):
47 def _findupdatetarget(repo, nodes):
48 unode, p2 = repo.changelog.parents(nodes[0])
48 unode, p2 = repo.changelog.parents(nodes[0])
49 currentbranch = repo[None].branch()
49 currentbranch = repo[None].branch()
50
50
51 if (
51 if (
52 util.safehasattr(repo, b'mq')
52 util.safehasattr(repo, b'mq')
53 and p2 != nullid
53 and p2 != nullid
54 and p2 in [x.node for x in repo.mq.applied]
54 and p2 in [x.node for x in repo.mq.applied]
55 ):
55 ):
56 unode = p2
56 unode = p2
57 elif currentbranch != repo[unode].branch():
57 elif currentbranch != repo[unode].branch():
58 pwdir = b'parents(wdir())'
58 pwdir = b'parents(wdir())'
59 revset = b'max(((parents(%ln::%r) + %r) - %ln::%r) and branch(%s))'
59 revset = b'max(((parents(%ln::%r) + %r) - %ln::%r) and branch(%s))'
60 branchtarget = repo.revs(
60 branchtarget = repo.revs(
61 revset, nodes, pwdir, pwdir, nodes, pwdir, currentbranch
61 revset, nodes, pwdir, pwdir, nodes, pwdir, currentbranch
62 )
62 )
63 if branchtarget:
63 if branchtarget:
64 cl = repo.changelog
64 cl = repo.changelog
65 unode = cl.node(branchtarget.first())
65 unode = cl.node(branchtarget.first())
66
66
67 return unode
67 return unode
68
68
69
69
70 def strip(
70 def strip(
71 ui,
71 ui,
72 repo,
72 repo,
73 revs,
73 revs,
74 update=True,
74 update=True,
75 backup=True,
75 backup=True,
76 force=None,
76 force=None,
77 bookmarks=None,
77 bookmarks=None,
78 soft=False,
78 soft=False,
79 ):
79 ):
80 with repo.wlock(), repo.lock():
80 with repo.wlock(), repo.lock():
81
81
82 if update:
82 if update:
83 checklocalchanges(repo, force=force)
83 checklocalchanges(repo, force=force)
84 urev = _findupdatetarget(repo, revs)
84 urev = _findupdatetarget(repo, revs)
85 hg.clean(repo, urev)
85 hg.clean(repo, urev)
86 repo.dirstate.write(repo.currenttransaction())
86 repo.dirstate.write(repo.currenttransaction())
87
87
88 if soft:
88 if soft:
89 repair.softstrip(ui, repo, revs, backup)
89 repair.softstrip(ui, repo, revs, backup)
90 else:
90 else:
91 repair.strip(ui, repo, revs, backup)
91 repair.strip(ui, repo, revs, backup)
92
92
93 repomarks = repo._bookmarks
93 repomarks = repo._bookmarks
94 if bookmarks:
94 if bookmarks:
95 with repo.transaction(b'strip') as tr:
95 with repo.transaction(b'strip') as tr:
96 if repo._activebookmark in bookmarks:
96 if repo._activebookmark in bookmarks:
97 bookmarksmod.deactivate(repo)
97 bookmarksmod.deactivate(repo)
98 repomarks.applychanges(repo, tr, [(b, None) for b in bookmarks])
98 repomarks.applychanges(repo, tr, [(b, None) for b in bookmarks])
99 for bookmark in sorted(bookmarks):
99 for bookmark in sorted(bookmarks):
100 ui.write(_(b"bookmark '%s' deleted\n") % bookmark)
100 ui.write(_(b"bookmark '%s' deleted\n") % bookmark)
101
101
102
102
103 @command(
103 @command(
104 b"strip",
104 b"strip",
105 [
105 [
106 (
106 (
107 b'r',
107 b'r',
108 b'rev',
108 b'rev',
109 [],
109 [],
110 _(
110 _(
111 b'strip specified revision (optional, '
111 b'strip specified revision (optional, '
112 b'can specify revisions without this '
112 b'can specify revisions without this '
113 b'option)'
113 b'option)'
114 ),
114 ),
115 _(b'REV'),
115 _(b'REV'),
116 ),
116 ),
117 (
117 (
118 b'f',
118 b'f',
119 b'force',
119 b'force',
120 None,
120 None,
121 _(
121 _(
122 b'force removal of changesets, discard '
122 b'force removal of changesets, discard '
123 b'uncommitted changes (no backup)'
123 b'uncommitted changes (no backup)'
124 ),
124 ),
125 ),
125 ),
126 (b'', b'no-backup', None, _(b'do not save backup bundle')),
126 (b'', b'no-backup', None, _(b'do not save backup bundle')),
127 (b'', b'nobackup', None, _(b'do not save backup bundle (DEPRECATED)'),),
127 (b'', b'nobackup', None, _(b'do not save backup bundle (DEPRECATED)'),),
128 (b'n', b'', None, _(b'ignored (DEPRECATED)')),
128 (b'n', b'', None, _(b'ignored (DEPRECATED)')),
129 (
129 (
130 b'k',
130 b'k',
131 b'keep',
131 b'keep',
132 None,
132 None,
133 _(b"do not modify working directory during strip"),
133 _(b"do not modify working directory during strip"),
134 ),
134 ),
135 (
135 (
136 b'B',
136 b'B',
137 b'bookmark',
137 b'bookmark',
138 [],
138 [],
139 _(b"remove revs only reachable from given bookmark"),
139 _(b"remove revs only reachable from given bookmark"),
140 _(b'BOOKMARK'),
140 _(b'BOOKMARK'),
141 ),
141 ),
142 (
142 (
143 b'',
143 b'',
144 b'soft',
144 b'soft',
145 None,
145 None,
146 _(b"simply drop changesets from visible history (EXPERIMENTAL)"),
146 _(b"simply drop changesets from visible history (EXPERIMENTAL)"),
147 ),
147 ),
148 ],
148 ],
149 _(b'hg strip [-k] [-f] [-B bookmark] [-r] REV...'),
149 _(b'hg strip [-k] [-f] [-B bookmark] [-r] REV...'),
150 helpcategory=command.CATEGORY_MAINTENANCE,
150 helpcategory=command.CATEGORY_MAINTENANCE,
151 )
151 )
152 def stripcmd(ui, repo, *revs, **opts):
152 def stripcmd(ui, repo, *revs, **opts):
153 """strip changesets and all their descendants from the repository
153 """strip changesets and all their descendants from the repository
154
154
155 The strip command removes the specified changesets and all their
155 The strip command removes the specified changesets and all their
156 descendants. If the working directory has uncommitted changes, the
156 descendants. If the working directory has uncommitted changes, the
157 operation is aborted unless the --force flag is supplied, in which
157 operation is aborted unless the --force flag is supplied, in which
158 case changes will be discarded.
158 case changes will be discarded.
159
159
160 If a parent of the working directory is stripped, then the working
160 If a parent of the working directory is stripped, then the working
161 directory will automatically be updated to the most recent
161 directory will automatically be updated to the most recent
162 available ancestor of the stripped parent after the operation
162 available ancestor of the stripped parent after the operation
163 completes.
163 completes.
164
164
165 Any stripped changesets are stored in ``.hg/strip-backup`` as a
165 Any stripped changesets are stored in ``.hg/strip-backup`` as a
166 bundle (see :hg:`help bundle` and :hg:`help unbundle`). They can
166 bundle (see :hg:`help bundle` and :hg:`help unbundle`). They can
167 be restored by running :hg:`unbundle .hg/strip-backup/BUNDLE`,
167 be restored by running :hg:`unbundle .hg/strip-backup/BUNDLE`,
168 where BUNDLE is the bundle file created by the strip. Note that
168 where BUNDLE is the bundle file created by the strip. Note that
169 the local revision numbers will in general be different after the
169 the local revision numbers will in general be different after the
170 restore.
170 restore.
171
171
172 Use the --no-backup option to discard the backup bundle once the
172 Use the --no-backup option to discard the backup bundle once the
173 operation completes.
173 operation completes.
174
174
175 Strip is not a history-rewriting operation and can be used on
175 Strip is not a history-rewriting operation and can be used on
176 changesets in the public phase. But if the stripped changesets have
176 changesets in the public phase. But if the stripped changesets have
177 been pushed to a remote repository you will likely pull them again.
177 been pushed to a remote repository you will likely pull them again.
178
178
179 Return 0 on success.
179 Return 0 on success.
180 """
180 """
181 opts = pycompat.byteskwargs(opts)
181 opts = pycompat.byteskwargs(opts)
182 backup = True
182 backup = True
183 if opts.get(b'no_backup') or opts.get(b'nobackup'):
183 if opts.get(b'no_backup') or opts.get(b'nobackup'):
184 backup = False
184 backup = False
185
185
186 cl = repo.changelog
186 cl = repo.changelog
187 revs = list(revs) + opts.get(b'rev')
187 revs = list(revs) + opts.get(b'rev')
188 revs = set(scmutil.revrange(repo, revs))
188 revs = set(scmutil.revrange(repo, revs))
189
189
190 with repo.wlock():
190 with repo.wlock():
191 bookmarks = set(opts.get(b'bookmark'))
191 bookmarks = set(opts.get(b'bookmark'))
192 if bookmarks:
192 if bookmarks:
193 repomarks = repo._bookmarks
193 repomarks = repo._bookmarks
194 if not bookmarks.issubset(repomarks):
194 if not bookmarks.issubset(repomarks):
195 raise error.Abort(
195 raise error.Abort(
196 _(b"bookmark '%s' not found")
196 _(b"bookmark '%s' not found")
197 % b','.join(sorted(bookmarks - set(repomarks.keys())))
197 % b','.join(sorted(bookmarks - set(repomarks.keys())))
198 )
198 )
199
199
200 # If the requested bookmark is not the only one pointing to a
200 # If the requested bookmark is not the only one pointing to a
201 # a revision we have to only delete the bookmark and not strip
201 # a revision we have to only delete the bookmark and not strip
202 # anything. revsets cannot detect that case.
202 # anything. revsets cannot detect that case.
203 nodetobookmarks = {}
203 nodetobookmarks = {}
204 for mark, node in pycompat.iteritems(repomarks):
204 for mark, node in pycompat.iteritems(repomarks):
205 nodetobookmarks.setdefault(node, []).append(mark)
205 nodetobookmarks.setdefault(node, []).append(mark)
206 for marks in nodetobookmarks.values():
206 for marks in nodetobookmarks.values():
207 if bookmarks.issuperset(marks):
207 if bookmarks.issuperset(marks):
208 rsrevs = scmutil.bookmarkrevs(repo, marks[0])
208 rsrevs = scmutil.bookmarkrevs(repo, marks[0])
209 revs.update(set(rsrevs))
209 revs.update(set(rsrevs))
210 if not revs:
210 if not revs:
211 with repo.lock(), repo.transaction(b'bookmark') as tr:
211 with repo.lock(), repo.transaction(b'bookmark') as tr:
212 bmchanges = [(b, None) for b in bookmarks]
212 bmchanges = [(b, None) for b in bookmarks]
213 repomarks.applychanges(repo, tr, bmchanges)
213 repomarks.applychanges(repo, tr, bmchanges)
214 for bookmark in sorted(bookmarks):
214 for bookmark in sorted(bookmarks):
215 ui.write(_(b"bookmark '%s' deleted\n") % bookmark)
215 ui.write(_(b"bookmark '%s' deleted\n") % bookmark)
216
216
217 if not revs:
217 if not revs:
218 raise error.Abort(_(b'empty revision set'))
218 raise error.Abort(_(b'empty revision set'))
219
219
220 descendants = set(cl.descendants(revs))
220 descendants = set(cl.descendants(revs))
221 strippedrevs = revs.union(descendants)
221 strippedrevs = revs.union(descendants)
222 roots = revs.difference(descendants)
222 roots = revs.difference(descendants)
223
223
224 # if one of the wdir parent is stripped we'll need
224 # if one of the wdir parent is stripped we'll need
225 # to update away to an earlier revision
225 # to update away to an earlier revision
226 update = any(
226 update = any(
227 p != nullid and cl.rev(p) in strippedrevs
227 p != nullid and cl.rev(p) in strippedrevs
228 for p in repo.dirstate.parents()
228 for p in repo.dirstate.parents()
229 )
229 )
230
230
231 rootnodes = {cl.node(r) for r in roots}
231 rootnodes = {cl.node(r) for r in roots}
232
232
233 q = getattr(repo, 'mq', None)
233 q = getattr(repo, 'mq', None)
234 if q is not None and q.applied:
234 if q is not None and q.applied:
235 # refresh queue state if we're about to strip
235 # refresh queue state if we're about to strip
236 # applied patches
236 # applied patches
237 if cl.rev(repo.lookup(b'qtip')) in strippedrevs:
237 if cl.rev(repo.lookup(b'qtip')) in strippedrevs:
238 q.applieddirty = True
238 q.applieddirty = True
239 start = 0
239 start = 0
240 end = len(q.applied)
240 end = len(q.applied)
241 for i, statusentry in enumerate(q.applied):
241 for i, statusentry in enumerate(q.applied):
242 if statusentry.node in rootnodes:
242 if statusentry.node in rootnodes:
243 # if one of the stripped roots is an applied
243 # if one of the stripped roots is an applied
244 # patch, only part of the queue is stripped
244 # patch, only part of the queue is stripped
245 start = i
245 start = i
246 break
246 break
247 del q.applied[start:end]
247 del q.applied[start:end]
248 q.savedirty()
248 q.savedirty()
249
249
250 revs = sorted(rootnodes)
250 revs = sorted(rootnodes)
251 if update and opts.get(b'keep'):
251 if update and opts.get(b'keep'):
252 urev = _findupdatetarget(repo, revs)
252 urev = _findupdatetarget(repo, revs)
253 uctx = repo[urev]
253 uctx = repo[urev]
254
254
255 # only reset the dirstate for files that would actually change
255 # only reset the dirstate for files that would actually change
256 # between the working context and uctx
256 # between the working context and uctx
257 descendantrevs = repo.revs(b"%d::.", uctx.rev())
257 descendantrevs = repo.revs(b"only(., %d)", uctx.rev())
258 changedfiles = []
258 changedfiles = []
259 for rev in descendantrevs:
259 for rev in descendantrevs:
260 # blindly reset the files, regardless of what actually changed
260 # blindly reset the files, regardless of what actually changed
261 changedfiles.extend(repo[rev].files())
261 changedfiles.extend(repo[rev].files())
262
262
263 # reset files that only changed in the dirstate too
263 # reset files that only changed in the dirstate too
264 dirstate = repo.dirstate
264 dirstate = repo.dirstate
265 dirchanges = [f for f in dirstate if dirstate[f] != b'n']
265 dirchanges = [f for f in dirstate if dirstate[f] != b'n']
266 changedfiles.extend(dirchanges)
266 changedfiles.extend(dirchanges)
267
267
268 repo.dirstate.rebuild(urev, uctx.manifest(), changedfiles)
268 repo.dirstate.rebuild(urev, uctx.manifest(), changedfiles)
269 repo.dirstate.write(repo.currenttransaction())
269 repo.dirstate.write(repo.currenttransaction())
270
270
271 # clear resolve state
271 # clear resolve state
272 mergestatemod.mergestate.clean(repo)
272 mergestatemod.mergestate.clean(repo)
273
273
274 update = False
274 update = False
275
275
276 strip(
276 strip(
277 ui,
277 ui,
278 repo,
278 repo,
279 revs,
279 revs,
280 backup=backup,
280 backup=backup,
281 update=update,
281 update=update,
282 force=opts.get(b'force'),
282 force=opts.get(b'force'),
283 bookmarks=bookmarks,
283 bookmarks=bookmarks,
284 soft=opts[b'soft'],
284 soft=opts[b'soft'],
285 )
285 )
286
286
287 return 0
287 return 0
@@ -1,1407 +1,1461 b''
1 $ echo "[extensions]" >> $HGRCPATH
1 $ echo "[extensions]" >> $HGRCPATH
2 $ echo "strip=" >> $HGRCPATH
2 $ echo "strip=" >> $HGRCPATH
3 $ echo "drawdag=$TESTDIR/drawdag.py" >> $HGRCPATH
3 $ echo "drawdag=$TESTDIR/drawdag.py" >> $HGRCPATH
4
4
5 $ restore() {
5 $ restore() {
6 > hg unbundle -q .hg/strip-backup/*
6 > hg unbundle -q .hg/strip-backup/*
7 > rm .hg/strip-backup/*
7 > rm .hg/strip-backup/*
8 > }
8 > }
9 $ teststrip() {
9 $ teststrip() {
10 > hg up -C $1
10 > hg up -C $1
11 > echo % before update $1, strip $2
11 > echo % before update $1, strip $2
12 > hg log -G -T '{rev}:{node}'
12 > hg log -G -T '{rev}:{node}'
13 > hg --traceback strip $2
13 > hg --traceback strip $2
14 > echo % after update $1, strip $2
14 > echo % after update $1, strip $2
15 > hg log -G -T '{rev}:{node}'
15 > hg log -G -T '{rev}:{node}'
16 > restore
16 > restore
17 > }
17 > }
18
18
19 $ hg init test
19 $ hg init test
20 $ cd test
20 $ cd test
21
21
22 $ echo foo > bar
22 $ echo foo > bar
23 $ hg ci -Ama
23 $ hg ci -Ama
24 adding bar
24 adding bar
25
25
26 $ echo more >> bar
26 $ echo more >> bar
27 $ hg ci -Amb
27 $ hg ci -Amb
28
28
29 $ echo blah >> bar
29 $ echo blah >> bar
30 $ hg ci -Amc
30 $ hg ci -Amc
31
31
32 $ hg up 1
32 $ hg up 1
33 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
33 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
34 $ echo blah >> bar
34 $ echo blah >> bar
35 $ hg ci -Amd
35 $ hg ci -Amd
36 created new head
36 created new head
37
37
38 $ echo final >> bar
38 $ echo final >> bar
39 $ hg ci -Ame
39 $ hg ci -Ame
40
40
41 $ hg log
41 $ hg log
42 changeset: 4:443431ffac4f
42 changeset: 4:443431ffac4f
43 tag: tip
43 tag: tip
44 user: test
44 user: test
45 date: Thu Jan 01 00:00:00 1970 +0000
45 date: Thu Jan 01 00:00:00 1970 +0000
46 summary: e
46 summary: e
47
47
48 changeset: 3:65bd5f99a4a3
48 changeset: 3:65bd5f99a4a3
49 parent: 1:ef3a871183d7
49 parent: 1:ef3a871183d7
50 user: test
50 user: test
51 date: Thu Jan 01 00:00:00 1970 +0000
51 date: Thu Jan 01 00:00:00 1970 +0000
52 summary: d
52 summary: d
53
53
54 changeset: 2:264128213d29
54 changeset: 2:264128213d29
55 user: test
55 user: test
56 date: Thu Jan 01 00:00:00 1970 +0000
56 date: Thu Jan 01 00:00:00 1970 +0000
57 summary: c
57 summary: c
58
58
59 changeset: 1:ef3a871183d7
59 changeset: 1:ef3a871183d7
60 user: test
60 user: test
61 date: Thu Jan 01 00:00:00 1970 +0000
61 date: Thu Jan 01 00:00:00 1970 +0000
62 summary: b
62 summary: b
63
63
64 changeset: 0:9ab35a2d17cb
64 changeset: 0:9ab35a2d17cb
65 user: test
65 user: test
66 date: Thu Jan 01 00:00:00 1970 +0000
66 date: Thu Jan 01 00:00:00 1970 +0000
67 summary: a
67 summary: a
68
68
69
69
70 $ teststrip 4 4
70 $ teststrip 4 4
71 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
71 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
72 % before update 4, strip 4
72 % before update 4, strip 4
73 @ 4:443431ffac4f5b5a19b0b6c298a21b7ba736bcce
73 @ 4:443431ffac4f5b5a19b0b6c298a21b7ba736bcce
74 |
74 |
75 o 3:65bd5f99a4a376cdea23a1153f07856b0d881d64
75 o 3:65bd5f99a4a376cdea23a1153f07856b0d881d64
76 |
76 |
77 | o 2:264128213d290d868c54642d13aeaa3675551a78
77 | o 2:264128213d290d868c54642d13aeaa3675551a78
78 |/
78 |/
79 o 1:ef3a871183d7199c541cc140218298bbfcc6c28a
79 o 1:ef3a871183d7199c541cc140218298bbfcc6c28a
80 |
80 |
81 o 0:9ab35a2d17cb64271241ea881efcc19dd953215b
81 o 0:9ab35a2d17cb64271241ea881efcc19dd953215b
82
82
83 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
83 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
84 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
84 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
85 % after update 4, strip 4
85 % after update 4, strip 4
86 @ 3:65bd5f99a4a376cdea23a1153f07856b0d881d64
86 @ 3:65bd5f99a4a376cdea23a1153f07856b0d881d64
87 |
87 |
88 | o 2:264128213d290d868c54642d13aeaa3675551a78
88 | o 2:264128213d290d868c54642d13aeaa3675551a78
89 |/
89 |/
90 o 1:ef3a871183d7199c541cc140218298bbfcc6c28a
90 o 1:ef3a871183d7199c541cc140218298bbfcc6c28a
91 |
91 |
92 o 0:9ab35a2d17cb64271241ea881efcc19dd953215b
92 o 0:9ab35a2d17cb64271241ea881efcc19dd953215b
93
93
94 $ teststrip 4 3
94 $ teststrip 4 3
95 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
95 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
96 % before update 4, strip 3
96 % before update 4, strip 3
97 @ 4:443431ffac4f5b5a19b0b6c298a21b7ba736bcce
97 @ 4:443431ffac4f5b5a19b0b6c298a21b7ba736bcce
98 |
98 |
99 o 3:65bd5f99a4a376cdea23a1153f07856b0d881d64
99 o 3:65bd5f99a4a376cdea23a1153f07856b0d881d64
100 |
100 |
101 | o 2:264128213d290d868c54642d13aeaa3675551a78
101 | o 2:264128213d290d868c54642d13aeaa3675551a78
102 |/
102 |/
103 o 1:ef3a871183d7199c541cc140218298bbfcc6c28a
103 o 1:ef3a871183d7199c541cc140218298bbfcc6c28a
104 |
104 |
105 o 0:9ab35a2d17cb64271241ea881efcc19dd953215b
105 o 0:9ab35a2d17cb64271241ea881efcc19dd953215b
106
106
107 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
107 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
108 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
108 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
109 % after update 4, strip 3
109 % after update 4, strip 3
110 o 2:264128213d290d868c54642d13aeaa3675551a78
110 o 2:264128213d290d868c54642d13aeaa3675551a78
111 |
111 |
112 @ 1:ef3a871183d7199c541cc140218298bbfcc6c28a
112 @ 1:ef3a871183d7199c541cc140218298bbfcc6c28a
113 |
113 |
114 o 0:9ab35a2d17cb64271241ea881efcc19dd953215b
114 o 0:9ab35a2d17cb64271241ea881efcc19dd953215b
115
115
116 $ teststrip 1 4
116 $ teststrip 1 4
117 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
117 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
118 % before update 1, strip 4
118 % before update 1, strip 4
119 o 4:443431ffac4f5b5a19b0b6c298a21b7ba736bcce
119 o 4:443431ffac4f5b5a19b0b6c298a21b7ba736bcce
120 |
120 |
121 o 3:65bd5f99a4a376cdea23a1153f07856b0d881d64
121 o 3:65bd5f99a4a376cdea23a1153f07856b0d881d64
122 |
122 |
123 | o 2:264128213d290d868c54642d13aeaa3675551a78
123 | o 2:264128213d290d868c54642d13aeaa3675551a78
124 |/
124 |/
125 @ 1:ef3a871183d7199c541cc140218298bbfcc6c28a
125 @ 1:ef3a871183d7199c541cc140218298bbfcc6c28a
126 |
126 |
127 o 0:9ab35a2d17cb64271241ea881efcc19dd953215b
127 o 0:9ab35a2d17cb64271241ea881efcc19dd953215b
128
128
129 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
129 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
130 % after update 1, strip 4
130 % after update 1, strip 4
131 o 3:65bd5f99a4a376cdea23a1153f07856b0d881d64
131 o 3:65bd5f99a4a376cdea23a1153f07856b0d881d64
132 |
132 |
133 | o 2:264128213d290d868c54642d13aeaa3675551a78
133 | o 2:264128213d290d868c54642d13aeaa3675551a78
134 |/
134 |/
135 @ 1:ef3a871183d7199c541cc140218298bbfcc6c28a
135 @ 1:ef3a871183d7199c541cc140218298bbfcc6c28a
136 |
136 |
137 o 0:9ab35a2d17cb64271241ea881efcc19dd953215b
137 o 0:9ab35a2d17cb64271241ea881efcc19dd953215b
138
138
139 $ teststrip 4 2
139 $ teststrip 4 2
140 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
140 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
141 % before update 4, strip 2
141 % before update 4, strip 2
142 @ 4:443431ffac4f5b5a19b0b6c298a21b7ba736bcce
142 @ 4:443431ffac4f5b5a19b0b6c298a21b7ba736bcce
143 |
143 |
144 o 3:65bd5f99a4a376cdea23a1153f07856b0d881d64
144 o 3:65bd5f99a4a376cdea23a1153f07856b0d881d64
145 |
145 |
146 | o 2:264128213d290d868c54642d13aeaa3675551a78
146 | o 2:264128213d290d868c54642d13aeaa3675551a78
147 |/
147 |/
148 o 1:ef3a871183d7199c541cc140218298bbfcc6c28a
148 o 1:ef3a871183d7199c541cc140218298bbfcc6c28a
149 |
149 |
150 o 0:9ab35a2d17cb64271241ea881efcc19dd953215b
150 o 0:9ab35a2d17cb64271241ea881efcc19dd953215b
151
151
152 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
152 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
153 % after update 4, strip 2
153 % after update 4, strip 2
154 @ 3:443431ffac4f5b5a19b0b6c298a21b7ba736bcce
154 @ 3:443431ffac4f5b5a19b0b6c298a21b7ba736bcce
155 |
155 |
156 o 2:65bd5f99a4a376cdea23a1153f07856b0d881d64
156 o 2:65bd5f99a4a376cdea23a1153f07856b0d881d64
157 |
157 |
158 o 1:ef3a871183d7199c541cc140218298bbfcc6c28a
158 o 1:ef3a871183d7199c541cc140218298bbfcc6c28a
159 |
159 |
160 o 0:9ab35a2d17cb64271241ea881efcc19dd953215b
160 o 0:9ab35a2d17cb64271241ea881efcc19dd953215b
161
161
162 $ teststrip 4 1
162 $ teststrip 4 1
163 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
163 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
164 % before update 4, strip 1
164 % before update 4, strip 1
165 @ 4:264128213d290d868c54642d13aeaa3675551a78
165 @ 4:264128213d290d868c54642d13aeaa3675551a78
166 |
166 |
167 | o 3:443431ffac4f5b5a19b0b6c298a21b7ba736bcce
167 | o 3:443431ffac4f5b5a19b0b6c298a21b7ba736bcce
168 | |
168 | |
169 | o 2:65bd5f99a4a376cdea23a1153f07856b0d881d64
169 | o 2:65bd5f99a4a376cdea23a1153f07856b0d881d64
170 |/
170 |/
171 o 1:ef3a871183d7199c541cc140218298bbfcc6c28a
171 o 1:ef3a871183d7199c541cc140218298bbfcc6c28a
172 |
172 |
173 o 0:9ab35a2d17cb64271241ea881efcc19dd953215b
173 o 0:9ab35a2d17cb64271241ea881efcc19dd953215b
174
174
175 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
175 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
176 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
176 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
177 % after update 4, strip 1
177 % after update 4, strip 1
178 @ 0:9ab35a2d17cb64271241ea881efcc19dd953215b
178 @ 0:9ab35a2d17cb64271241ea881efcc19dd953215b
179
179
180 $ teststrip null 4
180 $ teststrip null 4
181 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
181 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
182 % before update null, strip 4
182 % before update null, strip 4
183 o 4:264128213d290d868c54642d13aeaa3675551a78
183 o 4:264128213d290d868c54642d13aeaa3675551a78
184 |
184 |
185 | o 3:443431ffac4f5b5a19b0b6c298a21b7ba736bcce
185 | o 3:443431ffac4f5b5a19b0b6c298a21b7ba736bcce
186 | |
186 | |
187 | o 2:65bd5f99a4a376cdea23a1153f07856b0d881d64
187 | o 2:65bd5f99a4a376cdea23a1153f07856b0d881d64
188 |/
188 |/
189 o 1:ef3a871183d7199c541cc140218298bbfcc6c28a
189 o 1:ef3a871183d7199c541cc140218298bbfcc6c28a
190 |
190 |
191 o 0:9ab35a2d17cb64271241ea881efcc19dd953215b
191 o 0:9ab35a2d17cb64271241ea881efcc19dd953215b
192
192
193 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
193 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
194 % after update null, strip 4
194 % after update null, strip 4
195 o 3:443431ffac4f5b5a19b0b6c298a21b7ba736bcce
195 o 3:443431ffac4f5b5a19b0b6c298a21b7ba736bcce
196 |
196 |
197 o 2:65bd5f99a4a376cdea23a1153f07856b0d881d64
197 o 2:65bd5f99a4a376cdea23a1153f07856b0d881d64
198 |
198 |
199 o 1:ef3a871183d7199c541cc140218298bbfcc6c28a
199 o 1:ef3a871183d7199c541cc140218298bbfcc6c28a
200 |
200 |
201 o 0:9ab35a2d17cb64271241ea881efcc19dd953215b
201 o 0:9ab35a2d17cb64271241ea881efcc19dd953215b
202
202
203
203
204 $ hg log
204 $ hg log
205 changeset: 4:264128213d29
205 changeset: 4:264128213d29
206 tag: tip
206 tag: tip
207 parent: 1:ef3a871183d7
207 parent: 1:ef3a871183d7
208 user: test
208 user: test
209 date: Thu Jan 01 00:00:00 1970 +0000
209 date: Thu Jan 01 00:00:00 1970 +0000
210 summary: c
210 summary: c
211
211
212 changeset: 3:443431ffac4f
212 changeset: 3:443431ffac4f
213 user: test
213 user: test
214 date: Thu Jan 01 00:00:00 1970 +0000
214 date: Thu Jan 01 00:00:00 1970 +0000
215 summary: e
215 summary: e
216
216
217 changeset: 2:65bd5f99a4a3
217 changeset: 2:65bd5f99a4a3
218 user: test
218 user: test
219 date: Thu Jan 01 00:00:00 1970 +0000
219 date: Thu Jan 01 00:00:00 1970 +0000
220 summary: d
220 summary: d
221
221
222 changeset: 1:ef3a871183d7
222 changeset: 1:ef3a871183d7
223 user: test
223 user: test
224 date: Thu Jan 01 00:00:00 1970 +0000
224 date: Thu Jan 01 00:00:00 1970 +0000
225 summary: b
225 summary: b
226
226
227 changeset: 0:9ab35a2d17cb
227 changeset: 0:9ab35a2d17cb
228 user: test
228 user: test
229 date: Thu Jan 01 00:00:00 1970 +0000
229 date: Thu Jan 01 00:00:00 1970 +0000
230 summary: a
230 summary: a
231
231
232 $ hg up -C 4
232 $ hg up -C 4
233 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
233 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
234 $ hg parents
234 $ hg parents
235 changeset: 4:264128213d29
235 changeset: 4:264128213d29
236 tag: tip
236 tag: tip
237 parent: 1:ef3a871183d7
237 parent: 1:ef3a871183d7
238 user: test
238 user: test
239 date: Thu Jan 01 00:00:00 1970 +0000
239 date: Thu Jan 01 00:00:00 1970 +0000
240 summary: c
240 summary: c
241
241
242
242
243 $ hg --traceback strip 4
243 $ hg --traceback strip 4
244 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
244 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
245 saved backup bundle to $TESTTMP/test/.hg/strip-backup/264128213d29-0b39d6bf-backup.hg
245 saved backup bundle to $TESTTMP/test/.hg/strip-backup/264128213d29-0b39d6bf-backup.hg
246 $ hg parents
246 $ hg parents
247 changeset: 1:ef3a871183d7
247 changeset: 1:ef3a871183d7
248 user: test
248 user: test
249 date: Thu Jan 01 00:00:00 1970 +0000
249 date: Thu Jan 01 00:00:00 1970 +0000
250 summary: b
250 summary: b
251
251
252 $ hg debugbundle .hg/strip-backup/*
252 $ hg debugbundle .hg/strip-backup/*
253 Stream params: {Compression: BZ}
253 Stream params: {Compression: BZ}
254 changegroup -- {nbchanges: 1, version: 02} (mandatory: True)
254 changegroup -- {nbchanges: 1, version: 02} (mandatory: True)
255 264128213d290d868c54642d13aeaa3675551a78
255 264128213d290d868c54642d13aeaa3675551a78
256 cache:rev-branch-cache -- {} (mandatory: False)
256 cache:rev-branch-cache -- {} (mandatory: False)
257 phase-heads -- {} (mandatory: True)
257 phase-heads -- {} (mandatory: True)
258 264128213d290d868c54642d13aeaa3675551a78 draft
258 264128213d290d868c54642d13aeaa3675551a78 draft
259 $ hg unbundle .hg/strip-backup/*
259 $ hg unbundle .hg/strip-backup/*
260 adding changesets
260 adding changesets
261 adding manifests
261 adding manifests
262 adding file changes
262 adding file changes
263 added 1 changesets with 0 changes to 1 files (+1 heads)
263 added 1 changesets with 0 changes to 1 files (+1 heads)
264 new changesets 264128213d29 (1 drafts)
264 new changesets 264128213d29 (1 drafts)
265 (run 'hg heads' to see heads, 'hg merge' to merge)
265 (run 'hg heads' to see heads, 'hg merge' to merge)
266 $ rm .hg/strip-backup/*
266 $ rm .hg/strip-backup/*
267 $ hg log --graph
267 $ hg log --graph
268 o changeset: 4:264128213d29
268 o changeset: 4:264128213d29
269 | tag: tip
269 | tag: tip
270 | parent: 1:ef3a871183d7
270 | parent: 1:ef3a871183d7
271 | user: test
271 | user: test
272 | date: Thu Jan 01 00:00:00 1970 +0000
272 | date: Thu Jan 01 00:00:00 1970 +0000
273 | summary: c
273 | summary: c
274 |
274 |
275 | o changeset: 3:443431ffac4f
275 | o changeset: 3:443431ffac4f
276 | | user: test
276 | | user: test
277 | | date: Thu Jan 01 00:00:00 1970 +0000
277 | | date: Thu Jan 01 00:00:00 1970 +0000
278 | | summary: e
278 | | summary: e
279 | |
279 | |
280 | o changeset: 2:65bd5f99a4a3
280 | o changeset: 2:65bd5f99a4a3
281 |/ user: test
281 |/ user: test
282 | date: Thu Jan 01 00:00:00 1970 +0000
282 | date: Thu Jan 01 00:00:00 1970 +0000
283 | summary: d
283 | summary: d
284 |
284 |
285 @ changeset: 1:ef3a871183d7
285 @ changeset: 1:ef3a871183d7
286 | user: test
286 | user: test
287 | date: Thu Jan 01 00:00:00 1970 +0000
287 | date: Thu Jan 01 00:00:00 1970 +0000
288 | summary: b
288 | summary: b
289 |
289 |
290 o changeset: 0:9ab35a2d17cb
290 o changeset: 0:9ab35a2d17cb
291 user: test
291 user: test
292 date: Thu Jan 01 00:00:00 1970 +0000
292 date: Thu Jan 01 00:00:00 1970 +0000
293 summary: a
293 summary: a
294
294
295 $ hg up -C 2
295 $ hg up -C 2
296 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
296 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
297 $ hg merge 4
297 $ hg merge 4
298 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
298 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
299 (branch merge, don't forget to commit)
299 (branch merge, don't forget to commit)
300
300
301 before strip of merge parent
301 before strip of merge parent
302
302
303 $ hg parents
303 $ hg parents
304 changeset: 2:65bd5f99a4a3
304 changeset: 2:65bd5f99a4a3
305 user: test
305 user: test
306 date: Thu Jan 01 00:00:00 1970 +0000
306 date: Thu Jan 01 00:00:00 1970 +0000
307 summary: d
307 summary: d
308
308
309 changeset: 4:264128213d29
309 changeset: 4:264128213d29
310 tag: tip
310 tag: tip
311 parent: 1:ef3a871183d7
311 parent: 1:ef3a871183d7
312 user: test
312 user: test
313 date: Thu Jan 01 00:00:00 1970 +0000
313 date: Thu Jan 01 00:00:00 1970 +0000
314 summary: c
314 summary: c
315
315
316 ##strip not allowed with merge in progress
316 ##strip not allowed with merge in progress
317 $ hg strip 4
317 $ hg strip 4
318 abort: outstanding uncommitted merge
318 abort: outstanding uncommitted merge
319 (use 'hg commit' or 'hg merge --abort')
319 (use 'hg commit' or 'hg merge --abort')
320 [255]
320 [255]
321 ##strip allowed --force with merge in progress
321 ##strip allowed --force with merge in progress
322 $ hg strip 4 --force
322 $ hg strip 4 --force
323 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
323 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
324 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
324 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
325
325
326 after strip of merge parent
326 after strip of merge parent
327
327
328 $ hg parents
328 $ hg parents
329 changeset: 1:ef3a871183d7
329 changeset: 1:ef3a871183d7
330 user: test
330 user: test
331 date: Thu Jan 01 00:00:00 1970 +0000
331 date: Thu Jan 01 00:00:00 1970 +0000
332 summary: b
332 summary: b
333
333
334 $ restore
334 $ restore
335
335
336 $ hg up
336 $ hg up
337 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
337 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
338 updated to "264128213d29: c"
338 updated to "264128213d29: c"
339 1 other heads for branch "default"
339 1 other heads for branch "default"
340 $ hg log -G
340 $ hg log -G
341 @ changeset: 4:264128213d29
341 @ changeset: 4:264128213d29
342 | tag: tip
342 | tag: tip
343 | parent: 1:ef3a871183d7
343 | parent: 1:ef3a871183d7
344 | user: test
344 | user: test
345 | date: Thu Jan 01 00:00:00 1970 +0000
345 | date: Thu Jan 01 00:00:00 1970 +0000
346 | summary: c
346 | summary: c
347 |
347 |
348 | o changeset: 3:443431ffac4f
348 | o changeset: 3:443431ffac4f
349 | | user: test
349 | | user: test
350 | | date: Thu Jan 01 00:00:00 1970 +0000
350 | | date: Thu Jan 01 00:00:00 1970 +0000
351 | | summary: e
351 | | summary: e
352 | |
352 | |
353 | o changeset: 2:65bd5f99a4a3
353 | o changeset: 2:65bd5f99a4a3
354 |/ user: test
354 |/ user: test
355 | date: Thu Jan 01 00:00:00 1970 +0000
355 | date: Thu Jan 01 00:00:00 1970 +0000
356 | summary: d
356 | summary: d
357 |
357 |
358 o changeset: 1:ef3a871183d7
358 o changeset: 1:ef3a871183d7
359 | user: test
359 | user: test
360 | date: Thu Jan 01 00:00:00 1970 +0000
360 | date: Thu Jan 01 00:00:00 1970 +0000
361 | summary: b
361 | summary: b
362 |
362 |
363 o changeset: 0:9ab35a2d17cb
363 o changeset: 0:9ab35a2d17cb
364 user: test
364 user: test
365 date: Thu Jan 01 00:00:00 1970 +0000
365 date: Thu Jan 01 00:00:00 1970 +0000
366 summary: a
366 summary: a
367
367
368
368
369 2 is parent of 3, only one strip should happen
369 2 is parent of 3, only one strip should happen
370
370
371 $ hg strip "roots(2)" 3
371 $ hg strip "roots(2)" 3
372 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
372 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
373 $ hg log -G
373 $ hg log -G
374 @ changeset: 2:264128213d29
374 @ changeset: 2:264128213d29
375 | tag: tip
375 | tag: tip
376 | user: test
376 | user: test
377 | date: Thu Jan 01 00:00:00 1970 +0000
377 | date: Thu Jan 01 00:00:00 1970 +0000
378 | summary: c
378 | summary: c
379 |
379 |
380 o changeset: 1:ef3a871183d7
380 o changeset: 1:ef3a871183d7
381 | user: test
381 | user: test
382 | date: Thu Jan 01 00:00:00 1970 +0000
382 | date: Thu Jan 01 00:00:00 1970 +0000
383 | summary: b
383 | summary: b
384 |
384 |
385 o changeset: 0:9ab35a2d17cb
385 o changeset: 0:9ab35a2d17cb
386 user: test
386 user: test
387 date: Thu Jan 01 00:00:00 1970 +0000
387 date: Thu Jan 01 00:00:00 1970 +0000
388 summary: a
388 summary: a
389
389
390 $ restore
390 $ restore
391 $ hg log -G
391 $ hg log -G
392 o changeset: 4:443431ffac4f
392 o changeset: 4:443431ffac4f
393 | tag: tip
393 | tag: tip
394 | user: test
394 | user: test
395 | date: Thu Jan 01 00:00:00 1970 +0000
395 | date: Thu Jan 01 00:00:00 1970 +0000
396 | summary: e
396 | summary: e
397 |
397 |
398 o changeset: 3:65bd5f99a4a3
398 o changeset: 3:65bd5f99a4a3
399 | parent: 1:ef3a871183d7
399 | parent: 1:ef3a871183d7
400 | user: test
400 | user: test
401 | date: Thu Jan 01 00:00:00 1970 +0000
401 | date: Thu Jan 01 00:00:00 1970 +0000
402 | summary: d
402 | summary: d
403 |
403 |
404 | @ changeset: 2:264128213d29
404 | @ changeset: 2:264128213d29
405 |/ user: test
405 |/ user: test
406 | date: Thu Jan 01 00:00:00 1970 +0000
406 | date: Thu Jan 01 00:00:00 1970 +0000
407 | summary: c
407 | summary: c
408 |
408 |
409 o changeset: 1:ef3a871183d7
409 o changeset: 1:ef3a871183d7
410 | user: test
410 | user: test
411 | date: Thu Jan 01 00:00:00 1970 +0000
411 | date: Thu Jan 01 00:00:00 1970 +0000
412 | summary: b
412 | summary: b
413 |
413 |
414 o changeset: 0:9ab35a2d17cb
414 o changeset: 0:9ab35a2d17cb
415 user: test
415 user: test
416 date: Thu Jan 01 00:00:00 1970 +0000
416 date: Thu Jan 01 00:00:00 1970 +0000
417 summary: a
417 summary: a
418
418
419 Failed hook while applying "saveheads" bundle.
419 Failed hook while applying "saveheads" bundle.
420
420
421 $ hg strip 2 --config hooks.pretxnchangegroup.bad=false
421 $ hg strip 2 --config hooks.pretxnchangegroup.bad=false
422 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
422 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
423 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
423 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
424 transaction abort!
424 transaction abort!
425 rollback completed
425 rollback completed
426 strip failed, backup bundle stored in '$TESTTMP/test/.hg/strip-backup/*-backup.hg' (glob)
426 strip failed, backup bundle stored in '$TESTTMP/test/.hg/strip-backup/*-backup.hg' (glob)
427 strip failed, unrecovered changes stored in '$TESTTMP/test/.hg/strip-backup/*-temp.hg' (glob)
427 strip failed, unrecovered changes stored in '$TESTTMP/test/.hg/strip-backup/*-temp.hg' (glob)
428 (fix the problem, then recover the changesets with "hg unbundle '$TESTTMP/test/.hg/strip-backup/*-temp.hg'") (glob)
428 (fix the problem, then recover the changesets with "hg unbundle '$TESTTMP/test/.hg/strip-backup/*-temp.hg'") (glob)
429 abort: pretxnchangegroup.bad hook exited with status 1
429 abort: pretxnchangegroup.bad hook exited with status 1
430 [255]
430 [255]
431 $ restore
431 $ restore
432 $ hg log -G
432 $ hg log -G
433 o changeset: 4:443431ffac4f
433 o changeset: 4:443431ffac4f
434 | tag: tip
434 | tag: tip
435 | user: test
435 | user: test
436 | date: Thu Jan 01 00:00:00 1970 +0000
436 | date: Thu Jan 01 00:00:00 1970 +0000
437 | summary: e
437 | summary: e
438 |
438 |
439 o changeset: 3:65bd5f99a4a3
439 o changeset: 3:65bd5f99a4a3
440 | parent: 1:ef3a871183d7
440 | parent: 1:ef3a871183d7
441 | user: test
441 | user: test
442 | date: Thu Jan 01 00:00:00 1970 +0000
442 | date: Thu Jan 01 00:00:00 1970 +0000
443 | summary: d
443 | summary: d
444 |
444 |
445 | o changeset: 2:264128213d29
445 | o changeset: 2:264128213d29
446 |/ user: test
446 |/ user: test
447 | date: Thu Jan 01 00:00:00 1970 +0000
447 | date: Thu Jan 01 00:00:00 1970 +0000
448 | summary: c
448 | summary: c
449 |
449 |
450 @ changeset: 1:ef3a871183d7
450 @ changeset: 1:ef3a871183d7
451 | user: test
451 | user: test
452 | date: Thu Jan 01 00:00:00 1970 +0000
452 | date: Thu Jan 01 00:00:00 1970 +0000
453 | summary: b
453 | summary: b
454 |
454 |
455 o changeset: 0:9ab35a2d17cb
455 o changeset: 0:9ab35a2d17cb
456 user: test
456 user: test
457 date: Thu Jan 01 00:00:00 1970 +0000
457 date: Thu Jan 01 00:00:00 1970 +0000
458 summary: a
458 summary: a
459
459
460
460
461 2 different branches: 2 strips
461 2 different branches: 2 strips
462
462
463 $ hg strip 2 4
463 $ hg strip 2 4
464 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
464 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
465 $ hg log -G
465 $ hg log -G
466 o changeset: 2:65bd5f99a4a3
466 o changeset: 2:65bd5f99a4a3
467 | tag: tip
467 | tag: tip
468 | user: test
468 | user: test
469 | date: Thu Jan 01 00:00:00 1970 +0000
469 | date: Thu Jan 01 00:00:00 1970 +0000
470 | summary: d
470 | summary: d
471 |
471 |
472 @ changeset: 1:ef3a871183d7
472 @ changeset: 1:ef3a871183d7
473 | user: test
473 | user: test
474 | date: Thu Jan 01 00:00:00 1970 +0000
474 | date: Thu Jan 01 00:00:00 1970 +0000
475 | summary: b
475 | summary: b
476 |
476 |
477 o changeset: 0:9ab35a2d17cb
477 o changeset: 0:9ab35a2d17cb
478 user: test
478 user: test
479 date: Thu Jan 01 00:00:00 1970 +0000
479 date: Thu Jan 01 00:00:00 1970 +0000
480 summary: a
480 summary: a
481
481
482 $ restore
482 $ restore
483
483
484 2 different branches and a common ancestor: 1 strip
484 2 different branches and a common ancestor: 1 strip
485
485
486 $ hg strip 1 "2|4"
486 $ hg strip 1 "2|4"
487 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
487 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
488 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
488 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
489 $ restore
489 $ restore
490
490
491 verify fncache is kept up-to-date
491 verify fncache is kept up-to-date
492
492
493 $ touch a
493 $ touch a
494 $ hg ci -qAm a
494 $ hg ci -qAm a
495 #if repofncache
495 #if repofncache
496 $ cat .hg/store/fncache | sort
496 $ cat .hg/store/fncache | sort
497 data/a.i
497 data/a.i
498 data/bar.i
498 data/bar.i
499 #endif
499 #endif
500
500
501 $ hg strip tip
501 $ hg strip tip
502 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
502 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
503 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
503 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
504 #if repofncache
504 #if repofncache
505 $ cat .hg/store/fncache
505 $ cat .hg/store/fncache
506 data/bar.i
506 data/bar.i
507 #endif
507 #endif
508
508
509 stripping an empty revset
509 stripping an empty revset
510
510
511 $ hg strip "1 and not 1"
511 $ hg strip "1 and not 1"
512 abort: empty revision set
512 abort: empty revision set
513 [255]
513 [255]
514
514
515 remove branchy history for qimport tests
515 remove branchy history for qimport tests
516
516
517 $ hg strip 3
517 $ hg strip 3
518 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
518 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
519
519
520
520
521 strip of applied mq should cleanup status file
521 strip of applied mq should cleanup status file
522
522
523 $ echo "mq=" >> $HGRCPATH
523 $ echo "mq=" >> $HGRCPATH
524 $ hg up -C 3
524 $ hg up -C 3
525 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
525 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
526 $ echo fooagain >> bar
526 $ echo fooagain >> bar
527 $ hg ci -mf
527 $ hg ci -mf
528 $ hg qimport -r tip:2
528 $ hg qimport -r tip:2
529
529
530 applied patches before strip
530 applied patches before strip
531
531
532 $ hg qapplied
532 $ hg qapplied
533 d
533 d
534 e
534 e
535 f
535 f
536
536
537 stripping revision in queue
537 stripping revision in queue
538
538
539 $ hg strip 3
539 $ hg strip 3
540 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
540 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
541 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
541 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
542
542
543 applied patches after stripping rev in queue
543 applied patches after stripping rev in queue
544
544
545 $ hg qapplied
545 $ hg qapplied
546 d
546 d
547
547
548 stripping ancestor of queue
548 stripping ancestor of queue
549
549
550 $ hg strip 1
550 $ hg strip 1
551 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
551 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
552 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
552 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
553
553
554 applied patches after stripping ancestor of queue
554 applied patches after stripping ancestor of queue
555
555
556 $ hg qapplied
556 $ hg qapplied
557
557
558 Verify strip protects against stripping wc parent when there are uncommitted mods
558 Verify strip protects against stripping wc parent when there are uncommitted mods
559
559
560 $ echo b > b
560 $ echo b > b
561 $ echo bb > bar
561 $ echo bb > bar
562 $ hg add b
562 $ hg add b
563 $ hg ci -m 'b'
563 $ hg ci -m 'b'
564 $ hg log --graph
564 $ hg log --graph
565 @ changeset: 1:76dcf9fab855
565 @ changeset: 1:76dcf9fab855
566 | tag: tip
566 | tag: tip
567 | user: test
567 | user: test
568 | date: Thu Jan 01 00:00:00 1970 +0000
568 | date: Thu Jan 01 00:00:00 1970 +0000
569 | summary: b
569 | summary: b
570 |
570 |
571 o changeset: 0:9ab35a2d17cb
571 o changeset: 0:9ab35a2d17cb
572 user: test
572 user: test
573 date: Thu Jan 01 00:00:00 1970 +0000
573 date: Thu Jan 01 00:00:00 1970 +0000
574 summary: a
574 summary: a
575
575
576 $ hg up 0
576 $ hg up 0
577 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
577 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
578 $ echo c > bar
578 $ echo c > bar
579 $ hg up -t false
579 $ hg up -t false
580 merging bar
580 merging bar
581 merging bar failed!
581 merging bar failed!
582 1 files updated, 0 files merged, 0 files removed, 1 files unresolved
582 1 files updated, 0 files merged, 0 files removed, 1 files unresolved
583 use 'hg resolve' to retry unresolved file merges
583 use 'hg resolve' to retry unresolved file merges
584 [1]
584 [1]
585 $ hg sum
585 $ hg sum
586 parent: 1:76dcf9fab855 tip
586 parent: 1:76dcf9fab855 tip
587 b
587 b
588 branch: default
588 branch: default
589 commit: 1 modified, 1 unknown, 1 unresolved
589 commit: 1 modified, 1 unknown, 1 unresolved
590 update: (current)
590 update: (current)
591 phases: 2 draft
591 phases: 2 draft
592 mq: 3 unapplied
592 mq: 3 unapplied
593
593
594 $ hg log --graph
594 $ hg log --graph
595 @ changeset: 1:76dcf9fab855
595 @ changeset: 1:76dcf9fab855
596 | tag: tip
596 | tag: tip
597 | user: test
597 | user: test
598 | date: Thu Jan 01 00:00:00 1970 +0000
598 | date: Thu Jan 01 00:00:00 1970 +0000
599 | summary: b
599 | summary: b
600 |
600 |
601 % changeset: 0:9ab35a2d17cb
601 % changeset: 0:9ab35a2d17cb
602 user: test
602 user: test
603 date: Thu Jan 01 00:00:00 1970 +0000
603 date: Thu Jan 01 00:00:00 1970 +0000
604 summary: a
604 summary: a
605
605
606 $ echo c > b
606 $ echo c > b
607 $ hg strip tip
607 $ hg strip tip
608 abort: uncommitted changes
608 abort: uncommitted changes
609 [255]
609 [255]
610 $ hg strip tip --keep
610 $ hg strip tip --keep
611 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
611 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
612 $ hg log --graph
612 $ hg log --graph
613 @ changeset: 0:9ab35a2d17cb
613 @ changeset: 0:9ab35a2d17cb
614 tag: tip
614 tag: tip
615 user: test
615 user: test
616 date: Thu Jan 01 00:00:00 1970 +0000
616 date: Thu Jan 01 00:00:00 1970 +0000
617 summary: a
617 summary: a
618
618
619 $ hg status
619 $ hg status
620 M bar
620 M bar
621 ? b
621 ? b
622 ? bar.orig
622 ? bar.orig
623
623
624 $ rm bar.orig
624 $ rm bar.orig
625 $ hg sum
625 $ hg sum
626 parent: 0:9ab35a2d17cb tip
626 parent: 0:9ab35a2d17cb tip
627 a
627 a
628 branch: default
628 branch: default
629 commit: 1 modified, 1 unknown
629 commit: 1 modified, 1 unknown
630 update: (current)
630 update: (current)
631 phases: 1 draft
631 phases: 1 draft
632 mq: 3 unapplied
632 mq: 3 unapplied
633
633
634 Strip adds, removes, modifies with --keep
634 Strip adds, removes, modifies with --keep
635
635
636 $ touch b
636 $ touch b
637 $ hg add b
637 $ hg add b
638 $ hg commit -mb
638 $ hg commit -mb
639 $ touch c
639 $ touch c
640
640
641 ... with a clean working dir
641 ... with a clean working dir
642
642
643 $ hg add c
643 $ hg add c
644 $ hg rm bar
644 $ hg rm bar
645 $ hg commit -mc
645 $ hg commit -mc
646 $ hg status
646 $ hg status
647 $ hg strip --keep tip
647 $ hg strip --keep tip
648 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
648 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
649 $ hg status
649 $ hg status
650 ! bar
650 ! bar
651 ? c
651 ? c
652
652
653 ... with a dirty working dir
653 ... with a dirty working dir
654
654
655 $ hg add c
655 $ hg add c
656 $ hg rm bar
656 $ hg rm bar
657 $ hg commit -mc
657 $ hg commit -mc
658 $ hg status
658 $ hg status
659 $ echo b > b
659 $ echo b > b
660 $ echo d > d
660 $ echo d > d
661 $ hg strip --keep tip
661 $ hg strip --keep tip
662 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
662 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
663 $ hg status
663 $ hg status
664 M b
664 M b
665 ! bar
665 ! bar
666 ? c
666 ? c
667 ? d
667 ? d
668
668
669 ... after updating the dirstate
669 ... after updating the dirstate
670 $ hg add c
670 $ hg add c
671 $ hg commit -mc
671 $ hg commit -mc
672 $ hg rm c
672 $ hg rm c
673 $ hg commit -mc
673 $ hg commit -mc
674 $ hg strip --keep '.^' -q
674 $ hg strip --keep '.^' -q
675 $ cd ..
675 $ cd ..
676
676
677 stripping many nodes on a complex graph (issue3299)
677 stripping many nodes on a complex graph (issue3299)
678
678
679 $ hg init issue3299
679 $ hg init issue3299
680 $ cd issue3299
680 $ cd issue3299
681 $ hg debugbuilddag '@a.:a@b.:b.:x<a@a.:a<b@b.:b<a@a.:a'
681 $ hg debugbuilddag '@a.:a@b.:b.:x<a@a.:a<b@b.:b<a@a.:a'
682 $ hg strip 'not ancestors(x)'
682 $ hg strip 'not ancestors(x)'
683 saved backup bundle to $TESTTMP/issue3299/.hg/strip-backup/*-backup.hg (glob)
683 saved backup bundle to $TESTTMP/issue3299/.hg/strip-backup/*-backup.hg (glob)
684
684
685 test hg strip -B bookmark
685 test hg strip -B bookmark
686
686
687 $ cd ..
687 $ cd ..
688 $ hg init bookmarks
688 $ hg init bookmarks
689 $ cd bookmarks
689 $ cd bookmarks
690 $ hg debugbuilddag '..<2.*1/2:m<2+3:c<m+3:a<2.:b<m+2:d<2.:e<m+1:f'
690 $ hg debugbuilddag '..<2.*1/2:m<2+3:c<m+3:a<2.:b<m+2:d<2.:e<m+1:f'
691 $ hg bookmark -r 'a' 'todelete'
691 $ hg bookmark -r 'a' 'todelete'
692 $ hg bookmark -r 'b' 'B'
692 $ hg bookmark -r 'b' 'B'
693 $ hg bookmark -r 'b' 'nostrip'
693 $ hg bookmark -r 'b' 'nostrip'
694 $ hg bookmark -r 'c' 'delete'
694 $ hg bookmark -r 'c' 'delete'
695 $ hg bookmark -r 'd' 'multipledelete1'
695 $ hg bookmark -r 'd' 'multipledelete1'
696 $ hg bookmark -r 'e' 'multipledelete2'
696 $ hg bookmark -r 'e' 'multipledelete2'
697 $ hg bookmark -r 'f' 'singlenode1'
697 $ hg bookmark -r 'f' 'singlenode1'
698 $ hg bookmark -r 'f' 'singlenode2'
698 $ hg bookmark -r 'f' 'singlenode2'
699 $ hg up -C todelete
699 $ hg up -C todelete
700 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
700 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
701 (activating bookmark todelete)
701 (activating bookmark todelete)
702 $ hg strip -B nostrip
702 $ hg strip -B nostrip
703 bookmark 'nostrip' deleted
703 bookmark 'nostrip' deleted
704 abort: empty revision set
704 abort: empty revision set
705 [255]
705 [255]
706 $ hg strip -B todelete
706 $ hg strip -B todelete
707 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
707 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
708 saved backup bundle to $TESTTMP/bookmarks/.hg/strip-backup/*-backup.hg (glob)
708 saved backup bundle to $TESTTMP/bookmarks/.hg/strip-backup/*-backup.hg (glob)
709 bookmark 'todelete' deleted
709 bookmark 'todelete' deleted
710 $ hg id -ir dcbb326fdec2
710 $ hg id -ir dcbb326fdec2
711 abort: unknown revision 'dcbb326fdec2'!
711 abort: unknown revision 'dcbb326fdec2'!
712 [255]
712 [255]
713 $ hg id -ir d62d843c9a01
713 $ hg id -ir d62d843c9a01
714 d62d843c9a01
714 d62d843c9a01
715 $ hg bookmarks
715 $ hg bookmarks
716 B 9:ff43616e5d0f
716 B 9:ff43616e5d0f
717 delete 6:2702dd0c91e7
717 delete 6:2702dd0c91e7
718 multipledelete1 11:e46a4836065c
718 multipledelete1 11:e46a4836065c
719 multipledelete2 12:b4594d867745
719 multipledelete2 12:b4594d867745
720 singlenode1 13:43227190fef8
720 singlenode1 13:43227190fef8
721 singlenode2 13:43227190fef8
721 singlenode2 13:43227190fef8
722 $ hg strip -B multipledelete1 -B multipledelete2
722 $ hg strip -B multipledelete1 -B multipledelete2
723 saved backup bundle to $TESTTMP/bookmarks/.hg/strip-backup/e46a4836065c-89ec65c2-backup.hg
723 saved backup bundle to $TESTTMP/bookmarks/.hg/strip-backup/e46a4836065c-89ec65c2-backup.hg
724 bookmark 'multipledelete1' deleted
724 bookmark 'multipledelete1' deleted
725 bookmark 'multipledelete2' deleted
725 bookmark 'multipledelete2' deleted
726 $ hg id -ir e46a4836065c
726 $ hg id -ir e46a4836065c
727 abort: unknown revision 'e46a4836065c'!
727 abort: unknown revision 'e46a4836065c'!
728 [255]
728 [255]
729 $ hg id -ir b4594d867745
729 $ hg id -ir b4594d867745
730 abort: unknown revision 'b4594d867745'!
730 abort: unknown revision 'b4594d867745'!
731 [255]
731 [255]
732 $ hg strip -B singlenode1 -B singlenode2
732 $ hg strip -B singlenode1 -B singlenode2
733 saved backup bundle to $TESTTMP/bookmarks/.hg/strip-backup/43227190fef8-8da858f2-backup.hg
733 saved backup bundle to $TESTTMP/bookmarks/.hg/strip-backup/43227190fef8-8da858f2-backup.hg
734 bookmark 'singlenode1' deleted
734 bookmark 'singlenode1' deleted
735 bookmark 'singlenode2' deleted
735 bookmark 'singlenode2' deleted
736 $ hg id -ir 43227190fef8
736 $ hg id -ir 43227190fef8
737 abort: unknown revision '43227190fef8'!
737 abort: unknown revision '43227190fef8'!
738 [255]
738 [255]
739 $ hg strip -B unknownbookmark
739 $ hg strip -B unknownbookmark
740 abort: bookmark 'unknownbookmark' not found
740 abort: bookmark 'unknownbookmark' not found
741 [255]
741 [255]
742 $ hg strip -B unknownbookmark1 -B unknownbookmark2
742 $ hg strip -B unknownbookmark1 -B unknownbookmark2
743 abort: bookmark 'unknownbookmark1,unknownbookmark2' not found
743 abort: bookmark 'unknownbookmark1,unknownbookmark2' not found
744 [255]
744 [255]
745 $ hg strip -B delete -B unknownbookmark
745 $ hg strip -B delete -B unknownbookmark
746 abort: bookmark 'unknownbookmark' not found
746 abort: bookmark 'unknownbookmark' not found
747 [255]
747 [255]
748 $ hg strip -B delete
748 $ hg strip -B delete
749 saved backup bundle to $TESTTMP/bookmarks/.hg/strip-backup/*-backup.hg (glob)
749 saved backup bundle to $TESTTMP/bookmarks/.hg/strip-backup/*-backup.hg (glob)
750 bookmark 'delete' deleted
750 bookmark 'delete' deleted
751 $ hg id -ir 6:2702dd0c91e7
751 $ hg id -ir 6:2702dd0c91e7
752 abort: unknown revision '2702dd0c91e7'!
752 abort: unknown revision '2702dd0c91e7'!
753 [255]
753 [255]
754 $ hg update B
754 $ hg update B
755 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
755 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
756 (activating bookmark B)
756 (activating bookmark B)
757 $ echo a > a
757 $ echo a > a
758 $ hg add a
758 $ hg add a
759 $ hg strip -B B
759 $ hg strip -B B
760 abort: uncommitted changes
760 abort: uncommitted changes
761 [255]
761 [255]
762 $ hg bookmarks
762 $ hg bookmarks
763 * B 6:ff43616e5d0f
763 * B 6:ff43616e5d0f
764
764
765 Make sure no one adds back a -b option:
765 Make sure no one adds back a -b option:
766
766
767 $ hg strip -b tip
767 $ hg strip -b tip
768 hg strip: option -b not recognized
768 hg strip: option -b not recognized
769 hg strip [-k] [-f] [-B bookmark] [-r] REV...
769 hg strip [-k] [-f] [-B bookmark] [-r] REV...
770
770
771 strip changesets and all their descendants from the repository
771 strip changesets and all their descendants from the repository
772
772
773 (use 'hg help -e strip' to show help for the strip extension)
773 (use 'hg help -e strip' to show help for the strip extension)
774
774
775 options ([+] can be repeated):
775 options ([+] can be repeated):
776
776
777 -r --rev REV [+] strip specified revision (optional, can specify
777 -r --rev REV [+] strip specified revision (optional, can specify
778 revisions without this option)
778 revisions without this option)
779 -f --force force removal of changesets, discard uncommitted
779 -f --force force removal of changesets, discard uncommitted
780 changes (no backup)
780 changes (no backup)
781 --no-backup do not save backup bundle
781 --no-backup do not save backup bundle
782 -k --keep do not modify working directory during strip
782 -k --keep do not modify working directory during strip
783 -B --bookmark BOOKMARK [+] remove revs only reachable from given bookmark
783 -B --bookmark BOOKMARK [+] remove revs only reachable from given bookmark
784 --mq operate on patch repository
784 --mq operate on patch repository
785
785
786 (use 'hg strip -h' to show more help)
786 (use 'hg strip -h' to show more help)
787 [255]
787 [255]
788
788
789 $ cd ..
789 $ cd ..
790
790
791 Verify bundles don't get overwritten:
791 Verify bundles don't get overwritten:
792
792
793 $ hg init doublebundle
793 $ hg init doublebundle
794 $ cd doublebundle
794 $ cd doublebundle
795 $ touch a
795 $ touch a
796 $ hg commit -Aqm a
796 $ hg commit -Aqm a
797 $ touch b
797 $ touch b
798 $ hg commit -Aqm b
798 $ hg commit -Aqm b
799 $ hg strip -r 0
799 $ hg strip -r 0
800 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
800 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
801 saved backup bundle to $TESTTMP/doublebundle/.hg/strip-backup/3903775176ed-e68910bd-backup.hg
801 saved backup bundle to $TESTTMP/doublebundle/.hg/strip-backup/3903775176ed-e68910bd-backup.hg
802 $ ls .hg/strip-backup
802 $ ls .hg/strip-backup
803 3903775176ed-e68910bd-backup.hg
803 3903775176ed-e68910bd-backup.hg
804 #if repobundlerepo
804 #if repobundlerepo
805 $ hg pull -q -r 3903775176ed .hg/strip-backup/3903775176ed-e68910bd-backup.hg
805 $ hg pull -q -r 3903775176ed .hg/strip-backup/3903775176ed-e68910bd-backup.hg
806 $ hg strip -r 0
806 $ hg strip -r 0
807 saved backup bundle to $TESTTMP/doublebundle/.hg/strip-backup/3903775176ed-54390173-backup.hg
807 saved backup bundle to $TESTTMP/doublebundle/.hg/strip-backup/3903775176ed-54390173-backup.hg
808 $ ls .hg/strip-backup
808 $ ls .hg/strip-backup
809 3903775176ed-54390173-backup.hg
809 3903775176ed-54390173-backup.hg
810 3903775176ed-e68910bd-backup.hg
810 3903775176ed-e68910bd-backup.hg
811 #endif
811 #endif
812 $ cd ..
812 $ cd ..
813
813
814 Test that we only bundle the stripped changesets (issue4736)
814 Test that we only bundle the stripped changesets (issue4736)
815 ------------------------------------------------------------
815 ------------------------------------------------------------
816
816
817 initialization (previous repo is empty anyway)
817 initialization (previous repo is empty anyway)
818
818
819 $ hg init issue4736
819 $ hg init issue4736
820 $ cd issue4736
820 $ cd issue4736
821 $ echo a > a
821 $ echo a > a
822 $ hg add a
822 $ hg add a
823 $ hg commit -m commitA
823 $ hg commit -m commitA
824 $ echo b > b
824 $ echo b > b
825 $ hg add b
825 $ hg add b
826 $ hg commit -m commitB
826 $ hg commit -m commitB
827 $ echo c > c
827 $ echo c > c
828 $ hg add c
828 $ hg add c
829 $ hg commit -m commitC
829 $ hg commit -m commitC
830 $ hg up 'desc(commitB)'
830 $ hg up 'desc(commitB)'
831 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
831 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
832 $ echo d > d
832 $ echo d > d
833 $ hg add d
833 $ hg add d
834 $ hg commit -m commitD
834 $ hg commit -m commitD
835 created new head
835 created new head
836 $ hg up 'desc(commitC)'
836 $ hg up 'desc(commitC)'
837 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
837 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
838 $ hg merge 'desc(commitD)'
838 $ hg merge 'desc(commitD)'
839 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
839 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
840 (branch merge, don't forget to commit)
840 (branch merge, don't forget to commit)
841 $ hg ci -m 'mergeCD'
841 $ hg ci -m 'mergeCD'
842 $ hg log -G
842 $ hg log -G
843 @ changeset: 4:d8db9d137221
843 @ changeset: 4:d8db9d137221
844 |\ tag: tip
844 |\ tag: tip
845 | | parent: 2:5c51d8d6557d
845 | | parent: 2:5c51d8d6557d
846 | | parent: 3:6625a5168474
846 | | parent: 3:6625a5168474
847 | | user: test
847 | | user: test
848 | | date: Thu Jan 01 00:00:00 1970 +0000
848 | | date: Thu Jan 01 00:00:00 1970 +0000
849 | | summary: mergeCD
849 | | summary: mergeCD
850 | |
850 | |
851 | o changeset: 3:6625a5168474
851 | o changeset: 3:6625a5168474
852 | | parent: 1:eca11cf91c71
852 | | parent: 1:eca11cf91c71
853 | | user: test
853 | | user: test
854 | | date: Thu Jan 01 00:00:00 1970 +0000
854 | | date: Thu Jan 01 00:00:00 1970 +0000
855 | | summary: commitD
855 | | summary: commitD
856 | |
856 | |
857 o | changeset: 2:5c51d8d6557d
857 o | changeset: 2:5c51d8d6557d
858 |/ user: test
858 |/ user: test
859 | date: Thu Jan 01 00:00:00 1970 +0000
859 | date: Thu Jan 01 00:00:00 1970 +0000
860 | summary: commitC
860 | summary: commitC
861 |
861 |
862 o changeset: 1:eca11cf91c71
862 o changeset: 1:eca11cf91c71
863 | user: test
863 | user: test
864 | date: Thu Jan 01 00:00:00 1970 +0000
864 | date: Thu Jan 01 00:00:00 1970 +0000
865 | summary: commitB
865 | summary: commitB
866 |
866 |
867 o changeset: 0:105141ef12d0
867 o changeset: 0:105141ef12d0
868 user: test
868 user: test
869 date: Thu Jan 01 00:00:00 1970 +0000
869 date: Thu Jan 01 00:00:00 1970 +0000
870 summary: commitA
870 summary: commitA
871
871
872
872
873 Check bundle behavior:
873 Check bundle behavior:
874
874
875 $ hg bundle -r 'desc(mergeCD)' --base 'desc(commitC)' ../issue4736.hg
875 $ hg bundle -r 'desc(mergeCD)' --base 'desc(commitC)' ../issue4736.hg
876 2 changesets found
876 2 changesets found
877 #if repobundlerepo
877 #if repobundlerepo
878 $ hg log -r 'bundle()' -R ../issue4736.hg
878 $ hg log -r 'bundle()' -R ../issue4736.hg
879 changeset: 3:6625a5168474
879 changeset: 3:6625a5168474
880 parent: 1:eca11cf91c71
880 parent: 1:eca11cf91c71
881 user: test
881 user: test
882 date: Thu Jan 01 00:00:00 1970 +0000
882 date: Thu Jan 01 00:00:00 1970 +0000
883 summary: commitD
883 summary: commitD
884
884
885 changeset: 4:d8db9d137221
885 changeset: 4:d8db9d137221
886 tag: tip
886 tag: tip
887 parent: 2:5c51d8d6557d
887 parent: 2:5c51d8d6557d
888 parent: 3:6625a5168474
888 parent: 3:6625a5168474
889 user: test
889 user: test
890 date: Thu Jan 01 00:00:00 1970 +0000
890 date: Thu Jan 01 00:00:00 1970 +0000
891 summary: mergeCD
891 summary: mergeCD
892
892
893 #endif
893 #endif
894
894
895 check strip behavior
895 check strip behavior
896
896
897 $ hg --config extensions.strip= strip 'desc(commitD)' --debug
897 $ hg --config extensions.strip= strip 'desc(commitD)' --debug
898 resolving manifests
898 resolving manifests
899 branchmerge: False, force: True, partial: False
899 branchmerge: False, force: True, partial: False
900 ancestor: d8db9d137221+, local: d8db9d137221+, remote: eca11cf91c71
900 ancestor: d8db9d137221+, local: d8db9d137221+, remote: eca11cf91c71
901 c: other deleted -> r
901 c: other deleted -> r
902 removing c
902 removing c
903 d: other deleted -> r
903 d: other deleted -> r
904 removing d
904 removing d
905 starting 4 threads for background file closing (?)
905 starting 4 threads for background file closing (?)
906 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
906 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
907 2 changesets found
907 2 changesets found
908 list of changesets:
908 list of changesets:
909 6625a516847449b6f0fa3737b9ba56e9f0f3032c
909 6625a516847449b6f0fa3737b9ba56e9f0f3032c
910 d8db9d1372214336d2b5570f20ee468d2c72fa8b
910 d8db9d1372214336d2b5570f20ee468d2c72fa8b
911 bundle2-output-bundle: "HG20", (1 params) 3 parts total
911 bundle2-output-bundle: "HG20", (1 params) 3 parts total
912 bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload
912 bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload
913 bundle2-output-part: "cache:rev-branch-cache" (advisory) streamed payload
913 bundle2-output-part: "cache:rev-branch-cache" (advisory) streamed payload
914 bundle2-output-part: "phase-heads" 24 bytes payload
914 bundle2-output-part: "phase-heads" 24 bytes payload
915 saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/6625a5168474-345bb43d-backup.hg
915 saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/6625a5168474-345bb43d-backup.hg
916 updating the branch cache
916 updating the branch cache
917 invalid branch cache (served): tip differs
917 invalid branch cache (served): tip differs
918 $ hg log -G
918 $ hg log -G
919 o changeset: 2:5c51d8d6557d
919 o changeset: 2:5c51d8d6557d
920 | tag: tip
920 | tag: tip
921 | user: test
921 | user: test
922 | date: Thu Jan 01 00:00:00 1970 +0000
922 | date: Thu Jan 01 00:00:00 1970 +0000
923 | summary: commitC
923 | summary: commitC
924 |
924 |
925 @ changeset: 1:eca11cf91c71
925 @ changeset: 1:eca11cf91c71
926 | user: test
926 | user: test
927 | date: Thu Jan 01 00:00:00 1970 +0000
927 | date: Thu Jan 01 00:00:00 1970 +0000
928 | summary: commitB
928 | summary: commitB
929 |
929 |
930 o changeset: 0:105141ef12d0
930 o changeset: 0:105141ef12d0
931 user: test
931 user: test
932 date: Thu Jan 01 00:00:00 1970 +0000
932 date: Thu Jan 01 00:00:00 1970 +0000
933 summary: commitA
933 summary: commitA
934
934
935
935
936 strip backup content
936 strip backup content
937
937
938 #if repobundlerepo
938 #if repobundlerepo
939 $ hg log -r 'bundle()' -R .hg/strip-backup/6625a5168474-*-backup.hg
939 $ hg log -r 'bundle()' -R .hg/strip-backup/6625a5168474-*-backup.hg
940 changeset: 3:6625a5168474
940 changeset: 3:6625a5168474
941 parent: 1:eca11cf91c71
941 parent: 1:eca11cf91c71
942 user: test
942 user: test
943 date: Thu Jan 01 00:00:00 1970 +0000
943 date: Thu Jan 01 00:00:00 1970 +0000
944 summary: commitD
944 summary: commitD
945
945
946 changeset: 4:d8db9d137221
946 changeset: 4:d8db9d137221
947 tag: tip
947 tag: tip
948 parent: 2:5c51d8d6557d
948 parent: 2:5c51d8d6557d
949 parent: 3:6625a5168474
949 parent: 3:6625a5168474
950 user: test
950 user: test
951 date: Thu Jan 01 00:00:00 1970 +0000
951 date: Thu Jan 01 00:00:00 1970 +0000
952 summary: mergeCD
952 summary: mergeCD
953
953
954
954
955 #endif
955 #endif
956
956
957 Check that the phase cache is properly invalidated after a strip with bookmark.
957 Check that the phase cache is properly invalidated after a strip with bookmark.
958
958
959 $ cat > ../stripstalephasecache.py << EOF
959 $ cat > ../stripstalephasecache.py << EOF
960 > from mercurial import extensions, localrepo
960 > from mercurial import extensions, localrepo
961 > def transactioncallback(orig, repo, desc, *args, **kwargs):
961 > def transactioncallback(orig, repo, desc, *args, **kwargs):
962 > def test(transaction):
962 > def test(transaction):
963 > # observe cache inconsistency
963 > # observe cache inconsistency
964 > try:
964 > try:
965 > [repo.changelog.node(r) for r in repo.revs(b"not public()")]
965 > [repo.changelog.node(r) for r in repo.revs(b"not public()")]
966 > except IndexError:
966 > except IndexError:
967 > repo.ui.status(b"Index error!\n")
967 > repo.ui.status(b"Index error!\n")
968 > transaction = orig(repo, desc, *args, **kwargs)
968 > transaction = orig(repo, desc, *args, **kwargs)
969 > # warm up the phase cache
969 > # warm up the phase cache
970 > list(repo.revs(b"not public()"))
970 > list(repo.revs(b"not public()"))
971 > if desc != b'strip':
971 > if desc != b'strip':
972 > transaction.addpostclose(b"phase invalidation test", test)
972 > transaction.addpostclose(b"phase invalidation test", test)
973 > return transaction
973 > return transaction
974 > def extsetup(ui):
974 > def extsetup(ui):
975 > extensions.wrapfunction(localrepo.localrepository, b"transaction",
975 > extensions.wrapfunction(localrepo.localrepository, b"transaction",
976 > transactioncallback)
976 > transactioncallback)
977 > EOF
977 > EOF
978 $ hg up -C 2
978 $ hg up -C 2
979 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
979 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
980 $ echo k > k
980 $ echo k > k
981 $ hg add k
981 $ hg add k
982 $ hg commit -m commitK
982 $ hg commit -m commitK
983 $ echo l > l
983 $ echo l > l
984 $ hg add l
984 $ hg add l
985 $ hg commit -m commitL
985 $ hg commit -m commitL
986 $ hg book -r tip blah
986 $ hg book -r tip blah
987 $ hg strip ".^" --config extensions.crash=$TESTTMP/stripstalephasecache.py
987 $ hg strip ".^" --config extensions.crash=$TESTTMP/stripstalephasecache.py
988 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
988 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
989 saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/8f0b4384875c-4fa10deb-backup.hg
989 saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/8f0b4384875c-4fa10deb-backup.hg
990 $ hg up -C 1
990 $ hg up -C 1
991 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
991 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
992
992
993 Error during post-close callback of the strip transaction
993 Error during post-close callback of the strip transaction
994 (They should be gracefully handled and reported)
994 (They should be gracefully handled and reported)
995
995
996 $ cat > ../crashstrip.py << EOF
996 $ cat > ../crashstrip.py << EOF
997 > from mercurial import error
997 > from mercurial import error
998 > def reposetup(ui, repo):
998 > def reposetup(ui, repo):
999 > class crashstriprepo(repo.__class__):
999 > class crashstriprepo(repo.__class__):
1000 > def transaction(self, desc, *args, **kwargs):
1000 > def transaction(self, desc, *args, **kwargs):
1001 > tr = super(crashstriprepo, self).transaction(desc, *args, **kwargs)
1001 > tr = super(crashstriprepo, self).transaction(desc, *args, **kwargs)
1002 > if desc == b'strip':
1002 > if desc == b'strip':
1003 > def crash(tra): raise error.Abort(b'boom')
1003 > def crash(tra): raise error.Abort(b'boom')
1004 > tr.addpostclose(b'crash', crash)
1004 > tr.addpostclose(b'crash', crash)
1005 > return tr
1005 > return tr
1006 > repo.__class__ = crashstriprepo
1006 > repo.__class__ = crashstriprepo
1007 > EOF
1007 > EOF
1008 $ hg strip tip --config extensions.crash=$TESTTMP/crashstrip.py
1008 $ hg strip tip --config extensions.crash=$TESTTMP/crashstrip.py
1009 saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/5c51d8d6557d-70daef06-backup.hg
1009 saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/5c51d8d6557d-70daef06-backup.hg
1010 strip failed, backup bundle stored in '$TESTTMP/issue4736/.hg/strip-backup/5c51d8d6557d-70daef06-backup.hg'
1010 strip failed, backup bundle stored in '$TESTTMP/issue4736/.hg/strip-backup/5c51d8d6557d-70daef06-backup.hg'
1011 abort: boom
1011 abort: boom
1012 [255]
1012 [255]
1013
1013
1014 test stripping a working directory parent doesn't switch named branches
1014 test stripping a working directory parent doesn't switch named branches
1015
1015
1016 $ hg log -G
1016 $ hg log -G
1017 @ changeset: 1:eca11cf91c71
1017 @ changeset: 1:eca11cf91c71
1018 | tag: tip
1018 | tag: tip
1019 | user: test
1019 | user: test
1020 | date: Thu Jan 01 00:00:00 1970 +0000
1020 | date: Thu Jan 01 00:00:00 1970 +0000
1021 | summary: commitB
1021 | summary: commitB
1022 |
1022 |
1023 o changeset: 0:105141ef12d0
1023 o changeset: 0:105141ef12d0
1024 user: test
1024 user: test
1025 date: Thu Jan 01 00:00:00 1970 +0000
1025 date: Thu Jan 01 00:00:00 1970 +0000
1026 summary: commitA
1026 summary: commitA
1027
1027
1028
1028
1029 $ hg branch new-branch
1029 $ hg branch new-branch
1030 marked working directory as branch new-branch
1030 marked working directory as branch new-branch
1031 (branches are permanent and global, did you want a bookmark?)
1031 (branches are permanent and global, did you want a bookmark?)
1032 $ hg ci -m "start new branch"
1032 $ hg ci -m "start new branch"
1033 $ echo 'foo' > foo.txt
1033 $ echo 'foo' > foo.txt
1034 $ hg ci -Aqm foo
1034 $ hg ci -Aqm foo
1035 $ hg up default
1035 $ hg up default
1036 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1036 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1037 $ echo 'bar' > bar.txt
1037 $ echo 'bar' > bar.txt
1038 $ hg ci -Aqm bar
1038 $ hg ci -Aqm bar
1039 $ hg up new-branch
1039 $ hg up new-branch
1040 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
1040 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
1041 $ hg merge default
1041 $ hg merge default
1042 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1042 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1043 (branch merge, don't forget to commit)
1043 (branch merge, don't forget to commit)
1044 $ hg log -G
1044 $ hg log -G
1045 @ changeset: 4:35358f982181
1045 @ changeset: 4:35358f982181
1046 | tag: tip
1046 | tag: tip
1047 | parent: 1:eca11cf91c71
1047 | parent: 1:eca11cf91c71
1048 | user: test
1048 | user: test
1049 | date: Thu Jan 01 00:00:00 1970 +0000
1049 | date: Thu Jan 01 00:00:00 1970 +0000
1050 | summary: bar
1050 | summary: bar
1051 |
1051 |
1052 | @ changeset: 3:f62c6c09b707
1052 | @ changeset: 3:f62c6c09b707
1053 | | branch: new-branch
1053 | | branch: new-branch
1054 | | user: test
1054 | | user: test
1055 | | date: Thu Jan 01 00:00:00 1970 +0000
1055 | | date: Thu Jan 01 00:00:00 1970 +0000
1056 | | summary: foo
1056 | | summary: foo
1057 | |
1057 | |
1058 | o changeset: 2:b1d33a8cadd9
1058 | o changeset: 2:b1d33a8cadd9
1059 |/ branch: new-branch
1059 |/ branch: new-branch
1060 | user: test
1060 | user: test
1061 | date: Thu Jan 01 00:00:00 1970 +0000
1061 | date: Thu Jan 01 00:00:00 1970 +0000
1062 | summary: start new branch
1062 | summary: start new branch
1063 |
1063 |
1064 o changeset: 1:eca11cf91c71
1064 o changeset: 1:eca11cf91c71
1065 | user: test
1065 | user: test
1066 | date: Thu Jan 01 00:00:00 1970 +0000
1066 | date: Thu Jan 01 00:00:00 1970 +0000
1067 | summary: commitB
1067 | summary: commitB
1068 |
1068 |
1069 o changeset: 0:105141ef12d0
1069 o changeset: 0:105141ef12d0
1070 user: test
1070 user: test
1071 date: Thu Jan 01 00:00:00 1970 +0000
1071 date: Thu Jan 01 00:00:00 1970 +0000
1072 summary: commitA
1072 summary: commitA
1073
1073
1074
1074
1075 $ hg strip --force -r 35358f982181
1075 $ hg strip --force -r 35358f982181
1076 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1076 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1077 saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/35358f982181-50d992d4-backup.hg
1077 saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/35358f982181-50d992d4-backup.hg
1078 $ hg log -G
1078 $ hg log -G
1079 @ changeset: 3:f62c6c09b707
1079 @ changeset: 3:f62c6c09b707
1080 | branch: new-branch
1080 | branch: new-branch
1081 | tag: tip
1081 | tag: tip
1082 | user: test
1082 | user: test
1083 | date: Thu Jan 01 00:00:00 1970 +0000
1083 | date: Thu Jan 01 00:00:00 1970 +0000
1084 | summary: foo
1084 | summary: foo
1085 |
1085 |
1086 o changeset: 2:b1d33a8cadd9
1086 o changeset: 2:b1d33a8cadd9
1087 | branch: new-branch
1087 | branch: new-branch
1088 | user: test
1088 | user: test
1089 | date: Thu Jan 01 00:00:00 1970 +0000
1089 | date: Thu Jan 01 00:00:00 1970 +0000
1090 | summary: start new branch
1090 | summary: start new branch
1091 |
1091 |
1092 o changeset: 1:eca11cf91c71
1092 o changeset: 1:eca11cf91c71
1093 | user: test
1093 | user: test
1094 | date: Thu Jan 01 00:00:00 1970 +0000
1094 | date: Thu Jan 01 00:00:00 1970 +0000
1095 | summary: commitB
1095 | summary: commitB
1096 |
1096 |
1097 o changeset: 0:105141ef12d0
1097 o changeset: 0:105141ef12d0
1098 user: test
1098 user: test
1099 date: Thu Jan 01 00:00:00 1970 +0000
1099 date: Thu Jan 01 00:00:00 1970 +0000
1100 summary: commitA
1100 summary: commitA
1101
1101
1102
1102
1103 $ hg up default
1103 $ hg up default
1104 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1104 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1105 $ echo 'bar' > bar.txt
1105 $ echo 'bar' > bar.txt
1106 $ hg ci -Aqm bar
1106 $ hg ci -Aqm bar
1107 $ hg up new-branch
1107 $ hg up new-branch
1108 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
1108 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
1109 $ hg merge default
1109 $ hg merge default
1110 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1110 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1111 (branch merge, don't forget to commit)
1111 (branch merge, don't forget to commit)
1112 $ hg ci -m merge
1112 $ hg ci -m merge
1113 $ hg log -G
1113 $ hg log -G
1114 @ changeset: 5:4cf5e92caec2
1114 @ changeset: 5:4cf5e92caec2
1115 |\ branch: new-branch
1115 |\ branch: new-branch
1116 | | tag: tip
1116 | | tag: tip
1117 | | parent: 3:f62c6c09b707
1117 | | parent: 3:f62c6c09b707
1118 | | parent: 4:35358f982181
1118 | | parent: 4:35358f982181
1119 | | user: test
1119 | | user: test
1120 | | date: Thu Jan 01 00:00:00 1970 +0000
1120 | | date: Thu Jan 01 00:00:00 1970 +0000
1121 | | summary: merge
1121 | | summary: merge
1122 | |
1122 | |
1123 | o changeset: 4:35358f982181
1123 | o changeset: 4:35358f982181
1124 | | parent: 1:eca11cf91c71
1124 | | parent: 1:eca11cf91c71
1125 | | user: test
1125 | | user: test
1126 | | date: Thu Jan 01 00:00:00 1970 +0000
1126 | | date: Thu Jan 01 00:00:00 1970 +0000
1127 | | summary: bar
1127 | | summary: bar
1128 | |
1128 | |
1129 o | changeset: 3:f62c6c09b707
1129 o | changeset: 3:f62c6c09b707
1130 | | branch: new-branch
1130 | | branch: new-branch
1131 | | user: test
1131 | | user: test
1132 | | date: Thu Jan 01 00:00:00 1970 +0000
1132 | | date: Thu Jan 01 00:00:00 1970 +0000
1133 | | summary: foo
1133 | | summary: foo
1134 | |
1134 | |
1135 o | changeset: 2:b1d33a8cadd9
1135 o | changeset: 2:b1d33a8cadd9
1136 |/ branch: new-branch
1136 |/ branch: new-branch
1137 | user: test
1137 | user: test
1138 | date: Thu Jan 01 00:00:00 1970 +0000
1138 | date: Thu Jan 01 00:00:00 1970 +0000
1139 | summary: start new branch
1139 | summary: start new branch
1140 |
1140 |
1141 o changeset: 1:eca11cf91c71
1141 o changeset: 1:eca11cf91c71
1142 | user: test
1142 | user: test
1143 | date: Thu Jan 01 00:00:00 1970 +0000
1143 | date: Thu Jan 01 00:00:00 1970 +0000
1144 | summary: commitB
1144 | summary: commitB
1145 |
1145 |
1146 o changeset: 0:105141ef12d0
1146 o changeset: 0:105141ef12d0
1147 user: test
1147 user: test
1148 date: Thu Jan 01 00:00:00 1970 +0000
1148 date: Thu Jan 01 00:00:00 1970 +0000
1149 summary: commitA
1149 summary: commitA
1150
1150
1151
1151
1152 $ hg strip -r 35358f982181
1152 $ hg strip -r 35358f982181
1153 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1153 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1154 saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/35358f982181-a6f020aa-backup.hg
1154 saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/35358f982181-a6f020aa-backup.hg
1155 $ hg log -G
1155 $ hg log -G
1156 @ changeset: 3:f62c6c09b707
1156 @ changeset: 3:f62c6c09b707
1157 | branch: new-branch
1157 | branch: new-branch
1158 | tag: tip
1158 | tag: tip
1159 | user: test
1159 | user: test
1160 | date: Thu Jan 01 00:00:00 1970 +0000
1160 | date: Thu Jan 01 00:00:00 1970 +0000
1161 | summary: foo
1161 | summary: foo
1162 |
1162 |
1163 o changeset: 2:b1d33a8cadd9
1163 o changeset: 2:b1d33a8cadd9
1164 | branch: new-branch
1164 | branch: new-branch
1165 | user: test
1165 | user: test
1166 | date: Thu Jan 01 00:00:00 1970 +0000
1166 | date: Thu Jan 01 00:00:00 1970 +0000
1167 | summary: start new branch
1167 | summary: start new branch
1168 |
1168 |
1169 o changeset: 1:eca11cf91c71
1169 o changeset: 1:eca11cf91c71
1170 | user: test
1170 | user: test
1171 | date: Thu Jan 01 00:00:00 1970 +0000
1171 | date: Thu Jan 01 00:00:00 1970 +0000
1172 | summary: commitB
1172 | summary: commitB
1173 |
1173 |
1174 o changeset: 0:105141ef12d0
1174 o changeset: 0:105141ef12d0
1175 user: test
1175 user: test
1176 date: Thu Jan 01 00:00:00 1970 +0000
1176 date: Thu Jan 01 00:00:00 1970 +0000
1177 summary: commitA
1177 summary: commitA
1178
1178
1179
1179
1180 stripping a set containing a merge properly reset file content, including items on other branches
1181
1182 The added file is moved to unknown, which is the behavior we have been seeing for other `hg strip --keep` call.
1183
1184 stripping a set containing a merge properly reset file content, including items on other branches
1185
1186 The added file is moved to unknown, which is the behavior we have been seeing for other `hg strip --keep` call.
1187
1180 $ hg unbundle -u $TESTTMP/issue4736/.hg/strip-backup/35358f982181-a6f020aa-backup.hg
1188 $ hg unbundle -u $TESTTMP/issue4736/.hg/strip-backup/35358f982181-a6f020aa-backup.hg
1181 adding changesets
1189 adding changesets
1182 adding manifests
1190 adding manifests
1183 adding file changes
1191 adding file changes
1184 added 2 changesets with 1 changes to 1 files
1192 added 2 changesets with 1 changes to 1 files
1185 new changesets 35358f982181:4cf5e92caec2 (2 drafts)
1193 new changesets 35358f982181:4cf5e92caec2 (2 drafts)
1186 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1194 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1187
1195
1196 $ hg id
1197 4cf5e92caec2 (new-branch) tip
1198 $ hg status --rev "f62c6c09b707"
1199 A bar.txt
1200 $ hg diff --rev "f62c6c09b707"
1201 diff -r f62c6c09b707 bar.txt
1202 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1203 +++ b/bar.txt Thu Jan 01 00:00:00 1970 +0000
1204 @@ -0,0 +1,1 @@
1205 +bar
1206 $ hg log -G -v --rev 35358f982181:: --patch
1207 @ changeset: 5:4cf5e92caec2
1208 |\ branch: new-branch
1209 | ~ tag: tip
1210 | parent: 3:f62c6c09b707
1211 | parent: 4:35358f982181
1212 | user: test
1213 | date: Thu Jan 01 00:00:00 1970 +0000
1214 | description:
1215 | merge
1216 |
1217 |
1218 | diff -r f62c6c09b707 -r 4cf5e92caec2 bar.txt
1219 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1220 | +++ b/bar.txt Thu Jan 01 00:00:00 1970 +0000
1221 | @@ -0,0 +1,1 @@
1222 | +bar
1223 |
1224 o changeset: 4:35358f982181
1225 | parent: 1:eca11cf91c71
1226 ~ user: test
1227 date: Thu Jan 01 00:00:00 1970 +0000
1228 files: bar.txt
1229 description:
1230 bar
1231
1232
1233 diff -r eca11cf91c71 -r 35358f982181 bar.txt
1234 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1235 +++ b/bar.txt Thu Jan 01 00:00:00 1970 +0000
1236 @@ -0,0 +1,1 @@
1237 +bar
1238
1239
1188 $ hg strip -k -r 35358f982181
1240 $ hg strip -k -r 35358f982181
1189 saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/35358f982181-a6f020aa-backup.hg
1241 saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/35358f982181-a6f020aa-backup.hg
1190 $ hg log -G
1242 $ hg log -G
1191 @ changeset: 3:f62c6c09b707
1243 @ changeset: 3:f62c6c09b707
1192 | branch: new-branch
1244 | branch: new-branch
1193 | tag: tip
1245 | tag: tip
1194 | user: test
1246 | user: test
1195 | date: Thu Jan 01 00:00:00 1970 +0000
1247 | date: Thu Jan 01 00:00:00 1970 +0000
1196 | summary: foo
1248 | summary: foo
1197 |
1249 |
1198 o changeset: 2:b1d33a8cadd9
1250 o changeset: 2:b1d33a8cadd9
1199 | branch: new-branch
1251 | branch: new-branch
1200 | user: test
1252 | user: test
1201 | date: Thu Jan 01 00:00:00 1970 +0000
1253 | date: Thu Jan 01 00:00:00 1970 +0000
1202 | summary: start new branch
1254 | summary: start new branch
1203 |
1255 |
1204 o changeset: 1:eca11cf91c71
1256 o changeset: 1:eca11cf91c71
1205 | user: test
1257 | user: test
1206 | date: Thu Jan 01 00:00:00 1970 +0000
1258 | date: Thu Jan 01 00:00:00 1970 +0000
1207 | summary: commitB
1259 | summary: commitB
1208 |
1260 |
1209 o changeset: 0:105141ef12d0
1261 o changeset: 0:105141ef12d0
1210 user: test
1262 user: test
1211 date: Thu Jan 01 00:00:00 1970 +0000
1263 date: Thu Jan 01 00:00:00 1970 +0000
1212 summary: commitA
1264 summary: commitA
1213
1265
1214 $ hg diff
1266
1215 diff -r f62c6c09b707 bar.txt
1267 $ hg status -A
1216 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1268 ? bar.txt
1217 +++ b/bar.txt Thu Jan 01 00:00:00 1970 +0000
1269 C a
1218 @@ -0,0 +1,1 @@
1270 C b
1219 +bar
1271 C foo.txt
1272 $ cat bar.txt
1273 bar
1220
1274
1221 Use delayedstrip to strip inside a transaction
1275 Use delayedstrip to strip inside a transaction
1222
1276
1223 $ cd $TESTTMP
1277 $ cd $TESTTMP
1224 $ hg init delayedstrip
1278 $ hg init delayedstrip
1225 $ cd delayedstrip
1279 $ cd delayedstrip
1226 $ hg debugdrawdag <<'EOS'
1280 $ hg debugdrawdag <<'EOS'
1227 > D
1281 > D
1228 > |
1282 > |
1229 > C F H # Commit on top of "I",
1283 > C F H # Commit on top of "I",
1230 > | |/| # Strip B+D+I+E+G+H+Z
1284 > | |/| # Strip B+D+I+E+G+H+Z
1231 > I B E G
1285 > I B E G
1232 > \|/
1286 > \|/
1233 > A Z
1287 > A Z
1234 > EOS
1288 > EOS
1235 $ cp -R . ../scmutilcleanup
1289 $ cp -R . ../scmutilcleanup
1236
1290
1237 $ hg up -C I
1291 $ hg up -C I
1238 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1292 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1239 $ echo 3 >> I
1293 $ echo 3 >> I
1240 $ cat > $TESTTMP/delayedstrip.py <<EOF
1294 $ cat > $TESTTMP/delayedstrip.py <<EOF
1241 > from __future__ import absolute_import
1295 > from __future__ import absolute_import
1242 > from mercurial import commands, registrar, repair
1296 > from mercurial import commands, registrar, repair
1243 > cmdtable = {}
1297 > cmdtable = {}
1244 > command = registrar.command(cmdtable)
1298 > command = registrar.command(cmdtable)
1245 > @command(b'testdelayedstrip')
1299 > @command(b'testdelayedstrip')
1246 > def testdelayedstrip(ui, repo):
1300 > def testdelayedstrip(ui, repo):
1247 > def getnodes(expr):
1301 > def getnodes(expr):
1248 > return [repo.changelog.node(r) for r in repo.revs(expr)]
1302 > return [repo.changelog.node(r) for r in repo.revs(expr)]
1249 > with repo.wlock():
1303 > with repo.wlock():
1250 > with repo.lock():
1304 > with repo.lock():
1251 > with repo.transaction(b'delayedstrip'):
1305 > with repo.transaction(b'delayedstrip'):
1252 > repair.delayedstrip(ui, repo, getnodes(b'B+I+Z+D+E'), b'J')
1306 > repair.delayedstrip(ui, repo, getnodes(b'B+I+Z+D+E'), b'J')
1253 > repair.delayedstrip(ui, repo, getnodes(b'G+H+Z'), b'I')
1307 > repair.delayedstrip(ui, repo, getnodes(b'G+H+Z'), b'I')
1254 > commands.commit(ui, repo, message=b'J', date=b'0 0')
1308 > commands.commit(ui, repo, message=b'J', date=b'0 0')
1255 > EOF
1309 > EOF
1256 $ hg testdelayedstrip --config extensions.t=$TESTTMP/delayedstrip.py
1310 $ hg testdelayedstrip --config extensions.t=$TESTTMP/delayedstrip.py
1257 warning: orphaned descendants detected, not stripping 08ebfeb61bac, 112478962961, 7fb047a69f22
1311 warning: orphaned descendants detected, not stripping 08ebfeb61bac, 112478962961, 7fb047a69f22
1258 saved backup bundle to $TESTTMP/delayedstrip/.hg/strip-backup/f585351a92f8-17475721-I.hg
1312 saved backup bundle to $TESTTMP/delayedstrip/.hg/strip-backup/f585351a92f8-17475721-I.hg
1259
1313
1260 $ hg log -G -T '{rev}:{node|short} {desc}' -r 'sort(all(), topo)'
1314 $ hg log -G -T '{rev}:{node|short} {desc}' -r 'sort(all(), topo)'
1261 @ 6:2f2d51af6205 J
1315 @ 6:2f2d51af6205 J
1262 |
1316 |
1263 o 3:08ebfeb61bac I
1317 o 3:08ebfeb61bac I
1264 |
1318 |
1265 | o 5:64a8289d2492 F
1319 | o 5:64a8289d2492 F
1266 | |
1320 | |
1267 | o 2:7fb047a69f22 E
1321 | o 2:7fb047a69f22 E
1268 |/
1322 |/
1269 | o 4:26805aba1e60 C
1323 | o 4:26805aba1e60 C
1270 | |
1324 | |
1271 | o 1:112478962961 B
1325 | o 1:112478962961 B
1272 |/
1326 |/
1273 o 0:426bada5c675 A
1327 o 0:426bada5c675 A
1274
1328
1275 Test high-level scmutil.cleanupnodes API
1329 Test high-level scmutil.cleanupnodes API
1276
1330
1277 $ cd $TESTTMP/scmutilcleanup
1331 $ cd $TESTTMP/scmutilcleanup
1278 $ hg debugdrawdag <<'EOS'
1332 $ hg debugdrawdag <<'EOS'
1279 > D2 F2 G2 # D2, F2, G2 are replacements for D, F, G
1333 > D2 F2 G2 # D2, F2, G2 are replacements for D, F, G
1280 > | | |
1334 > | | |
1281 > C H G
1335 > C H G
1282 > EOS
1336 > EOS
1283 $ for i in B C D F G I Z; do
1337 $ for i in B C D F G I Z; do
1284 > hg bookmark -i -r $i b-$i
1338 > hg bookmark -i -r $i b-$i
1285 > done
1339 > done
1286 $ hg bookmark -i -r E 'b-F@divergent1'
1340 $ hg bookmark -i -r E 'b-F@divergent1'
1287 $ hg bookmark -i -r H 'b-F@divergent2'
1341 $ hg bookmark -i -r H 'b-F@divergent2'
1288 $ hg bookmark -i -r G 'b-F@divergent3'
1342 $ hg bookmark -i -r G 'b-F@divergent3'
1289 $ cp -R . ../scmutilcleanup.obsstore
1343 $ cp -R . ../scmutilcleanup.obsstore
1290
1344
1291 $ cat > $TESTTMP/scmutilcleanup.py <<EOF
1345 $ cat > $TESTTMP/scmutilcleanup.py <<EOF
1292 > from mercurial import registrar, scmutil
1346 > from mercurial import registrar, scmutil
1293 > cmdtable = {}
1347 > cmdtable = {}
1294 > command = registrar.command(cmdtable)
1348 > command = registrar.command(cmdtable)
1295 > @command(b'testnodescleanup')
1349 > @command(b'testnodescleanup')
1296 > def testnodescleanup(ui, repo):
1350 > def testnodescleanup(ui, repo):
1297 > def nodes(expr):
1351 > def nodes(expr):
1298 > return [repo.changelog.node(r) for r in repo.revs(expr)]
1352 > return [repo.changelog.node(r) for r in repo.revs(expr)]
1299 > def node(expr):
1353 > def node(expr):
1300 > return nodes(expr)[0]
1354 > return nodes(expr)[0]
1301 > with repo.wlock():
1355 > with repo.wlock():
1302 > with repo.lock():
1356 > with repo.lock():
1303 > with repo.transaction(b'delayedstrip'):
1357 > with repo.transaction(b'delayedstrip'):
1304 > mapping = {node(b'F'): [node(b'F2')],
1358 > mapping = {node(b'F'): [node(b'F2')],
1305 > node(b'D'): [node(b'D2')],
1359 > node(b'D'): [node(b'D2')],
1306 > node(b'G'): [node(b'G2')]}
1360 > node(b'G'): [node(b'G2')]}
1307 > scmutil.cleanupnodes(repo, mapping, b'replace')
1361 > scmutil.cleanupnodes(repo, mapping, b'replace')
1308 > scmutil.cleanupnodes(repo, nodes(b'((B::)+I+Z)-D2-obsolete()'),
1362 > scmutil.cleanupnodes(repo, nodes(b'((B::)+I+Z)-D2-obsolete()'),
1309 > b'replace')
1363 > b'replace')
1310 > EOF
1364 > EOF
1311 $ hg testnodescleanup --config extensions.t=$TESTTMP/scmutilcleanup.py
1365 $ hg testnodescleanup --config extensions.t=$TESTTMP/scmutilcleanup.py
1312 warning: orphaned descendants detected, not stripping 112478962961, 1fc8102cda62, 26805aba1e60
1366 warning: orphaned descendants detected, not stripping 112478962961, 1fc8102cda62, 26805aba1e60
1313 saved backup bundle to $TESTTMP/scmutilcleanup/.hg/strip-backup/f585351a92f8-73fb7c03-replace.hg
1367 saved backup bundle to $TESTTMP/scmutilcleanup/.hg/strip-backup/f585351a92f8-73fb7c03-replace.hg
1314
1368
1315 $ hg log -G -T '{rev}:{node|short} {desc} {bookmarks}' -r 'sort(all(), topo)'
1369 $ hg log -G -T '{rev}:{node|short} {desc} {bookmarks}' -r 'sort(all(), topo)'
1316 o 8:1473d4b996d1 G2 b-F@divergent3 b-G
1370 o 8:1473d4b996d1 G2 b-F@divergent3 b-G
1317 |
1371 |
1318 | o 7:d11b3456a873 F2 b-F
1372 | o 7:d11b3456a873 F2 b-F
1319 | |
1373 | |
1320 | o 5:5cb05ba470a7 H
1374 | o 5:5cb05ba470a7 H
1321 |/|
1375 |/|
1322 | o 3:7fb047a69f22 E b-F@divergent1
1376 | o 3:7fb047a69f22 E b-F@divergent1
1323 | |
1377 | |
1324 | | o 6:7c78f703e465 D2 b-D
1378 | | o 6:7c78f703e465 D2 b-D
1325 | | |
1379 | | |
1326 | | o 4:26805aba1e60 C
1380 | | o 4:26805aba1e60 C
1327 | | |
1381 | | |
1328 | | o 2:112478962961 B
1382 | | o 2:112478962961 B
1329 | |/
1383 | |/
1330 o | 1:1fc8102cda62 G
1384 o | 1:1fc8102cda62 G
1331 /
1385 /
1332 o 0:426bada5c675 A b-B b-C b-I
1386 o 0:426bada5c675 A b-B b-C b-I
1333
1387
1334 $ hg bookmark
1388 $ hg bookmark
1335 b-B 0:426bada5c675
1389 b-B 0:426bada5c675
1336 b-C 0:426bada5c675
1390 b-C 0:426bada5c675
1337 b-D 6:7c78f703e465
1391 b-D 6:7c78f703e465
1338 b-F 7:d11b3456a873
1392 b-F 7:d11b3456a873
1339 b-F@divergent1 3:7fb047a69f22
1393 b-F@divergent1 3:7fb047a69f22
1340 b-F@divergent3 8:1473d4b996d1
1394 b-F@divergent3 8:1473d4b996d1
1341 b-G 8:1473d4b996d1
1395 b-G 8:1473d4b996d1
1342 b-I 0:426bada5c675
1396 b-I 0:426bada5c675
1343 b-Z -1:000000000000
1397 b-Z -1:000000000000
1344
1398
1345 Test the above using obsstore "by the way". Not directly related to strip, but
1399 Test the above using obsstore "by the way". Not directly related to strip, but
1346 we have reusable code here
1400 we have reusable code here
1347
1401
1348 $ cd $TESTTMP/scmutilcleanup.obsstore
1402 $ cd $TESTTMP/scmutilcleanup.obsstore
1349 $ cat >> .hg/hgrc <<EOF
1403 $ cat >> .hg/hgrc <<EOF
1350 > [experimental]
1404 > [experimental]
1351 > evolution=true
1405 > evolution=true
1352 > evolution.track-operation=1
1406 > evolution.track-operation=1
1353 > EOF
1407 > EOF
1354
1408
1355 $ hg testnodescleanup --config extensions.t=$TESTTMP/scmutilcleanup.py
1409 $ hg testnodescleanup --config extensions.t=$TESTTMP/scmutilcleanup.py
1356 4 new orphan changesets
1410 4 new orphan changesets
1357
1411
1358 $ rm .hg/localtags
1412 $ rm .hg/localtags
1359 $ hg log -G -T '{rev}:{node|short} {desc} {bookmarks}' -r 'sort(all(), topo)'
1413 $ hg log -G -T '{rev}:{node|short} {desc} {bookmarks}' -r 'sort(all(), topo)'
1360 * 12:1473d4b996d1 G2 b-F@divergent3 b-G
1414 * 12:1473d4b996d1 G2 b-F@divergent3 b-G
1361 |
1415 |
1362 | * 11:d11b3456a873 F2 b-F
1416 | * 11:d11b3456a873 F2 b-F
1363 | |
1417 | |
1364 | * 8:5cb05ba470a7 H
1418 | * 8:5cb05ba470a7 H
1365 |/|
1419 |/|
1366 | o 4:7fb047a69f22 E b-F@divergent1
1420 | o 4:7fb047a69f22 E b-F@divergent1
1367 | |
1421 | |
1368 | | * 10:7c78f703e465 D2 b-D
1422 | | * 10:7c78f703e465 D2 b-D
1369 | | |
1423 | | |
1370 | | x 6:26805aba1e60 C
1424 | | x 6:26805aba1e60 C
1371 | | |
1425 | | |
1372 | | x 3:112478962961 B
1426 | | x 3:112478962961 B
1373 | |/
1427 | |/
1374 x | 1:1fc8102cda62 G
1428 x | 1:1fc8102cda62 G
1375 /
1429 /
1376 o 0:426bada5c675 A b-B b-C b-I
1430 o 0:426bada5c675 A b-B b-C b-I
1377
1431
1378 $ hg debugobsolete
1432 $ hg debugobsolete
1379 1fc8102cda6204549f031015641606ccf5513ec3 1473d4b996d1d1b121de6b39fab6a04fbf9d873e 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'operation': 'replace', 'user': 'test'}
1433 1fc8102cda6204549f031015641606ccf5513ec3 1473d4b996d1d1b121de6b39fab6a04fbf9d873e 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'operation': 'replace', 'user': 'test'}
1380 64a8289d249234b9886244d379f15e6b650b28e3 d11b3456a873daec7c7bc53e5622e8df6d741bd2 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'operation': 'replace', 'user': 'test'}
1434 64a8289d249234b9886244d379f15e6b650b28e3 d11b3456a873daec7c7bc53e5622e8df6d741bd2 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'operation': 'replace', 'user': 'test'}
1381 f585351a92f85104bff7c284233c338b10eb1df7 7c78f703e465d73102cc8780667ce269c5208a40 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '9', 'operation': 'replace', 'user': 'test'}
1435 f585351a92f85104bff7c284233c338b10eb1df7 7c78f703e465d73102cc8780667ce269c5208a40 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '9', 'operation': 'replace', 'user': 'test'}
1382 48b9aae0607f43ff110d84e6883c151942add5ab 0 {0000000000000000000000000000000000000000} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'replace', 'user': 'test'}
1436 48b9aae0607f43ff110d84e6883c151942add5ab 0 {0000000000000000000000000000000000000000} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'replace', 'user': 'test'}
1383 112478962961147124edd43549aedd1a335e44bf 0 {426bada5c67598ca65036d57d9e4b64b0c1ce7a0} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'replace', 'user': 'test'}
1437 112478962961147124edd43549aedd1a335e44bf 0 {426bada5c67598ca65036d57d9e4b64b0c1ce7a0} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'replace', 'user': 'test'}
1384 08ebfeb61bac6e3f12079de774d285a0d6689eba 0 {426bada5c67598ca65036d57d9e4b64b0c1ce7a0} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'replace', 'user': 'test'}
1438 08ebfeb61bac6e3f12079de774d285a0d6689eba 0 {426bada5c67598ca65036d57d9e4b64b0c1ce7a0} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'replace', 'user': 'test'}
1385 26805aba1e600a82e93661149f2313866a221a7b 0 {112478962961147124edd43549aedd1a335e44bf} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'replace', 'user': 'test'}
1439 26805aba1e600a82e93661149f2313866a221a7b 0 {112478962961147124edd43549aedd1a335e44bf} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'replace', 'user': 'test'}
1386 $ cd ..
1440 $ cd ..
1387
1441
1388 Test that obsmarkers are restored even when not using generaldelta
1442 Test that obsmarkers are restored even when not using generaldelta
1389
1443
1390 $ hg --config format.usegeneraldelta=no init issue5678
1444 $ hg --config format.usegeneraldelta=no init issue5678
1391 $ cd issue5678
1445 $ cd issue5678
1392 $ cat >> .hg/hgrc <<EOF
1446 $ cat >> .hg/hgrc <<EOF
1393 > [experimental]
1447 > [experimental]
1394 > evolution=true
1448 > evolution=true
1395 > EOF
1449 > EOF
1396 $ echo a > a
1450 $ echo a > a
1397 $ hg ci -Aqm a
1451 $ hg ci -Aqm a
1398 $ hg ci --amend -m a2
1452 $ hg ci --amend -m a2
1399 $ hg debugobsolete
1453 $ hg debugobsolete
1400 cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b 489bac576828490c0bb8d45eac9e5e172e4ec0a8 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 'test'}
1454 cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b 489bac576828490c0bb8d45eac9e5e172e4ec0a8 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 'test'}
1401 $ hg strip .
1455 $ hg strip .
1402 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1456 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1403 saved backup bundle to $TESTTMP/issue5678/.hg/strip-backup/489bac576828-bef27e14-backup.hg
1457 saved backup bundle to $TESTTMP/issue5678/.hg/strip-backup/489bac576828-bef27e14-backup.hg
1404 $ hg unbundle -q .hg/strip-backup/*
1458 $ hg unbundle -q .hg/strip-backup/*
1405 $ hg debugobsolete
1459 $ hg debugobsolete
1406 cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b 489bac576828490c0bb8d45eac9e5e172e4ec0a8 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 'test'}
1460 cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b 489bac576828490c0bb8d45eac9e5e172e4ec0a8 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 'test'}
1407 $ cd ..
1461 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now