##// END OF EJS Templates
bundlespec: handle the presence of obsmarker part...
marmoute -
r50230:04cdb442 default
parent child Browse files
Show More
@@ -1,2853 +1,2857 b''
1 # exchange.py - utility to exchange data between repos.
1 # exchange.py - utility to exchange data between repos.
2 #
2 #
3 # Copyright 2005-2007 Olivia Mackall <olivia@selenic.com>
3 # Copyright 2005-2007 Olivia Mackall <olivia@selenic.com>
4 #
4 #
5 # This software may be used and distributed according to the terms of the
5 # This software may be used and distributed according to the terms of the
6 # GNU General Public License version 2 or any later version.
6 # GNU General Public License version 2 or any later version.
7
7
8
8
9 import collections
9 import collections
10 import weakref
10 import weakref
11
11
12 from .i18n import _
12 from .i18n import _
13 from .node import (
13 from .node import (
14 hex,
14 hex,
15 nullrev,
15 nullrev,
16 )
16 )
17 from . import (
17 from . import (
18 bookmarks as bookmod,
18 bookmarks as bookmod,
19 bundle2,
19 bundle2,
20 bundlecaches,
20 bundlecaches,
21 changegroup,
21 changegroup,
22 discovery,
22 discovery,
23 error,
23 error,
24 lock as lockmod,
24 lock as lockmod,
25 logexchange,
25 logexchange,
26 narrowspec,
26 narrowspec,
27 obsolete,
27 obsolete,
28 obsutil,
28 obsutil,
29 phases,
29 phases,
30 pushkey,
30 pushkey,
31 pycompat,
31 pycompat,
32 requirements,
32 requirements,
33 scmutil,
33 scmutil,
34 streamclone,
34 streamclone,
35 url as urlmod,
35 url as urlmod,
36 util,
36 util,
37 wireprototypes,
37 wireprototypes,
38 )
38 )
39 from .utils import (
39 from .utils import (
40 hashutil,
40 hashutil,
41 stringutil,
41 stringutil,
42 urlutil,
42 urlutil,
43 )
43 )
44 from .interfaces import repository
44 from .interfaces import repository
45
45
46 urlerr = util.urlerr
46 urlerr = util.urlerr
47 urlreq = util.urlreq
47 urlreq = util.urlreq
48
48
49 _NARROWACL_SECTION = b'narrowacl'
49 _NARROWACL_SECTION = b'narrowacl'
50
50
51
51
52 def readbundle(ui, fh, fname, vfs=None):
52 def readbundle(ui, fh, fname, vfs=None):
53 header = changegroup.readexactly(fh, 4)
53 header = changegroup.readexactly(fh, 4)
54
54
55 alg = None
55 alg = None
56 if not fname:
56 if not fname:
57 fname = b"stream"
57 fname = b"stream"
58 if not header.startswith(b'HG') and header.startswith(b'\0'):
58 if not header.startswith(b'HG') and header.startswith(b'\0'):
59 fh = changegroup.headerlessfixup(fh, header)
59 fh = changegroup.headerlessfixup(fh, header)
60 header = b"HG10"
60 header = b"HG10"
61 alg = b'UN'
61 alg = b'UN'
62 elif vfs:
62 elif vfs:
63 fname = vfs.join(fname)
63 fname = vfs.join(fname)
64
64
65 magic, version = header[0:2], header[2:4]
65 magic, version = header[0:2], header[2:4]
66
66
67 if magic != b'HG':
67 if magic != b'HG':
68 raise error.Abort(_(b'%s: not a Mercurial bundle') % fname)
68 raise error.Abort(_(b'%s: not a Mercurial bundle') % fname)
69 if version == b'10':
69 if version == b'10':
70 if alg is None:
70 if alg is None:
71 alg = changegroup.readexactly(fh, 2)
71 alg = changegroup.readexactly(fh, 2)
72 return changegroup.cg1unpacker(fh, alg)
72 return changegroup.cg1unpacker(fh, alg)
73 elif version.startswith(b'2'):
73 elif version.startswith(b'2'):
74 return bundle2.getunbundler(ui, fh, magicstring=magic + version)
74 return bundle2.getunbundler(ui, fh, magicstring=magic + version)
75 elif version == b'S1':
75 elif version == b'S1':
76 return streamclone.streamcloneapplier(fh)
76 return streamclone.streamcloneapplier(fh)
77 else:
77 else:
78 raise error.Abort(
78 raise error.Abort(
79 _(b'%s: unknown bundle version %s') % (fname, version)
79 _(b'%s: unknown bundle version %s') % (fname, version)
80 )
80 )
81
81
82
82
83 def _format_params(params):
83 def _format_params(params):
84 parts = []
84 parts = []
85 for key, value in sorted(params.items()):
85 for key, value in sorted(params.items()):
86 value = urlreq.quote(value)
86 value = urlreq.quote(value)
87 parts.append(b"%s=%s" % (key, value))
87 parts.append(b"%s=%s" % (key, value))
88 return b';'.join(parts)
88 return b';'.join(parts)
89
89
90
90
91 def getbundlespec(ui, fh):
91 def getbundlespec(ui, fh):
92 """Infer the bundlespec from a bundle file handle.
92 """Infer the bundlespec from a bundle file handle.
93
93
94 The input file handle is seeked and the original seek position is not
94 The input file handle is seeked and the original seek position is not
95 restored.
95 restored.
96 """
96 """
97
97
98 def speccompression(alg):
98 def speccompression(alg):
99 try:
99 try:
100 return util.compengines.forbundletype(alg).bundletype()[0]
100 return util.compengines.forbundletype(alg).bundletype()[0]
101 except KeyError:
101 except KeyError:
102 return None
102 return None
103
103
104 params = {}
104 params = {}
105
105
106 b = readbundle(ui, fh, None)
106 b = readbundle(ui, fh, None)
107 if isinstance(b, changegroup.cg1unpacker):
107 if isinstance(b, changegroup.cg1unpacker):
108 alg = b._type
108 alg = b._type
109 if alg == b'_truncatedBZ':
109 if alg == b'_truncatedBZ':
110 alg = b'BZ'
110 alg = b'BZ'
111 comp = speccompression(alg)
111 comp = speccompression(alg)
112 if not comp:
112 if not comp:
113 raise error.Abort(_(b'unknown compression algorithm: %s') % alg)
113 raise error.Abort(_(b'unknown compression algorithm: %s') % alg)
114 return b'%s-v1' % comp
114 return b'%s-v1' % comp
115 elif isinstance(b, bundle2.unbundle20):
115 elif isinstance(b, bundle2.unbundle20):
116 if b'Compression' in b.params:
116 if b'Compression' in b.params:
117 comp = speccompression(b.params[b'Compression'])
117 comp = speccompression(b.params[b'Compression'])
118 if not comp:
118 if not comp:
119 raise error.Abort(
119 raise error.Abort(
120 _(b'unknown compression algorithm: %s') % comp
120 _(b'unknown compression algorithm: %s') % comp
121 )
121 )
122 else:
122 else:
123 comp = b'none'
123 comp = b'none'
124
124
125 version = None
125 version = None
126 for part in b.iterparts():
126 for part in b.iterparts():
127 if part.type == b'changegroup':
127 if part.type == b'changegroup':
128 cgversion = part.params[b'version']
128 cgversion = part.params[b'version']
129 if cgversion in (b'01', b'02'):
129 if cgversion in (b'01', b'02'):
130 version = b'v2'
130 version = b'v2'
131 elif cgversion in (b'03',):
131 elif cgversion in (b'03',):
132 version = b'v2'
132 version = b'v2'
133 params[b'cg.version'] = cgversion
133 params[b'cg.version'] = cgversion
134 else:
134 else:
135 raise error.Abort(
135 raise error.Abort(
136 _(
136 _(
137 b'changegroup version %s does not have '
137 b'changegroup version %s does not have '
138 b'a known bundlespec'
138 b'a known bundlespec'
139 )
139 )
140 % version,
140 % version,
141 hint=_(b'try upgrading your Mercurial client'),
141 hint=_(b'try upgrading your Mercurial client'),
142 )
142 )
143 elif part.type == b'stream2' and version is None:
143 elif part.type == b'stream2' and version is None:
144 # A stream2 part requires to be part of a v2 bundle
144 # A stream2 part requires to be part of a v2 bundle
145 requirements = urlreq.unquote(part.params[b'requirements'])
145 requirements = urlreq.unquote(part.params[b'requirements'])
146 splitted = requirements.split()
146 splitted = requirements.split()
147 params = bundle2._formatrequirementsparams(splitted)
147 params = bundle2._formatrequirementsparams(splitted)
148 return b'none-v2;stream=v2;%s' % params
148 return b'none-v2;stream=v2;%s' % params
149 elif part.type == b'obsmarkers':
150 params[b'obsolescence'] = b'yes'
151 if not part.mandatory:
152 params[b'obsolescence-mandatory'] = b'no'
149
153
150 if not version:
154 if not version:
151 raise error.Abort(
155 raise error.Abort(
152 _(b'could not identify changegroup version in bundle')
156 _(b'could not identify changegroup version in bundle')
153 )
157 )
154 spec = b'%s-%s' % (comp, version)
158 spec = b'%s-%s' % (comp, version)
155 if params:
159 if params:
156 spec += b';'
160 spec += b';'
157 spec += _format_params(params)
161 spec += _format_params(params)
158 return spec
162 return spec
159
163
160 elif isinstance(b, streamclone.streamcloneapplier):
164 elif isinstance(b, streamclone.streamcloneapplier):
161 requirements = streamclone.readbundle1header(fh)[2]
165 requirements = streamclone.readbundle1header(fh)[2]
162 formatted = bundle2._formatrequirementsparams(requirements)
166 formatted = bundle2._formatrequirementsparams(requirements)
163 return b'none-packed1;%s' % formatted
167 return b'none-packed1;%s' % formatted
164 else:
168 else:
165 raise error.Abort(_(b'unknown bundle type: %s') % b)
169 raise error.Abort(_(b'unknown bundle type: %s') % b)
166
170
167
171
168 def _computeoutgoing(repo, heads, common):
172 def _computeoutgoing(repo, heads, common):
169 """Computes which revs are outgoing given a set of common
173 """Computes which revs are outgoing given a set of common
170 and a set of heads.
174 and a set of heads.
171
175
172 This is a separate function so extensions can have access to
176 This is a separate function so extensions can have access to
173 the logic.
177 the logic.
174
178
175 Returns a discovery.outgoing object.
179 Returns a discovery.outgoing object.
176 """
180 """
177 cl = repo.changelog
181 cl = repo.changelog
178 if common:
182 if common:
179 hasnode = cl.hasnode
183 hasnode = cl.hasnode
180 common = [n for n in common if hasnode(n)]
184 common = [n for n in common if hasnode(n)]
181 else:
185 else:
182 common = [repo.nullid]
186 common = [repo.nullid]
183 if not heads:
187 if not heads:
184 heads = cl.heads()
188 heads = cl.heads()
185 return discovery.outgoing(repo, common, heads)
189 return discovery.outgoing(repo, common, heads)
186
190
187
191
188 def _checkpublish(pushop):
192 def _checkpublish(pushop):
189 repo = pushop.repo
193 repo = pushop.repo
190 ui = repo.ui
194 ui = repo.ui
191 behavior = ui.config(b'experimental', b'auto-publish')
195 behavior = ui.config(b'experimental', b'auto-publish')
192 if pushop.publish or behavior not in (b'warn', b'confirm', b'abort'):
196 if pushop.publish or behavior not in (b'warn', b'confirm', b'abort'):
193 return
197 return
194 remotephases = listkeys(pushop.remote, b'phases')
198 remotephases = listkeys(pushop.remote, b'phases')
195 if not remotephases.get(b'publishing', False):
199 if not remotephases.get(b'publishing', False):
196 return
200 return
197
201
198 if pushop.revs is None:
202 if pushop.revs is None:
199 published = repo.filtered(b'served').revs(b'not public()')
203 published = repo.filtered(b'served').revs(b'not public()')
200 else:
204 else:
201 published = repo.revs(b'::%ln - public()', pushop.revs)
205 published = repo.revs(b'::%ln - public()', pushop.revs)
202 # we want to use pushop.revs in the revset even if they themselves are
206 # we want to use pushop.revs in the revset even if they themselves are
203 # secret, but we don't want to have anything that the server won't see
207 # secret, but we don't want to have anything that the server won't see
204 # in the result of this expression
208 # in the result of this expression
205 published &= repo.filtered(b'served')
209 published &= repo.filtered(b'served')
206 if published:
210 if published:
207 if behavior == b'warn':
211 if behavior == b'warn':
208 ui.warn(
212 ui.warn(
209 _(b'%i changesets about to be published\n') % len(published)
213 _(b'%i changesets about to be published\n') % len(published)
210 )
214 )
211 elif behavior == b'confirm':
215 elif behavior == b'confirm':
212 if ui.promptchoice(
216 if ui.promptchoice(
213 _(b'push and publish %i changesets (yn)?$$ &Yes $$ &No')
217 _(b'push and publish %i changesets (yn)?$$ &Yes $$ &No')
214 % len(published)
218 % len(published)
215 ):
219 ):
216 raise error.CanceledError(_(b'user quit'))
220 raise error.CanceledError(_(b'user quit'))
217 elif behavior == b'abort':
221 elif behavior == b'abort':
218 msg = _(b'push would publish %i changesets') % len(published)
222 msg = _(b'push would publish %i changesets') % len(published)
219 hint = _(
223 hint = _(
220 b"use --publish or adjust 'experimental.auto-publish'"
224 b"use --publish or adjust 'experimental.auto-publish'"
221 b" config"
225 b" config"
222 )
226 )
223 raise error.Abort(msg, hint=hint)
227 raise error.Abort(msg, hint=hint)
224
228
225
229
226 def _forcebundle1(op):
230 def _forcebundle1(op):
227 """return true if a pull/push must use bundle1
231 """return true if a pull/push must use bundle1
228
232
229 This function is used to allow testing of the older bundle version"""
233 This function is used to allow testing of the older bundle version"""
230 ui = op.repo.ui
234 ui = op.repo.ui
231 # The goal is this config is to allow developer to choose the bundle
235 # The goal is this config is to allow developer to choose the bundle
232 # version used during exchanged. This is especially handy during test.
236 # version used during exchanged. This is especially handy during test.
233 # Value is a list of bundle version to be picked from, highest version
237 # Value is a list of bundle version to be picked from, highest version
234 # should be used.
238 # should be used.
235 #
239 #
236 # developer config: devel.legacy.exchange
240 # developer config: devel.legacy.exchange
237 exchange = ui.configlist(b'devel', b'legacy.exchange')
241 exchange = ui.configlist(b'devel', b'legacy.exchange')
238 forcebundle1 = b'bundle2' not in exchange and b'bundle1' in exchange
242 forcebundle1 = b'bundle2' not in exchange and b'bundle1' in exchange
239 return forcebundle1 or not op.remote.capable(b'bundle2')
243 return forcebundle1 or not op.remote.capable(b'bundle2')
240
244
241
245
242 class pushoperation:
246 class pushoperation:
243 """A object that represent a single push operation
247 """A object that represent a single push operation
244
248
245 Its purpose is to carry push related state and very common operations.
249 Its purpose is to carry push related state and very common operations.
246
250
247 A new pushoperation should be created at the beginning of each push and
251 A new pushoperation should be created at the beginning of each push and
248 discarded afterward.
252 discarded afterward.
249 """
253 """
250
254
251 def __init__(
255 def __init__(
252 self,
256 self,
253 repo,
257 repo,
254 remote,
258 remote,
255 force=False,
259 force=False,
256 revs=None,
260 revs=None,
257 newbranch=False,
261 newbranch=False,
258 bookmarks=(),
262 bookmarks=(),
259 publish=False,
263 publish=False,
260 pushvars=None,
264 pushvars=None,
261 ):
265 ):
262 # repo we push from
266 # repo we push from
263 self.repo = repo
267 self.repo = repo
264 self.ui = repo.ui
268 self.ui = repo.ui
265 # repo we push to
269 # repo we push to
266 self.remote = remote
270 self.remote = remote
267 # force option provided
271 # force option provided
268 self.force = force
272 self.force = force
269 # revs to be pushed (None is "all")
273 # revs to be pushed (None is "all")
270 self.revs = revs
274 self.revs = revs
271 # bookmark explicitly pushed
275 # bookmark explicitly pushed
272 self.bookmarks = bookmarks
276 self.bookmarks = bookmarks
273 # allow push of new branch
277 # allow push of new branch
274 self.newbranch = newbranch
278 self.newbranch = newbranch
275 # step already performed
279 # step already performed
276 # (used to check what steps have been already performed through bundle2)
280 # (used to check what steps have been already performed through bundle2)
277 self.stepsdone = set()
281 self.stepsdone = set()
278 # Integer version of the changegroup push result
282 # Integer version of the changegroup push result
279 # - None means nothing to push
283 # - None means nothing to push
280 # - 0 means HTTP error
284 # - 0 means HTTP error
281 # - 1 means we pushed and remote head count is unchanged *or*
285 # - 1 means we pushed and remote head count is unchanged *or*
282 # we have outgoing changesets but refused to push
286 # we have outgoing changesets but refused to push
283 # - other values as described by addchangegroup()
287 # - other values as described by addchangegroup()
284 self.cgresult = None
288 self.cgresult = None
285 # Boolean value for the bookmark push
289 # Boolean value for the bookmark push
286 self.bkresult = None
290 self.bkresult = None
287 # discover.outgoing object (contains common and outgoing data)
291 # discover.outgoing object (contains common and outgoing data)
288 self.outgoing = None
292 self.outgoing = None
289 # all remote topological heads before the push
293 # all remote topological heads before the push
290 self.remoteheads = None
294 self.remoteheads = None
291 # Details of the remote branch pre and post push
295 # Details of the remote branch pre and post push
292 #
296 #
293 # mapping: {'branch': ([remoteheads],
297 # mapping: {'branch': ([remoteheads],
294 # [newheads],
298 # [newheads],
295 # [unsyncedheads],
299 # [unsyncedheads],
296 # [discardedheads])}
300 # [discardedheads])}
297 # - branch: the branch name
301 # - branch: the branch name
298 # - remoteheads: the list of remote heads known locally
302 # - remoteheads: the list of remote heads known locally
299 # None if the branch is new
303 # None if the branch is new
300 # - newheads: the new remote heads (known locally) with outgoing pushed
304 # - newheads: the new remote heads (known locally) with outgoing pushed
301 # - unsyncedheads: the list of remote heads unknown locally.
305 # - unsyncedheads: the list of remote heads unknown locally.
302 # - discardedheads: the list of remote heads made obsolete by the push
306 # - discardedheads: the list of remote heads made obsolete by the push
303 self.pushbranchmap = None
307 self.pushbranchmap = None
304 # testable as a boolean indicating if any nodes are missing locally.
308 # testable as a boolean indicating if any nodes are missing locally.
305 self.incoming = None
309 self.incoming = None
306 # summary of the remote phase situation
310 # summary of the remote phase situation
307 self.remotephases = None
311 self.remotephases = None
308 # phases changes that must be pushed along side the changesets
312 # phases changes that must be pushed along side the changesets
309 self.outdatedphases = None
313 self.outdatedphases = None
310 # phases changes that must be pushed if changeset push fails
314 # phases changes that must be pushed if changeset push fails
311 self.fallbackoutdatedphases = None
315 self.fallbackoutdatedphases = None
312 # outgoing obsmarkers
316 # outgoing obsmarkers
313 self.outobsmarkers = set()
317 self.outobsmarkers = set()
314 # outgoing bookmarks, list of (bm, oldnode | '', newnode | '')
318 # outgoing bookmarks, list of (bm, oldnode | '', newnode | '')
315 self.outbookmarks = []
319 self.outbookmarks = []
316 # transaction manager
320 # transaction manager
317 self.trmanager = None
321 self.trmanager = None
318 # map { pushkey partid -> callback handling failure}
322 # map { pushkey partid -> callback handling failure}
319 # used to handle exception from mandatory pushkey part failure
323 # used to handle exception from mandatory pushkey part failure
320 self.pkfailcb = {}
324 self.pkfailcb = {}
321 # an iterable of pushvars or None
325 # an iterable of pushvars or None
322 self.pushvars = pushvars
326 self.pushvars = pushvars
323 # publish pushed changesets
327 # publish pushed changesets
324 self.publish = publish
328 self.publish = publish
325
329
326 @util.propertycache
330 @util.propertycache
327 def futureheads(self):
331 def futureheads(self):
328 """future remote heads if the changeset push succeeds"""
332 """future remote heads if the changeset push succeeds"""
329 return self.outgoing.ancestorsof
333 return self.outgoing.ancestorsof
330
334
331 @util.propertycache
335 @util.propertycache
332 def fallbackheads(self):
336 def fallbackheads(self):
333 """future remote heads if the changeset push fails"""
337 """future remote heads if the changeset push fails"""
334 if self.revs is None:
338 if self.revs is None:
335 # not target to push, all common are relevant
339 # not target to push, all common are relevant
336 return self.outgoing.commonheads
340 return self.outgoing.commonheads
337 unfi = self.repo.unfiltered()
341 unfi = self.repo.unfiltered()
338 # I want cheads = heads(::ancestorsof and ::commonheads)
342 # I want cheads = heads(::ancestorsof and ::commonheads)
339 # (ancestorsof is revs with secret changeset filtered out)
343 # (ancestorsof is revs with secret changeset filtered out)
340 #
344 #
341 # This can be expressed as:
345 # This can be expressed as:
342 # cheads = ( (ancestorsof and ::commonheads)
346 # cheads = ( (ancestorsof and ::commonheads)
343 # + (commonheads and ::ancestorsof))"
347 # + (commonheads and ::ancestorsof))"
344 # )
348 # )
345 #
349 #
346 # while trying to push we already computed the following:
350 # while trying to push we already computed the following:
347 # common = (::commonheads)
351 # common = (::commonheads)
348 # missing = ((commonheads::ancestorsof) - commonheads)
352 # missing = ((commonheads::ancestorsof) - commonheads)
349 #
353 #
350 # We can pick:
354 # We can pick:
351 # * ancestorsof part of common (::commonheads)
355 # * ancestorsof part of common (::commonheads)
352 common = self.outgoing.common
356 common = self.outgoing.common
353 rev = self.repo.changelog.index.rev
357 rev = self.repo.changelog.index.rev
354 cheads = [node for node in self.revs if rev(node) in common]
358 cheads = [node for node in self.revs if rev(node) in common]
355 # and
359 # and
356 # * commonheads parents on missing
360 # * commonheads parents on missing
357 revset = unfi.set(
361 revset = unfi.set(
358 b'%ln and parents(roots(%ln))',
362 b'%ln and parents(roots(%ln))',
359 self.outgoing.commonheads,
363 self.outgoing.commonheads,
360 self.outgoing.missing,
364 self.outgoing.missing,
361 )
365 )
362 cheads.extend(c.node() for c in revset)
366 cheads.extend(c.node() for c in revset)
363 return cheads
367 return cheads
364
368
365 @property
369 @property
366 def commonheads(self):
370 def commonheads(self):
367 """set of all common heads after changeset bundle push"""
371 """set of all common heads after changeset bundle push"""
368 if self.cgresult:
372 if self.cgresult:
369 return self.futureheads
373 return self.futureheads
370 else:
374 else:
371 return self.fallbackheads
375 return self.fallbackheads
372
376
373
377
374 # mapping of message used when pushing bookmark
378 # mapping of message used when pushing bookmark
375 bookmsgmap = {
379 bookmsgmap = {
376 b'update': (
380 b'update': (
377 _(b"updating bookmark %s\n"),
381 _(b"updating bookmark %s\n"),
378 _(b'updating bookmark %s failed\n'),
382 _(b'updating bookmark %s failed\n'),
379 ),
383 ),
380 b'export': (
384 b'export': (
381 _(b"exporting bookmark %s\n"),
385 _(b"exporting bookmark %s\n"),
382 _(b'exporting bookmark %s failed\n'),
386 _(b'exporting bookmark %s failed\n'),
383 ),
387 ),
384 b'delete': (
388 b'delete': (
385 _(b"deleting remote bookmark %s\n"),
389 _(b"deleting remote bookmark %s\n"),
386 _(b'deleting remote bookmark %s failed\n'),
390 _(b'deleting remote bookmark %s failed\n'),
387 ),
391 ),
388 }
392 }
389
393
390
394
391 def push(
395 def push(
392 repo,
396 repo,
393 remote,
397 remote,
394 force=False,
398 force=False,
395 revs=None,
399 revs=None,
396 newbranch=False,
400 newbranch=False,
397 bookmarks=(),
401 bookmarks=(),
398 publish=False,
402 publish=False,
399 opargs=None,
403 opargs=None,
400 ):
404 ):
401 """Push outgoing changesets (limited by revs) from a local
405 """Push outgoing changesets (limited by revs) from a local
402 repository to remote. Return an integer:
406 repository to remote. Return an integer:
403 - None means nothing to push
407 - None means nothing to push
404 - 0 means HTTP error
408 - 0 means HTTP error
405 - 1 means we pushed and remote head count is unchanged *or*
409 - 1 means we pushed and remote head count is unchanged *or*
406 we have outgoing changesets but refused to push
410 we have outgoing changesets but refused to push
407 - other values as described by addchangegroup()
411 - other values as described by addchangegroup()
408 """
412 """
409 if opargs is None:
413 if opargs is None:
410 opargs = {}
414 opargs = {}
411 pushop = pushoperation(
415 pushop = pushoperation(
412 repo,
416 repo,
413 remote,
417 remote,
414 force,
418 force,
415 revs,
419 revs,
416 newbranch,
420 newbranch,
417 bookmarks,
421 bookmarks,
418 publish,
422 publish,
419 **pycompat.strkwargs(opargs)
423 **pycompat.strkwargs(opargs)
420 )
424 )
421 if pushop.remote.local():
425 if pushop.remote.local():
422 missing = (
426 missing = (
423 set(pushop.repo.requirements) - pushop.remote.local().supported
427 set(pushop.repo.requirements) - pushop.remote.local().supported
424 )
428 )
425 if missing:
429 if missing:
426 msg = _(
430 msg = _(
427 b"required features are not"
431 b"required features are not"
428 b" supported in the destination:"
432 b" supported in the destination:"
429 b" %s"
433 b" %s"
430 ) % (b', '.join(sorted(missing)))
434 ) % (b', '.join(sorted(missing)))
431 raise error.Abort(msg)
435 raise error.Abort(msg)
432
436
433 if not pushop.remote.canpush():
437 if not pushop.remote.canpush():
434 raise error.Abort(_(b"destination does not support push"))
438 raise error.Abort(_(b"destination does not support push"))
435
439
436 if not pushop.remote.capable(b'unbundle'):
440 if not pushop.remote.capable(b'unbundle'):
437 raise error.Abort(
441 raise error.Abort(
438 _(
442 _(
439 b'cannot push: destination does not support the '
443 b'cannot push: destination does not support the '
440 b'unbundle wire protocol command'
444 b'unbundle wire protocol command'
441 )
445 )
442 )
446 )
443 for category in sorted(bundle2.read_remote_wanted_sidedata(pushop.remote)):
447 for category in sorted(bundle2.read_remote_wanted_sidedata(pushop.remote)):
444 # Check that a computer is registered for that category for at least
448 # Check that a computer is registered for that category for at least
445 # one revlog kind.
449 # one revlog kind.
446 for kind, computers in repo._sidedata_computers.items():
450 for kind, computers in repo._sidedata_computers.items():
447 if computers.get(category):
451 if computers.get(category):
448 break
452 break
449 else:
453 else:
450 raise error.Abort(
454 raise error.Abort(
451 _(
455 _(
452 b'cannot push: required sidedata category not supported'
456 b'cannot push: required sidedata category not supported'
453 b" by this client: '%s'"
457 b" by this client: '%s'"
454 )
458 )
455 % pycompat.bytestr(category)
459 % pycompat.bytestr(category)
456 )
460 )
457 # get lock as we might write phase data
461 # get lock as we might write phase data
458 wlock = lock = None
462 wlock = lock = None
459 try:
463 try:
460 # bundle2 push may receive a reply bundle touching bookmarks
464 # bundle2 push may receive a reply bundle touching bookmarks
461 # requiring the wlock. Take it now to ensure proper ordering.
465 # requiring the wlock. Take it now to ensure proper ordering.
462 maypushback = pushop.ui.configbool(b'experimental', b'bundle2.pushback')
466 maypushback = pushop.ui.configbool(b'experimental', b'bundle2.pushback')
463 if (
467 if (
464 (not _forcebundle1(pushop))
468 (not _forcebundle1(pushop))
465 and maypushback
469 and maypushback
466 and not bookmod.bookmarksinstore(repo)
470 and not bookmod.bookmarksinstore(repo)
467 ):
471 ):
468 wlock = pushop.repo.wlock()
472 wlock = pushop.repo.wlock()
469 lock = pushop.repo.lock()
473 lock = pushop.repo.lock()
470 pushop.trmanager = transactionmanager(
474 pushop.trmanager = transactionmanager(
471 pushop.repo, b'push-response', pushop.remote.url()
475 pushop.repo, b'push-response', pushop.remote.url()
472 )
476 )
473 except error.LockUnavailable as err:
477 except error.LockUnavailable as err:
474 # source repo cannot be locked.
478 # source repo cannot be locked.
475 # We do not abort the push, but just disable the local phase
479 # We do not abort the push, but just disable the local phase
476 # synchronisation.
480 # synchronisation.
477 msg = b'cannot lock source repository: %s\n' % stringutil.forcebytestr(
481 msg = b'cannot lock source repository: %s\n' % stringutil.forcebytestr(
478 err
482 err
479 )
483 )
480 pushop.ui.debug(msg)
484 pushop.ui.debug(msg)
481
485
482 with wlock or util.nullcontextmanager():
486 with wlock or util.nullcontextmanager():
483 with lock or util.nullcontextmanager():
487 with lock or util.nullcontextmanager():
484 with pushop.trmanager or util.nullcontextmanager():
488 with pushop.trmanager or util.nullcontextmanager():
485 pushop.repo.checkpush(pushop)
489 pushop.repo.checkpush(pushop)
486 _checkpublish(pushop)
490 _checkpublish(pushop)
487 _pushdiscovery(pushop)
491 _pushdiscovery(pushop)
488 if not pushop.force:
492 if not pushop.force:
489 _checksubrepostate(pushop)
493 _checksubrepostate(pushop)
490 if not _forcebundle1(pushop):
494 if not _forcebundle1(pushop):
491 _pushbundle2(pushop)
495 _pushbundle2(pushop)
492 _pushchangeset(pushop)
496 _pushchangeset(pushop)
493 _pushsyncphase(pushop)
497 _pushsyncphase(pushop)
494 _pushobsolete(pushop)
498 _pushobsolete(pushop)
495 _pushbookmark(pushop)
499 _pushbookmark(pushop)
496
500
497 if repo.ui.configbool(b'experimental', b'remotenames'):
501 if repo.ui.configbool(b'experimental', b'remotenames'):
498 logexchange.pullremotenames(repo, remote)
502 logexchange.pullremotenames(repo, remote)
499
503
500 return pushop
504 return pushop
501
505
502
506
503 # list of steps to perform discovery before push
507 # list of steps to perform discovery before push
504 pushdiscoveryorder = []
508 pushdiscoveryorder = []
505
509
506 # Mapping between step name and function
510 # Mapping between step name and function
507 #
511 #
508 # This exists to help extensions wrap steps if necessary
512 # This exists to help extensions wrap steps if necessary
509 pushdiscoverymapping = {}
513 pushdiscoverymapping = {}
510
514
511
515
512 def pushdiscovery(stepname):
516 def pushdiscovery(stepname):
513 """decorator for function performing discovery before push
517 """decorator for function performing discovery before push
514
518
515 The function is added to the step -> function mapping and appended to the
519 The function is added to the step -> function mapping and appended to the
516 list of steps. Beware that decorated function will be added in order (this
520 list of steps. Beware that decorated function will be added in order (this
517 may matter).
521 may matter).
518
522
519 You can only use this decorator for a new step, if you want to wrap a step
523 You can only use this decorator for a new step, if you want to wrap a step
520 from an extension, change the pushdiscovery dictionary directly."""
524 from an extension, change the pushdiscovery dictionary directly."""
521
525
522 def dec(func):
526 def dec(func):
523 assert stepname not in pushdiscoverymapping
527 assert stepname not in pushdiscoverymapping
524 pushdiscoverymapping[stepname] = func
528 pushdiscoverymapping[stepname] = func
525 pushdiscoveryorder.append(stepname)
529 pushdiscoveryorder.append(stepname)
526 return func
530 return func
527
531
528 return dec
532 return dec
529
533
530
534
531 def _pushdiscovery(pushop):
535 def _pushdiscovery(pushop):
532 """Run all discovery steps"""
536 """Run all discovery steps"""
533 for stepname in pushdiscoveryorder:
537 for stepname in pushdiscoveryorder:
534 step = pushdiscoverymapping[stepname]
538 step = pushdiscoverymapping[stepname]
535 step(pushop)
539 step(pushop)
536
540
537
541
538 def _checksubrepostate(pushop):
542 def _checksubrepostate(pushop):
539 """Ensure all outgoing referenced subrepo revisions are present locally"""
543 """Ensure all outgoing referenced subrepo revisions are present locally"""
540
544
541 repo = pushop.repo
545 repo = pushop.repo
542
546
543 # If the repository does not use subrepos, skip the expensive
547 # If the repository does not use subrepos, skip the expensive
544 # manifest checks.
548 # manifest checks.
545 if not len(repo.file(b'.hgsub')) or not len(repo.file(b'.hgsubstate')):
549 if not len(repo.file(b'.hgsub')) or not len(repo.file(b'.hgsubstate')):
546 return
550 return
547
551
548 for n in pushop.outgoing.missing:
552 for n in pushop.outgoing.missing:
549 ctx = repo[n]
553 ctx = repo[n]
550
554
551 if b'.hgsub' in ctx.manifest() and b'.hgsubstate' in ctx.files():
555 if b'.hgsub' in ctx.manifest() and b'.hgsubstate' in ctx.files():
552 for subpath in sorted(ctx.substate):
556 for subpath in sorted(ctx.substate):
553 sub = ctx.sub(subpath)
557 sub = ctx.sub(subpath)
554 sub.verify(onpush=True)
558 sub.verify(onpush=True)
555
559
556
560
557 @pushdiscovery(b'changeset')
561 @pushdiscovery(b'changeset')
558 def _pushdiscoverychangeset(pushop):
562 def _pushdiscoverychangeset(pushop):
559 """discover the changeset that need to be pushed"""
563 """discover the changeset that need to be pushed"""
560 fci = discovery.findcommonincoming
564 fci = discovery.findcommonincoming
561 if pushop.revs:
565 if pushop.revs:
562 commoninc = fci(
566 commoninc = fci(
563 pushop.repo,
567 pushop.repo,
564 pushop.remote,
568 pushop.remote,
565 force=pushop.force,
569 force=pushop.force,
566 ancestorsof=pushop.revs,
570 ancestorsof=pushop.revs,
567 )
571 )
568 else:
572 else:
569 commoninc = fci(pushop.repo, pushop.remote, force=pushop.force)
573 commoninc = fci(pushop.repo, pushop.remote, force=pushop.force)
570 common, inc, remoteheads = commoninc
574 common, inc, remoteheads = commoninc
571 fco = discovery.findcommonoutgoing
575 fco = discovery.findcommonoutgoing
572 outgoing = fco(
576 outgoing = fco(
573 pushop.repo,
577 pushop.repo,
574 pushop.remote,
578 pushop.remote,
575 onlyheads=pushop.revs,
579 onlyheads=pushop.revs,
576 commoninc=commoninc,
580 commoninc=commoninc,
577 force=pushop.force,
581 force=pushop.force,
578 )
582 )
579 pushop.outgoing = outgoing
583 pushop.outgoing = outgoing
580 pushop.remoteheads = remoteheads
584 pushop.remoteheads = remoteheads
581 pushop.incoming = inc
585 pushop.incoming = inc
582
586
583
587
584 @pushdiscovery(b'phase')
588 @pushdiscovery(b'phase')
585 def _pushdiscoveryphase(pushop):
589 def _pushdiscoveryphase(pushop):
586 """discover the phase that needs to be pushed
590 """discover the phase that needs to be pushed
587
591
588 (computed for both success and failure case for changesets push)"""
592 (computed for both success and failure case for changesets push)"""
589 outgoing = pushop.outgoing
593 outgoing = pushop.outgoing
590 unfi = pushop.repo.unfiltered()
594 unfi = pushop.repo.unfiltered()
591 remotephases = listkeys(pushop.remote, b'phases')
595 remotephases = listkeys(pushop.remote, b'phases')
592
596
593 if (
597 if (
594 pushop.ui.configbool(b'ui', b'_usedassubrepo')
598 pushop.ui.configbool(b'ui', b'_usedassubrepo')
595 and remotephases # server supports phases
599 and remotephases # server supports phases
596 and not pushop.outgoing.missing # no changesets to be pushed
600 and not pushop.outgoing.missing # no changesets to be pushed
597 and remotephases.get(b'publishing', False)
601 and remotephases.get(b'publishing', False)
598 ):
602 ):
599 # When:
603 # When:
600 # - this is a subrepo push
604 # - this is a subrepo push
601 # - and remote support phase
605 # - and remote support phase
602 # - and no changeset are to be pushed
606 # - and no changeset are to be pushed
603 # - and remote is publishing
607 # - and remote is publishing
604 # We may be in issue 3781 case!
608 # We may be in issue 3781 case!
605 # We drop the possible phase synchronisation done by
609 # We drop the possible phase synchronisation done by
606 # courtesy to publish changesets possibly locally draft
610 # courtesy to publish changesets possibly locally draft
607 # on the remote.
611 # on the remote.
608 pushop.outdatedphases = []
612 pushop.outdatedphases = []
609 pushop.fallbackoutdatedphases = []
613 pushop.fallbackoutdatedphases = []
610 return
614 return
611
615
612 pushop.remotephases = phases.remotephasessummary(
616 pushop.remotephases = phases.remotephasessummary(
613 pushop.repo, pushop.fallbackheads, remotephases
617 pushop.repo, pushop.fallbackheads, remotephases
614 )
618 )
615 droots = pushop.remotephases.draftroots
619 droots = pushop.remotephases.draftroots
616
620
617 extracond = b''
621 extracond = b''
618 if not pushop.remotephases.publishing:
622 if not pushop.remotephases.publishing:
619 extracond = b' and public()'
623 extracond = b' and public()'
620 revset = b'heads((%%ln::%%ln) %s)' % extracond
624 revset = b'heads((%%ln::%%ln) %s)' % extracond
621 # Get the list of all revs draft on remote by public here.
625 # Get the list of all revs draft on remote by public here.
622 # XXX Beware that revset break if droots is not strictly
626 # XXX Beware that revset break if droots is not strictly
623 # XXX root we may want to ensure it is but it is costly
627 # XXX root we may want to ensure it is but it is costly
624 fallback = list(unfi.set(revset, droots, pushop.fallbackheads))
628 fallback = list(unfi.set(revset, droots, pushop.fallbackheads))
625 if not pushop.remotephases.publishing and pushop.publish:
629 if not pushop.remotephases.publishing and pushop.publish:
626 future = list(
630 future = list(
627 unfi.set(
631 unfi.set(
628 b'%ln and (not public() or %ln::)', pushop.futureheads, droots
632 b'%ln and (not public() or %ln::)', pushop.futureheads, droots
629 )
633 )
630 )
634 )
631 elif not outgoing.missing:
635 elif not outgoing.missing:
632 future = fallback
636 future = fallback
633 else:
637 else:
634 # adds changeset we are going to push as draft
638 # adds changeset we are going to push as draft
635 #
639 #
636 # should not be necessary for publishing server, but because of an
640 # should not be necessary for publishing server, but because of an
637 # issue fixed in xxxxx we have to do it anyway.
641 # issue fixed in xxxxx we have to do it anyway.
638 fdroots = list(
642 fdroots = list(
639 unfi.set(b'roots(%ln + %ln::)', outgoing.missing, droots)
643 unfi.set(b'roots(%ln + %ln::)', outgoing.missing, droots)
640 )
644 )
641 fdroots = [f.node() for f in fdroots]
645 fdroots = [f.node() for f in fdroots]
642 future = list(unfi.set(revset, fdroots, pushop.futureheads))
646 future = list(unfi.set(revset, fdroots, pushop.futureheads))
643 pushop.outdatedphases = future
647 pushop.outdatedphases = future
644 pushop.fallbackoutdatedphases = fallback
648 pushop.fallbackoutdatedphases = fallback
645
649
646
650
647 @pushdiscovery(b'obsmarker')
651 @pushdiscovery(b'obsmarker')
648 def _pushdiscoveryobsmarkers(pushop):
652 def _pushdiscoveryobsmarkers(pushop):
649 if not obsolete.isenabled(pushop.repo, obsolete.exchangeopt):
653 if not obsolete.isenabled(pushop.repo, obsolete.exchangeopt):
650 return
654 return
651
655
652 if not pushop.repo.obsstore:
656 if not pushop.repo.obsstore:
653 return
657 return
654
658
655 if b'obsolete' not in listkeys(pushop.remote, b'namespaces'):
659 if b'obsolete' not in listkeys(pushop.remote, b'namespaces'):
656 return
660 return
657
661
658 repo = pushop.repo
662 repo = pushop.repo
659 # very naive computation, that can be quite expensive on big repo.
663 # very naive computation, that can be quite expensive on big repo.
660 # However: evolution is currently slow on them anyway.
664 # However: evolution is currently slow on them anyway.
661 nodes = (c.node() for c in repo.set(b'::%ln', pushop.futureheads))
665 nodes = (c.node() for c in repo.set(b'::%ln', pushop.futureheads))
662 pushop.outobsmarkers = pushop.repo.obsstore.relevantmarkers(nodes)
666 pushop.outobsmarkers = pushop.repo.obsstore.relevantmarkers(nodes)
663
667
664
668
665 @pushdiscovery(b'bookmarks')
669 @pushdiscovery(b'bookmarks')
666 def _pushdiscoverybookmarks(pushop):
670 def _pushdiscoverybookmarks(pushop):
667 ui = pushop.ui
671 ui = pushop.ui
668 repo = pushop.repo.unfiltered()
672 repo = pushop.repo.unfiltered()
669 remote = pushop.remote
673 remote = pushop.remote
670 ui.debug(b"checking for updated bookmarks\n")
674 ui.debug(b"checking for updated bookmarks\n")
671 ancestors = ()
675 ancestors = ()
672 if pushop.revs:
676 if pushop.revs:
673 revnums = pycompat.maplist(repo.changelog.rev, pushop.revs)
677 revnums = pycompat.maplist(repo.changelog.rev, pushop.revs)
674 ancestors = repo.changelog.ancestors(revnums, inclusive=True)
678 ancestors = repo.changelog.ancestors(revnums, inclusive=True)
675
679
676 remotebookmark = bookmod.unhexlifybookmarks(listkeys(remote, b'bookmarks'))
680 remotebookmark = bookmod.unhexlifybookmarks(listkeys(remote, b'bookmarks'))
677
681
678 explicit = {
682 explicit = {
679 repo._bookmarks.expandname(bookmark) for bookmark in pushop.bookmarks
683 repo._bookmarks.expandname(bookmark) for bookmark in pushop.bookmarks
680 }
684 }
681
685
682 comp = bookmod.comparebookmarks(repo, repo._bookmarks, remotebookmark)
686 comp = bookmod.comparebookmarks(repo, repo._bookmarks, remotebookmark)
683 return _processcompared(pushop, ancestors, explicit, remotebookmark, comp)
687 return _processcompared(pushop, ancestors, explicit, remotebookmark, comp)
684
688
685
689
686 def _processcompared(pushop, pushed, explicit, remotebms, comp):
690 def _processcompared(pushop, pushed, explicit, remotebms, comp):
687 """take decision on bookmarks to push to the remote repo
691 """take decision on bookmarks to push to the remote repo
688
692
689 Exists to help extensions alter this behavior.
693 Exists to help extensions alter this behavior.
690 """
694 """
691 addsrc, adddst, advsrc, advdst, diverge, differ, invalid, same = comp
695 addsrc, adddst, advsrc, advdst, diverge, differ, invalid, same = comp
692
696
693 repo = pushop.repo
697 repo = pushop.repo
694
698
695 for b, scid, dcid in advsrc:
699 for b, scid, dcid in advsrc:
696 if b in explicit:
700 if b in explicit:
697 explicit.remove(b)
701 explicit.remove(b)
698 if not pushed or repo[scid].rev() in pushed:
702 if not pushed or repo[scid].rev() in pushed:
699 pushop.outbookmarks.append((b, dcid, scid))
703 pushop.outbookmarks.append((b, dcid, scid))
700 # search added bookmark
704 # search added bookmark
701 for b, scid, dcid in addsrc:
705 for b, scid, dcid in addsrc:
702 if b in explicit:
706 if b in explicit:
703 explicit.remove(b)
707 explicit.remove(b)
704 if bookmod.isdivergent(b):
708 if bookmod.isdivergent(b):
705 pushop.ui.warn(_(b'cannot push divergent bookmark %s!\n') % b)
709 pushop.ui.warn(_(b'cannot push divergent bookmark %s!\n') % b)
706 pushop.bkresult = 2
710 pushop.bkresult = 2
707 else:
711 else:
708 pushop.outbookmarks.append((b, b'', scid))
712 pushop.outbookmarks.append((b, b'', scid))
709 # search for overwritten bookmark
713 # search for overwritten bookmark
710 for b, scid, dcid in list(advdst) + list(diverge) + list(differ):
714 for b, scid, dcid in list(advdst) + list(diverge) + list(differ):
711 if b in explicit:
715 if b in explicit:
712 explicit.remove(b)
716 explicit.remove(b)
713 pushop.outbookmarks.append((b, dcid, scid))
717 pushop.outbookmarks.append((b, dcid, scid))
714 # search for bookmark to delete
718 # search for bookmark to delete
715 for b, scid, dcid in adddst:
719 for b, scid, dcid in adddst:
716 if b in explicit:
720 if b in explicit:
717 explicit.remove(b)
721 explicit.remove(b)
718 # treat as "deleted locally"
722 # treat as "deleted locally"
719 pushop.outbookmarks.append((b, dcid, b''))
723 pushop.outbookmarks.append((b, dcid, b''))
720 # identical bookmarks shouldn't get reported
724 # identical bookmarks shouldn't get reported
721 for b, scid, dcid in same:
725 for b, scid, dcid in same:
722 if b in explicit:
726 if b in explicit:
723 explicit.remove(b)
727 explicit.remove(b)
724
728
725 if explicit:
729 if explicit:
726 explicit = sorted(explicit)
730 explicit = sorted(explicit)
727 # we should probably list all of them
731 # we should probably list all of them
728 pushop.ui.warn(
732 pushop.ui.warn(
729 _(
733 _(
730 b'bookmark %s does not exist on the local '
734 b'bookmark %s does not exist on the local '
731 b'or remote repository!\n'
735 b'or remote repository!\n'
732 )
736 )
733 % explicit[0]
737 % explicit[0]
734 )
738 )
735 pushop.bkresult = 2
739 pushop.bkresult = 2
736
740
737 pushop.outbookmarks.sort()
741 pushop.outbookmarks.sort()
738
742
739
743
740 def _pushcheckoutgoing(pushop):
744 def _pushcheckoutgoing(pushop):
741 outgoing = pushop.outgoing
745 outgoing = pushop.outgoing
742 unfi = pushop.repo.unfiltered()
746 unfi = pushop.repo.unfiltered()
743 if not outgoing.missing:
747 if not outgoing.missing:
744 # nothing to push
748 # nothing to push
745 scmutil.nochangesfound(unfi.ui, unfi, outgoing.excluded)
749 scmutil.nochangesfound(unfi.ui, unfi, outgoing.excluded)
746 return False
750 return False
747 # something to push
751 # something to push
748 if not pushop.force:
752 if not pushop.force:
749 # if repo.obsstore == False --> no obsolete
753 # if repo.obsstore == False --> no obsolete
750 # then, save the iteration
754 # then, save the iteration
751 if unfi.obsstore:
755 if unfi.obsstore:
752 # this message are here for 80 char limit reason
756 # this message are here for 80 char limit reason
753 mso = _(b"push includes obsolete changeset: %s!")
757 mso = _(b"push includes obsolete changeset: %s!")
754 mspd = _(b"push includes phase-divergent changeset: %s!")
758 mspd = _(b"push includes phase-divergent changeset: %s!")
755 mscd = _(b"push includes content-divergent changeset: %s!")
759 mscd = _(b"push includes content-divergent changeset: %s!")
756 mst = {
760 mst = {
757 b"orphan": _(b"push includes orphan changeset: %s!"),
761 b"orphan": _(b"push includes orphan changeset: %s!"),
758 b"phase-divergent": mspd,
762 b"phase-divergent": mspd,
759 b"content-divergent": mscd,
763 b"content-divergent": mscd,
760 }
764 }
761 # If we are to push if there is at least one
765 # If we are to push if there is at least one
762 # obsolete or unstable changeset in missing, at
766 # obsolete or unstable changeset in missing, at
763 # least one of the missinghead will be obsolete or
767 # least one of the missinghead will be obsolete or
764 # unstable. So checking heads only is ok
768 # unstable. So checking heads only is ok
765 for node in outgoing.ancestorsof:
769 for node in outgoing.ancestorsof:
766 ctx = unfi[node]
770 ctx = unfi[node]
767 if ctx.obsolete():
771 if ctx.obsolete():
768 raise error.Abort(mso % ctx)
772 raise error.Abort(mso % ctx)
769 elif ctx.isunstable():
773 elif ctx.isunstable():
770 # TODO print more than one instability in the abort
774 # TODO print more than one instability in the abort
771 # message
775 # message
772 raise error.Abort(mst[ctx.instabilities()[0]] % ctx)
776 raise error.Abort(mst[ctx.instabilities()[0]] % ctx)
773
777
774 discovery.checkheads(pushop)
778 discovery.checkheads(pushop)
775 return True
779 return True
776
780
777
781
778 # List of names of steps to perform for an outgoing bundle2, order matters.
782 # List of names of steps to perform for an outgoing bundle2, order matters.
779 b2partsgenorder = []
783 b2partsgenorder = []
780
784
781 # Mapping between step name and function
785 # Mapping between step name and function
782 #
786 #
783 # This exists to help extensions wrap steps if necessary
787 # This exists to help extensions wrap steps if necessary
784 b2partsgenmapping = {}
788 b2partsgenmapping = {}
785
789
786
790
787 def b2partsgenerator(stepname, idx=None):
791 def b2partsgenerator(stepname, idx=None):
788 """decorator for function generating bundle2 part
792 """decorator for function generating bundle2 part
789
793
790 The function is added to the step -> function mapping and appended to the
794 The function is added to the step -> function mapping and appended to the
791 list of steps. Beware that decorated functions will be added in order
795 list of steps. Beware that decorated functions will be added in order
792 (this may matter).
796 (this may matter).
793
797
794 You can only use this decorator for new steps, if you want to wrap a step
798 You can only use this decorator for new steps, if you want to wrap a step
795 from an extension, attack the b2partsgenmapping dictionary directly."""
799 from an extension, attack the b2partsgenmapping dictionary directly."""
796
800
797 def dec(func):
801 def dec(func):
798 assert stepname not in b2partsgenmapping
802 assert stepname not in b2partsgenmapping
799 b2partsgenmapping[stepname] = func
803 b2partsgenmapping[stepname] = func
800 if idx is None:
804 if idx is None:
801 b2partsgenorder.append(stepname)
805 b2partsgenorder.append(stepname)
802 else:
806 else:
803 b2partsgenorder.insert(idx, stepname)
807 b2partsgenorder.insert(idx, stepname)
804 return func
808 return func
805
809
806 return dec
810 return dec
807
811
808
812
809 def _pushb2ctxcheckheads(pushop, bundler):
813 def _pushb2ctxcheckheads(pushop, bundler):
810 """Generate race condition checking parts
814 """Generate race condition checking parts
811
815
812 Exists as an independent function to aid extensions
816 Exists as an independent function to aid extensions
813 """
817 """
814 # * 'force' do not check for push race,
818 # * 'force' do not check for push race,
815 # * if we don't push anything, there are nothing to check.
819 # * if we don't push anything, there are nothing to check.
816 if not pushop.force and pushop.outgoing.ancestorsof:
820 if not pushop.force and pushop.outgoing.ancestorsof:
817 allowunrelated = b'related' in bundler.capabilities.get(
821 allowunrelated = b'related' in bundler.capabilities.get(
818 b'checkheads', ()
822 b'checkheads', ()
819 )
823 )
820 emptyremote = pushop.pushbranchmap is None
824 emptyremote = pushop.pushbranchmap is None
821 if not allowunrelated or emptyremote:
825 if not allowunrelated or emptyremote:
822 bundler.newpart(b'check:heads', data=iter(pushop.remoteheads))
826 bundler.newpart(b'check:heads', data=iter(pushop.remoteheads))
823 else:
827 else:
824 affected = set()
828 affected = set()
825 for branch, heads in pushop.pushbranchmap.items():
829 for branch, heads in pushop.pushbranchmap.items():
826 remoteheads, newheads, unsyncedheads, discardedheads = heads
830 remoteheads, newheads, unsyncedheads, discardedheads = heads
827 if remoteheads is not None:
831 if remoteheads is not None:
828 remote = set(remoteheads)
832 remote = set(remoteheads)
829 affected |= set(discardedheads) & remote
833 affected |= set(discardedheads) & remote
830 affected |= remote - set(newheads)
834 affected |= remote - set(newheads)
831 if affected:
835 if affected:
832 data = iter(sorted(affected))
836 data = iter(sorted(affected))
833 bundler.newpart(b'check:updated-heads', data=data)
837 bundler.newpart(b'check:updated-heads', data=data)
834
838
835
839
836 def _pushing(pushop):
840 def _pushing(pushop):
837 """return True if we are pushing anything"""
841 """return True if we are pushing anything"""
838 return bool(
842 return bool(
839 pushop.outgoing.missing
843 pushop.outgoing.missing
840 or pushop.outdatedphases
844 or pushop.outdatedphases
841 or pushop.outobsmarkers
845 or pushop.outobsmarkers
842 or pushop.outbookmarks
846 or pushop.outbookmarks
843 )
847 )
844
848
845
849
846 @b2partsgenerator(b'check-bookmarks')
850 @b2partsgenerator(b'check-bookmarks')
847 def _pushb2checkbookmarks(pushop, bundler):
851 def _pushb2checkbookmarks(pushop, bundler):
848 """insert bookmark move checking"""
852 """insert bookmark move checking"""
849 if not _pushing(pushop) or pushop.force:
853 if not _pushing(pushop) or pushop.force:
850 return
854 return
851 b2caps = bundle2.bundle2caps(pushop.remote)
855 b2caps = bundle2.bundle2caps(pushop.remote)
852 hasbookmarkcheck = b'bookmarks' in b2caps
856 hasbookmarkcheck = b'bookmarks' in b2caps
853 if not (pushop.outbookmarks and hasbookmarkcheck):
857 if not (pushop.outbookmarks and hasbookmarkcheck):
854 return
858 return
855 data = []
859 data = []
856 for book, old, new in pushop.outbookmarks:
860 for book, old, new in pushop.outbookmarks:
857 data.append((book, old))
861 data.append((book, old))
858 checkdata = bookmod.binaryencode(pushop.repo, data)
862 checkdata = bookmod.binaryencode(pushop.repo, data)
859 bundler.newpart(b'check:bookmarks', data=checkdata)
863 bundler.newpart(b'check:bookmarks', data=checkdata)
860
864
861
865
862 @b2partsgenerator(b'check-phases')
866 @b2partsgenerator(b'check-phases')
863 def _pushb2checkphases(pushop, bundler):
867 def _pushb2checkphases(pushop, bundler):
864 """insert phase move checking"""
868 """insert phase move checking"""
865 if not _pushing(pushop) or pushop.force:
869 if not _pushing(pushop) or pushop.force:
866 return
870 return
867 b2caps = bundle2.bundle2caps(pushop.remote)
871 b2caps = bundle2.bundle2caps(pushop.remote)
868 hasphaseheads = b'heads' in b2caps.get(b'phases', ())
872 hasphaseheads = b'heads' in b2caps.get(b'phases', ())
869 if pushop.remotephases is not None and hasphaseheads:
873 if pushop.remotephases is not None and hasphaseheads:
870 # check that the remote phase has not changed
874 # check that the remote phase has not changed
871 checks = {p: [] for p in phases.allphases}
875 checks = {p: [] for p in phases.allphases}
872 checks[phases.public].extend(pushop.remotephases.publicheads)
876 checks[phases.public].extend(pushop.remotephases.publicheads)
873 checks[phases.draft].extend(pushop.remotephases.draftroots)
877 checks[phases.draft].extend(pushop.remotephases.draftroots)
874 if any(checks.values()):
878 if any(checks.values()):
875 for phase in checks:
879 for phase in checks:
876 checks[phase].sort()
880 checks[phase].sort()
877 checkdata = phases.binaryencode(checks)
881 checkdata = phases.binaryencode(checks)
878 bundler.newpart(b'check:phases', data=checkdata)
882 bundler.newpart(b'check:phases', data=checkdata)
879
883
880
884
881 @b2partsgenerator(b'changeset')
885 @b2partsgenerator(b'changeset')
882 def _pushb2ctx(pushop, bundler):
886 def _pushb2ctx(pushop, bundler):
883 """handle changegroup push through bundle2
887 """handle changegroup push through bundle2
884
888
885 addchangegroup result is stored in the ``pushop.cgresult`` attribute.
889 addchangegroup result is stored in the ``pushop.cgresult`` attribute.
886 """
890 """
887 if b'changesets' in pushop.stepsdone:
891 if b'changesets' in pushop.stepsdone:
888 return
892 return
889 pushop.stepsdone.add(b'changesets')
893 pushop.stepsdone.add(b'changesets')
890 # Send known heads to the server for race detection.
894 # Send known heads to the server for race detection.
891 if not _pushcheckoutgoing(pushop):
895 if not _pushcheckoutgoing(pushop):
892 return
896 return
893 pushop.repo.prepushoutgoinghooks(pushop)
897 pushop.repo.prepushoutgoinghooks(pushop)
894
898
895 _pushb2ctxcheckheads(pushop, bundler)
899 _pushb2ctxcheckheads(pushop, bundler)
896
900
897 b2caps = bundle2.bundle2caps(pushop.remote)
901 b2caps = bundle2.bundle2caps(pushop.remote)
898 version = b'01'
902 version = b'01'
899 cgversions = b2caps.get(b'changegroup')
903 cgversions = b2caps.get(b'changegroup')
900 if cgversions: # 3.1 and 3.2 ship with an empty value
904 if cgversions: # 3.1 and 3.2 ship with an empty value
901 cgversions = [
905 cgversions = [
902 v
906 v
903 for v in cgversions
907 for v in cgversions
904 if v in changegroup.supportedoutgoingversions(pushop.repo)
908 if v in changegroup.supportedoutgoingversions(pushop.repo)
905 ]
909 ]
906 if not cgversions:
910 if not cgversions:
907 raise error.Abort(_(b'no common changegroup version'))
911 raise error.Abort(_(b'no common changegroup version'))
908 version = max(cgversions)
912 version = max(cgversions)
909
913
910 remote_sidedata = bundle2.read_remote_wanted_sidedata(pushop.remote)
914 remote_sidedata = bundle2.read_remote_wanted_sidedata(pushop.remote)
911 cgstream = changegroup.makestream(
915 cgstream = changegroup.makestream(
912 pushop.repo,
916 pushop.repo,
913 pushop.outgoing,
917 pushop.outgoing,
914 version,
918 version,
915 b'push',
919 b'push',
916 bundlecaps=b2caps,
920 bundlecaps=b2caps,
917 remote_sidedata=remote_sidedata,
921 remote_sidedata=remote_sidedata,
918 )
922 )
919 cgpart = bundler.newpart(b'changegroup', data=cgstream)
923 cgpart = bundler.newpart(b'changegroup', data=cgstream)
920 if cgversions:
924 if cgversions:
921 cgpart.addparam(b'version', version)
925 cgpart.addparam(b'version', version)
922 if scmutil.istreemanifest(pushop.repo):
926 if scmutil.istreemanifest(pushop.repo):
923 cgpart.addparam(b'treemanifest', b'1')
927 cgpart.addparam(b'treemanifest', b'1')
924 if repository.REPO_FEATURE_SIDE_DATA in pushop.repo.features:
928 if repository.REPO_FEATURE_SIDE_DATA in pushop.repo.features:
925 cgpart.addparam(b'exp-sidedata', b'1')
929 cgpart.addparam(b'exp-sidedata', b'1')
926
930
927 def handlereply(op):
931 def handlereply(op):
928 """extract addchangegroup returns from server reply"""
932 """extract addchangegroup returns from server reply"""
929 cgreplies = op.records.getreplies(cgpart.id)
933 cgreplies = op.records.getreplies(cgpart.id)
930 assert len(cgreplies[b'changegroup']) == 1
934 assert len(cgreplies[b'changegroup']) == 1
931 pushop.cgresult = cgreplies[b'changegroup'][0][b'return']
935 pushop.cgresult = cgreplies[b'changegroup'][0][b'return']
932
936
933 return handlereply
937 return handlereply
934
938
935
939
936 @b2partsgenerator(b'phase')
940 @b2partsgenerator(b'phase')
937 def _pushb2phases(pushop, bundler):
941 def _pushb2phases(pushop, bundler):
938 """handle phase push through bundle2"""
942 """handle phase push through bundle2"""
939 if b'phases' in pushop.stepsdone:
943 if b'phases' in pushop.stepsdone:
940 return
944 return
941 b2caps = bundle2.bundle2caps(pushop.remote)
945 b2caps = bundle2.bundle2caps(pushop.remote)
942 ui = pushop.repo.ui
946 ui = pushop.repo.ui
943
947
944 legacyphase = b'phases' in ui.configlist(b'devel', b'legacy.exchange')
948 legacyphase = b'phases' in ui.configlist(b'devel', b'legacy.exchange')
945 haspushkey = b'pushkey' in b2caps
949 haspushkey = b'pushkey' in b2caps
946 hasphaseheads = b'heads' in b2caps.get(b'phases', ())
950 hasphaseheads = b'heads' in b2caps.get(b'phases', ())
947
951
948 if hasphaseheads and not legacyphase:
952 if hasphaseheads and not legacyphase:
949 return _pushb2phaseheads(pushop, bundler)
953 return _pushb2phaseheads(pushop, bundler)
950 elif haspushkey:
954 elif haspushkey:
951 return _pushb2phasespushkey(pushop, bundler)
955 return _pushb2phasespushkey(pushop, bundler)
952
956
953
957
954 def _pushb2phaseheads(pushop, bundler):
958 def _pushb2phaseheads(pushop, bundler):
955 """push phase information through a bundle2 - binary part"""
959 """push phase information through a bundle2 - binary part"""
956 pushop.stepsdone.add(b'phases')
960 pushop.stepsdone.add(b'phases')
957 if pushop.outdatedphases:
961 if pushop.outdatedphases:
958 updates = {p: [] for p in phases.allphases}
962 updates = {p: [] for p in phases.allphases}
959 updates[0].extend(h.node() for h in pushop.outdatedphases)
963 updates[0].extend(h.node() for h in pushop.outdatedphases)
960 phasedata = phases.binaryencode(updates)
964 phasedata = phases.binaryencode(updates)
961 bundler.newpart(b'phase-heads', data=phasedata)
965 bundler.newpart(b'phase-heads', data=phasedata)
962
966
963
967
964 def _pushb2phasespushkey(pushop, bundler):
968 def _pushb2phasespushkey(pushop, bundler):
965 """push phase information through a bundle2 - pushkey part"""
969 """push phase information through a bundle2 - pushkey part"""
966 pushop.stepsdone.add(b'phases')
970 pushop.stepsdone.add(b'phases')
967 part2node = []
971 part2node = []
968
972
969 def handlefailure(pushop, exc):
973 def handlefailure(pushop, exc):
970 targetid = int(exc.partid)
974 targetid = int(exc.partid)
971 for partid, node in part2node:
975 for partid, node in part2node:
972 if partid == targetid:
976 if partid == targetid:
973 raise error.Abort(_(b'updating %s to public failed') % node)
977 raise error.Abort(_(b'updating %s to public failed') % node)
974
978
975 enc = pushkey.encode
979 enc = pushkey.encode
976 for newremotehead in pushop.outdatedphases:
980 for newremotehead in pushop.outdatedphases:
977 part = bundler.newpart(b'pushkey')
981 part = bundler.newpart(b'pushkey')
978 part.addparam(b'namespace', enc(b'phases'))
982 part.addparam(b'namespace', enc(b'phases'))
979 part.addparam(b'key', enc(newremotehead.hex()))
983 part.addparam(b'key', enc(newremotehead.hex()))
980 part.addparam(b'old', enc(b'%d' % phases.draft))
984 part.addparam(b'old', enc(b'%d' % phases.draft))
981 part.addparam(b'new', enc(b'%d' % phases.public))
985 part.addparam(b'new', enc(b'%d' % phases.public))
982 part2node.append((part.id, newremotehead))
986 part2node.append((part.id, newremotehead))
983 pushop.pkfailcb[part.id] = handlefailure
987 pushop.pkfailcb[part.id] = handlefailure
984
988
985 def handlereply(op):
989 def handlereply(op):
986 for partid, node in part2node:
990 for partid, node in part2node:
987 partrep = op.records.getreplies(partid)
991 partrep = op.records.getreplies(partid)
988 results = partrep[b'pushkey']
992 results = partrep[b'pushkey']
989 assert len(results) <= 1
993 assert len(results) <= 1
990 msg = None
994 msg = None
991 if not results:
995 if not results:
992 msg = _(b'server ignored update of %s to public!\n') % node
996 msg = _(b'server ignored update of %s to public!\n') % node
993 elif not int(results[0][b'return']):
997 elif not int(results[0][b'return']):
994 msg = _(b'updating %s to public failed!\n') % node
998 msg = _(b'updating %s to public failed!\n') % node
995 if msg is not None:
999 if msg is not None:
996 pushop.ui.warn(msg)
1000 pushop.ui.warn(msg)
997
1001
998 return handlereply
1002 return handlereply
999
1003
1000
1004
1001 @b2partsgenerator(b'obsmarkers')
1005 @b2partsgenerator(b'obsmarkers')
1002 def _pushb2obsmarkers(pushop, bundler):
1006 def _pushb2obsmarkers(pushop, bundler):
1003 if b'obsmarkers' in pushop.stepsdone:
1007 if b'obsmarkers' in pushop.stepsdone:
1004 return
1008 return
1005 remoteversions = bundle2.obsmarkersversion(bundler.capabilities)
1009 remoteversions = bundle2.obsmarkersversion(bundler.capabilities)
1006 if obsolete.commonversion(remoteversions) is None:
1010 if obsolete.commonversion(remoteversions) is None:
1007 return
1011 return
1008 pushop.stepsdone.add(b'obsmarkers')
1012 pushop.stepsdone.add(b'obsmarkers')
1009 if pushop.outobsmarkers:
1013 if pushop.outobsmarkers:
1010 markers = obsutil.sortedmarkers(pushop.outobsmarkers)
1014 markers = obsutil.sortedmarkers(pushop.outobsmarkers)
1011 bundle2.buildobsmarkerspart(bundler, markers)
1015 bundle2.buildobsmarkerspart(bundler, markers)
1012
1016
1013
1017
1014 @b2partsgenerator(b'bookmarks')
1018 @b2partsgenerator(b'bookmarks')
1015 def _pushb2bookmarks(pushop, bundler):
1019 def _pushb2bookmarks(pushop, bundler):
1016 """handle bookmark push through bundle2"""
1020 """handle bookmark push through bundle2"""
1017 if b'bookmarks' in pushop.stepsdone:
1021 if b'bookmarks' in pushop.stepsdone:
1018 return
1022 return
1019 b2caps = bundle2.bundle2caps(pushop.remote)
1023 b2caps = bundle2.bundle2caps(pushop.remote)
1020
1024
1021 legacy = pushop.repo.ui.configlist(b'devel', b'legacy.exchange')
1025 legacy = pushop.repo.ui.configlist(b'devel', b'legacy.exchange')
1022 legacybooks = b'bookmarks' in legacy
1026 legacybooks = b'bookmarks' in legacy
1023
1027
1024 if not legacybooks and b'bookmarks' in b2caps:
1028 if not legacybooks and b'bookmarks' in b2caps:
1025 return _pushb2bookmarkspart(pushop, bundler)
1029 return _pushb2bookmarkspart(pushop, bundler)
1026 elif b'pushkey' in b2caps:
1030 elif b'pushkey' in b2caps:
1027 return _pushb2bookmarkspushkey(pushop, bundler)
1031 return _pushb2bookmarkspushkey(pushop, bundler)
1028
1032
1029
1033
1030 def _bmaction(old, new):
1034 def _bmaction(old, new):
1031 """small utility for bookmark pushing"""
1035 """small utility for bookmark pushing"""
1032 if not old:
1036 if not old:
1033 return b'export'
1037 return b'export'
1034 elif not new:
1038 elif not new:
1035 return b'delete'
1039 return b'delete'
1036 return b'update'
1040 return b'update'
1037
1041
1038
1042
1039 def _abortonsecretctx(pushop, node, b):
1043 def _abortonsecretctx(pushop, node, b):
1040 """abort if a given bookmark points to a secret changeset"""
1044 """abort if a given bookmark points to a secret changeset"""
1041 if node and pushop.repo[node].phase() == phases.secret:
1045 if node and pushop.repo[node].phase() == phases.secret:
1042 raise error.Abort(
1046 raise error.Abort(
1043 _(b'cannot push bookmark %s as it points to a secret changeset') % b
1047 _(b'cannot push bookmark %s as it points to a secret changeset') % b
1044 )
1048 )
1045
1049
1046
1050
1047 def _pushb2bookmarkspart(pushop, bundler):
1051 def _pushb2bookmarkspart(pushop, bundler):
1048 pushop.stepsdone.add(b'bookmarks')
1052 pushop.stepsdone.add(b'bookmarks')
1049 if not pushop.outbookmarks:
1053 if not pushop.outbookmarks:
1050 return
1054 return
1051
1055
1052 allactions = []
1056 allactions = []
1053 data = []
1057 data = []
1054 for book, old, new in pushop.outbookmarks:
1058 for book, old, new in pushop.outbookmarks:
1055 _abortonsecretctx(pushop, new, book)
1059 _abortonsecretctx(pushop, new, book)
1056 data.append((book, new))
1060 data.append((book, new))
1057 allactions.append((book, _bmaction(old, new)))
1061 allactions.append((book, _bmaction(old, new)))
1058 checkdata = bookmod.binaryencode(pushop.repo, data)
1062 checkdata = bookmod.binaryencode(pushop.repo, data)
1059 bundler.newpart(b'bookmarks', data=checkdata)
1063 bundler.newpart(b'bookmarks', data=checkdata)
1060
1064
1061 def handlereply(op):
1065 def handlereply(op):
1062 ui = pushop.ui
1066 ui = pushop.ui
1063 # if success
1067 # if success
1064 for book, action in allactions:
1068 for book, action in allactions:
1065 ui.status(bookmsgmap[action][0] % book)
1069 ui.status(bookmsgmap[action][0] % book)
1066
1070
1067 return handlereply
1071 return handlereply
1068
1072
1069
1073
1070 def _pushb2bookmarkspushkey(pushop, bundler):
1074 def _pushb2bookmarkspushkey(pushop, bundler):
1071 pushop.stepsdone.add(b'bookmarks')
1075 pushop.stepsdone.add(b'bookmarks')
1072 part2book = []
1076 part2book = []
1073 enc = pushkey.encode
1077 enc = pushkey.encode
1074
1078
1075 def handlefailure(pushop, exc):
1079 def handlefailure(pushop, exc):
1076 targetid = int(exc.partid)
1080 targetid = int(exc.partid)
1077 for partid, book, action in part2book:
1081 for partid, book, action in part2book:
1078 if partid == targetid:
1082 if partid == targetid:
1079 raise error.Abort(bookmsgmap[action][1].rstrip() % book)
1083 raise error.Abort(bookmsgmap[action][1].rstrip() % book)
1080 # we should not be called for part we did not generated
1084 # we should not be called for part we did not generated
1081 assert False
1085 assert False
1082
1086
1083 for book, old, new in pushop.outbookmarks:
1087 for book, old, new in pushop.outbookmarks:
1084 _abortonsecretctx(pushop, new, book)
1088 _abortonsecretctx(pushop, new, book)
1085 part = bundler.newpart(b'pushkey')
1089 part = bundler.newpart(b'pushkey')
1086 part.addparam(b'namespace', enc(b'bookmarks'))
1090 part.addparam(b'namespace', enc(b'bookmarks'))
1087 part.addparam(b'key', enc(book))
1091 part.addparam(b'key', enc(book))
1088 part.addparam(b'old', enc(hex(old)))
1092 part.addparam(b'old', enc(hex(old)))
1089 part.addparam(b'new', enc(hex(new)))
1093 part.addparam(b'new', enc(hex(new)))
1090 action = b'update'
1094 action = b'update'
1091 if not old:
1095 if not old:
1092 action = b'export'
1096 action = b'export'
1093 elif not new:
1097 elif not new:
1094 action = b'delete'
1098 action = b'delete'
1095 part2book.append((part.id, book, action))
1099 part2book.append((part.id, book, action))
1096 pushop.pkfailcb[part.id] = handlefailure
1100 pushop.pkfailcb[part.id] = handlefailure
1097
1101
1098 def handlereply(op):
1102 def handlereply(op):
1099 ui = pushop.ui
1103 ui = pushop.ui
1100 for partid, book, action in part2book:
1104 for partid, book, action in part2book:
1101 partrep = op.records.getreplies(partid)
1105 partrep = op.records.getreplies(partid)
1102 results = partrep[b'pushkey']
1106 results = partrep[b'pushkey']
1103 assert len(results) <= 1
1107 assert len(results) <= 1
1104 if not results:
1108 if not results:
1105 pushop.ui.warn(_(b'server ignored bookmark %s update\n') % book)
1109 pushop.ui.warn(_(b'server ignored bookmark %s update\n') % book)
1106 else:
1110 else:
1107 ret = int(results[0][b'return'])
1111 ret = int(results[0][b'return'])
1108 if ret:
1112 if ret:
1109 ui.status(bookmsgmap[action][0] % book)
1113 ui.status(bookmsgmap[action][0] % book)
1110 else:
1114 else:
1111 ui.warn(bookmsgmap[action][1] % book)
1115 ui.warn(bookmsgmap[action][1] % book)
1112 if pushop.bkresult is not None:
1116 if pushop.bkresult is not None:
1113 pushop.bkresult = 1
1117 pushop.bkresult = 1
1114
1118
1115 return handlereply
1119 return handlereply
1116
1120
1117
1121
1118 @b2partsgenerator(b'pushvars', idx=0)
1122 @b2partsgenerator(b'pushvars', idx=0)
1119 def _getbundlesendvars(pushop, bundler):
1123 def _getbundlesendvars(pushop, bundler):
1120 '''send shellvars via bundle2'''
1124 '''send shellvars via bundle2'''
1121 pushvars = pushop.pushvars
1125 pushvars = pushop.pushvars
1122 if pushvars:
1126 if pushvars:
1123 shellvars = {}
1127 shellvars = {}
1124 for raw in pushvars:
1128 for raw in pushvars:
1125 if b'=' not in raw:
1129 if b'=' not in raw:
1126 msg = (
1130 msg = (
1127 b"unable to parse variable '%s', should follow "
1131 b"unable to parse variable '%s', should follow "
1128 b"'KEY=VALUE' or 'KEY=' format"
1132 b"'KEY=VALUE' or 'KEY=' format"
1129 )
1133 )
1130 raise error.Abort(msg % raw)
1134 raise error.Abort(msg % raw)
1131 k, v = raw.split(b'=', 1)
1135 k, v = raw.split(b'=', 1)
1132 shellvars[k] = v
1136 shellvars[k] = v
1133
1137
1134 part = bundler.newpart(b'pushvars')
1138 part = bundler.newpart(b'pushvars')
1135
1139
1136 for key, value in shellvars.items():
1140 for key, value in shellvars.items():
1137 part.addparam(key, value, mandatory=False)
1141 part.addparam(key, value, mandatory=False)
1138
1142
1139
1143
1140 def _pushbundle2(pushop):
1144 def _pushbundle2(pushop):
1141 """push data to the remote using bundle2
1145 """push data to the remote using bundle2
1142
1146
1143 The only currently supported type of data is changegroup but this will
1147 The only currently supported type of data is changegroup but this will
1144 evolve in the future."""
1148 evolve in the future."""
1145 bundler = bundle2.bundle20(pushop.ui, bundle2.bundle2caps(pushop.remote))
1149 bundler = bundle2.bundle20(pushop.ui, bundle2.bundle2caps(pushop.remote))
1146 pushback = pushop.trmanager and pushop.ui.configbool(
1150 pushback = pushop.trmanager and pushop.ui.configbool(
1147 b'experimental', b'bundle2.pushback'
1151 b'experimental', b'bundle2.pushback'
1148 )
1152 )
1149
1153
1150 # create reply capability
1154 # create reply capability
1151 capsblob = bundle2.encodecaps(
1155 capsblob = bundle2.encodecaps(
1152 bundle2.getrepocaps(pushop.repo, allowpushback=pushback, role=b'client')
1156 bundle2.getrepocaps(pushop.repo, allowpushback=pushback, role=b'client')
1153 )
1157 )
1154 bundler.newpart(b'replycaps', data=capsblob)
1158 bundler.newpart(b'replycaps', data=capsblob)
1155 replyhandlers = []
1159 replyhandlers = []
1156 for partgenname in b2partsgenorder:
1160 for partgenname in b2partsgenorder:
1157 partgen = b2partsgenmapping[partgenname]
1161 partgen = b2partsgenmapping[partgenname]
1158 ret = partgen(pushop, bundler)
1162 ret = partgen(pushop, bundler)
1159 if callable(ret):
1163 if callable(ret):
1160 replyhandlers.append(ret)
1164 replyhandlers.append(ret)
1161 # do not push if nothing to push
1165 # do not push if nothing to push
1162 if bundler.nbparts <= 1:
1166 if bundler.nbparts <= 1:
1163 return
1167 return
1164 stream = util.chunkbuffer(bundler.getchunks())
1168 stream = util.chunkbuffer(bundler.getchunks())
1165 try:
1169 try:
1166 try:
1170 try:
1167 with pushop.remote.commandexecutor() as e:
1171 with pushop.remote.commandexecutor() as e:
1168 reply = e.callcommand(
1172 reply = e.callcommand(
1169 b'unbundle',
1173 b'unbundle',
1170 {
1174 {
1171 b'bundle': stream,
1175 b'bundle': stream,
1172 b'heads': [b'force'],
1176 b'heads': [b'force'],
1173 b'url': pushop.remote.url(),
1177 b'url': pushop.remote.url(),
1174 },
1178 },
1175 ).result()
1179 ).result()
1176 except error.BundleValueError as exc:
1180 except error.BundleValueError as exc:
1177 raise error.RemoteError(_(b'missing support for %s') % exc)
1181 raise error.RemoteError(_(b'missing support for %s') % exc)
1178 try:
1182 try:
1179 trgetter = None
1183 trgetter = None
1180 if pushback:
1184 if pushback:
1181 trgetter = pushop.trmanager.transaction
1185 trgetter = pushop.trmanager.transaction
1182 op = bundle2.processbundle(pushop.repo, reply, trgetter)
1186 op = bundle2.processbundle(pushop.repo, reply, trgetter)
1183 except error.BundleValueError as exc:
1187 except error.BundleValueError as exc:
1184 raise error.RemoteError(_(b'missing support for %s') % exc)
1188 raise error.RemoteError(_(b'missing support for %s') % exc)
1185 except bundle2.AbortFromPart as exc:
1189 except bundle2.AbortFromPart as exc:
1186 pushop.ui.error(_(b'remote: %s\n') % exc)
1190 pushop.ui.error(_(b'remote: %s\n') % exc)
1187 if exc.hint is not None:
1191 if exc.hint is not None:
1188 pushop.ui.error(_(b'remote: %s\n') % (b'(%s)' % exc.hint))
1192 pushop.ui.error(_(b'remote: %s\n') % (b'(%s)' % exc.hint))
1189 raise error.RemoteError(_(b'push failed on remote'))
1193 raise error.RemoteError(_(b'push failed on remote'))
1190 except error.PushkeyFailed as exc:
1194 except error.PushkeyFailed as exc:
1191 partid = int(exc.partid)
1195 partid = int(exc.partid)
1192 if partid not in pushop.pkfailcb:
1196 if partid not in pushop.pkfailcb:
1193 raise
1197 raise
1194 pushop.pkfailcb[partid](pushop, exc)
1198 pushop.pkfailcb[partid](pushop, exc)
1195 for rephand in replyhandlers:
1199 for rephand in replyhandlers:
1196 rephand(op)
1200 rephand(op)
1197
1201
1198
1202
1199 def _pushchangeset(pushop):
1203 def _pushchangeset(pushop):
1200 """Make the actual push of changeset bundle to remote repo"""
1204 """Make the actual push of changeset bundle to remote repo"""
1201 if b'changesets' in pushop.stepsdone:
1205 if b'changesets' in pushop.stepsdone:
1202 return
1206 return
1203 pushop.stepsdone.add(b'changesets')
1207 pushop.stepsdone.add(b'changesets')
1204 if not _pushcheckoutgoing(pushop):
1208 if not _pushcheckoutgoing(pushop):
1205 return
1209 return
1206
1210
1207 # Should have verified this in push().
1211 # Should have verified this in push().
1208 assert pushop.remote.capable(b'unbundle')
1212 assert pushop.remote.capable(b'unbundle')
1209
1213
1210 pushop.repo.prepushoutgoinghooks(pushop)
1214 pushop.repo.prepushoutgoinghooks(pushop)
1211 outgoing = pushop.outgoing
1215 outgoing = pushop.outgoing
1212 # TODO: get bundlecaps from remote
1216 # TODO: get bundlecaps from remote
1213 bundlecaps = None
1217 bundlecaps = None
1214 # create a changegroup from local
1218 # create a changegroup from local
1215 if pushop.revs is None and not (
1219 if pushop.revs is None and not (
1216 outgoing.excluded or pushop.repo.changelog.filteredrevs
1220 outgoing.excluded or pushop.repo.changelog.filteredrevs
1217 ):
1221 ):
1218 # push everything,
1222 # push everything,
1219 # use the fast path, no race possible on push
1223 # use the fast path, no race possible on push
1220 cg = changegroup.makechangegroup(
1224 cg = changegroup.makechangegroup(
1221 pushop.repo,
1225 pushop.repo,
1222 outgoing,
1226 outgoing,
1223 b'01',
1227 b'01',
1224 b'push',
1228 b'push',
1225 fastpath=True,
1229 fastpath=True,
1226 bundlecaps=bundlecaps,
1230 bundlecaps=bundlecaps,
1227 )
1231 )
1228 else:
1232 else:
1229 cg = changegroup.makechangegroup(
1233 cg = changegroup.makechangegroup(
1230 pushop.repo, outgoing, b'01', b'push', bundlecaps=bundlecaps
1234 pushop.repo, outgoing, b'01', b'push', bundlecaps=bundlecaps
1231 )
1235 )
1232
1236
1233 # apply changegroup to remote
1237 # apply changegroup to remote
1234 # local repo finds heads on server, finds out what
1238 # local repo finds heads on server, finds out what
1235 # revs it must push. once revs transferred, if server
1239 # revs it must push. once revs transferred, if server
1236 # finds it has different heads (someone else won
1240 # finds it has different heads (someone else won
1237 # commit/push race), server aborts.
1241 # commit/push race), server aborts.
1238 if pushop.force:
1242 if pushop.force:
1239 remoteheads = [b'force']
1243 remoteheads = [b'force']
1240 else:
1244 else:
1241 remoteheads = pushop.remoteheads
1245 remoteheads = pushop.remoteheads
1242 # ssh: return remote's addchangegroup()
1246 # ssh: return remote's addchangegroup()
1243 # http: return remote's addchangegroup() or 0 for error
1247 # http: return remote's addchangegroup() or 0 for error
1244 pushop.cgresult = pushop.remote.unbundle(cg, remoteheads, pushop.repo.url())
1248 pushop.cgresult = pushop.remote.unbundle(cg, remoteheads, pushop.repo.url())
1245
1249
1246
1250
1247 def _pushsyncphase(pushop):
1251 def _pushsyncphase(pushop):
1248 """synchronise phase information locally and remotely"""
1252 """synchronise phase information locally and remotely"""
1249 cheads = pushop.commonheads
1253 cheads = pushop.commonheads
1250 # even when we don't push, exchanging phase data is useful
1254 # even when we don't push, exchanging phase data is useful
1251 remotephases = listkeys(pushop.remote, b'phases')
1255 remotephases = listkeys(pushop.remote, b'phases')
1252 if (
1256 if (
1253 pushop.ui.configbool(b'ui', b'_usedassubrepo')
1257 pushop.ui.configbool(b'ui', b'_usedassubrepo')
1254 and remotephases # server supports phases
1258 and remotephases # server supports phases
1255 and pushop.cgresult is None # nothing was pushed
1259 and pushop.cgresult is None # nothing was pushed
1256 and remotephases.get(b'publishing', False)
1260 and remotephases.get(b'publishing', False)
1257 ):
1261 ):
1258 # When:
1262 # When:
1259 # - this is a subrepo push
1263 # - this is a subrepo push
1260 # - and remote support phase
1264 # - and remote support phase
1261 # - and no changeset was pushed
1265 # - and no changeset was pushed
1262 # - and remote is publishing
1266 # - and remote is publishing
1263 # We may be in issue 3871 case!
1267 # We may be in issue 3871 case!
1264 # We drop the possible phase synchronisation done by
1268 # We drop the possible phase synchronisation done by
1265 # courtesy to publish changesets possibly locally draft
1269 # courtesy to publish changesets possibly locally draft
1266 # on the remote.
1270 # on the remote.
1267 remotephases = {b'publishing': b'True'}
1271 remotephases = {b'publishing': b'True'}
1268 if not remotephases: # old server or public only reply from non-publishing
1272 if not remotephases: # old server or public only reply from non-publishing
1269 _localphasemove(pushop, cheads)
1273 _localphasemove(pushop, cheads)
1270 # don't push any phase data as there is nothing to push
1274 # don't push any phase data as there is nothing to push
1271 else:
1275 else:
1272 ana = phases.analyzeremotephases(pushop.repo, cheads, remotephases)
1276 ana = phases.analyzeremotephases(pushop.repo, cheads, remotephases)
1273 pheads, droots = ana
1277 pheads, droots = ana
1274 ### Apply remote phase on local
1278 ### Apply remote phase on local
1275 if remotephases.get(b'publishing', False):
1279 if remotephases.get(b'publishing', False):
1276 _localphasemove(pushop, cheads)
1280 _localphasemove(pushop, cheads)
1277 else: # publish = False
1281 else: # publish = False
1278 _localphasemove(pushop, pheads)
1282 _localphasemove(pushop, pheads)
1279 _localphasemove(pushop, cheads, phases.draft)
1283 _localphasemove(pushop, cheads, phases.draft)
1280 ### Apply local phase on remote
1284 ### Apply local phase on remote
1281
1285
1282 if pushop.cgresult:
1286 if pushop.cgresult:
1283 if b'phases' in pushop.stepsdone:
1287 if b'phases' in pushop.stepsdone:
1284 # phases already pushed though bundle2
1288 # phases already pushed though bundle2
1285 return
1289 return
1286 outdated = pushop.outdatedphases
1290 outdated = pushop.outdatedphases
1287 else:
1291 else:
1288 outdated = pushop.fallbackoutdatedphases
1292 outdated = pushop.fallbackoutdatedphases
1289
1293
1290 pushop.stepsdone.add(b'phases')
1294 pushop.stepsdone.add(b'phases')
1291
1295
1292 # filter heads already turned public by the push
1296 # filter heads already turned public by the push
1293 outdated = [c for c in outdated if c.node() not in pheads]
1297 outdated = [c for c in outdated if c.node() not in pheads]
1294 # fallback to independent pushkey command
1298 # fallback to independent pushkey command
1295 for newremotehead in outdated:
1299 for newremotehead in outdated:
1296 with pushop.remote.commandexecutor() as e:
1300 with pushop.remote.commandexecutor() as e:
1297 r = e.callcommand(
1301 r = e.callcommand(
1298 b'pushkey',
1302 b'pushkey',
1299 {
1303 {
1300 b'namespace': b'phases',
1304 b'namespace': b'phases',
1301 b'key': newremotehead.hex(),
1305 b'key': newremotehead.hex(),
1302 b'old': b'%d' % phases.draft,
1306 b'old': b'%d' % phases.draft,
1303 b'new': b'%d' % phases.public,
1307 b'new': b'%d' % phases.public,
1304 },
1308 },
1305 ).result()
1309 ).result()
1306
1310
1307 if not r:
1311 if not r:
1308 pushop.ui.warn(
1312 pushop.ui.warn(
1309 _(b'updating %s to public failed!\n') % newremotehead
1313 _(b'updating %s to public failed!\n') % newremotehead
1310 )
1314 )
1311
1315
1312
1316
1313 def _localphasemove(pushop, nodes, phase=phases.public):
1317 def _localphasemove(pushop, nodes, phase=phases.public):
1314 """move <nodes> to <phase> in the local source repo"""
1318 """move <nodes> to <phase> in the local source repo"""
1315 if pushop.trmanager:
1319 if pushop.trmanager:
1316 phases.advanceboundary(
1320 phases.advanceboundary(
1317 pushop.repo, pushop.trmanager.transaction(), phase, nodes
1321 pushop.repo, pushop.trmanager.transaction(), phase, nodes
1318 )
1322 )
1319 else:
1323 else:
1320 # repo is not locked, do not change any phases!
1324 # repo is not locked, do not change any phases!
1321 # Informs the user that phases should have been moved when
1325 # Informs the user that phases should have been moved when
1322 # applicable.
1326 # applicable.
1323 actualmoves = [n for n in nodes if phase < pushop.repo[n].phase()]
1327 actualmoves = [n for n in nodes if phase < pushop.repo[n].phase()]
1324 phasestr = phases.phasenames[phase]
1328 phasestr = phases.phasenames[phase]
1325 if actualmoves:
1329 if actualmoves:
1326 pushop.ui.status(
1330 pushop.ui.status(
1327 _(
1331 _(
1328 b'cannot lock source repo, skipping '
1332 b'cannot lock source repo, skipping '
1329 b'local %s phase update\n'
1333 b'local %s phase update\n'
1330 )
1334 )
1331 % phasestr
1335 % phasestr
1332 )
1336 )
1333
1337
1334
1338
1335 def _pushobsolete(pushop):
1339 def _pushobsolete(pushop):
1336 """utility function to push obsolete markers to a remote"""
1340 """utility function to push obsolete markers to a remote"""
1337 if b'obsmarkers' in pushop.stepsdone:
1341 if b'obsmarkers' in pushop.stepsdone:
1338 return
1342 return
1339 repo = pushop.repo
1343 repo = pushop.repo
1340 remote = pushop.remote
1344 remote = pushop.remote
1341 pushop.stepsdone.add(b'obsmarkers')
1345 pushop.stepsdone.add(b'obsmarkers')
1342 if pushop.outobsmarkers:
1346 if pushop.outobsmarkers:
1343 pushop.ui.debug(b'try to push obsolete markers to remote\n')
1347 pushop.ui.debug(b'try to push obsolete markers to remote\n')
1344 rslts = []
1348 rslts = []
1345 markers = obsutil.sortedmarkers(pushop.outobsmarkers)
1349 markers = obsutil.sortedmarkers(pushop.outobsmarkers)
1346 remotedata = obsolete._pushkeyescape(markers)
1350 remotedata = obsolete._pushkeyescape(markers)
1347 for key in sorted(remotedata, reverse=True):
1351 for key in sorted(remotedata, reverse=True):
1348 # reverse sort to ensure we end with dump0
1352 # reverse sort to ensure we end with dump0
1349 data = remotedata[key]
1353 data = remotedata[key]
1350 rslts.append(remote.pushkey(b'obsolete', key, b'', data))
1354 rslts.append(remote.pushkey(b'obsolete', key, b'', data))
1351 if [r for r in rslts if not r]:
1355 if [r for r in rslts if not r]:
1352 msg = _(b'failed to push some obsolete markers!\n')
1356 msg = _(b'failed to push some obsolete markers!\n')
1353 repo.ui.warn(msg)
1357 repo.ui.warn(msg)
1354
1358
1355
1359
1356 def _pushbookmark(pushop):
1360 def _pushbookmark(pushop):
1357 """Update bookmark position on remote"""
1361 """Update bookmark position on remote"""
1358 if pushop.cgresult == 0 or b'bookmarks' in pushop.stepsdone:
1362 if pushop.cgresult == 0 or b'bookmarks' in pushop.stepsdone:
1359 return
1363 return
1360 pushop.stepsdone.add(b'bookmarks')
1364 pushop.stepsdone.add(b'bookmarks')
1361 ui = pushop.ui
1365 ui = pushop.ui
1362 remote = pushop.remote
1366 remote = pushop.remote
1363
1367
1364 for b, old, new in pushop.outbookmarks:
1368 for b, old, new in pushop.outbookmarks:
1365 action = b'update'
1369 action = b'update'
1366 if not old:
1370 if not old:
1367 action = b'export'
1371 action = b'export'
1368 elif not new:
1372 elif not new:
1369 action = b'delete'
1373 action = b'delete'
1370
1374
1371 with remote.commandexecutor() as e:
1375 with remote.commandexecutor() as e:
1372 r = e.callcommand(
1376 r = e.callcommand(
1373 b'pushkey',
1377 b'pushkey',
1374 {
1378 {
1375 b'namespace': b'bookmarks',
1379 b'namespace': b'bookmarks',
1376 b'key': b,
1380 b'key': b,
1377 b'old': hex(old),
1381 b'old': hex(old),
1378 b'new': hex(new),
1382 b'new': hex(new),
1379 },
1383 },
1380 ).result()
1384 ).result()
1381
1385
1382 if r:
1386 if r:
1383 ui.status(bookmsgmap[action][0] % b)
1387 ui.status(bookmsgmap[action][0] % b)
1384 else:
1388 else:
1385 ui.warn(bookmsgmap[action][1] % b)
1389 ui.warn(bookmsgmap[action][1] % b)
1386 # discovery can have set the value form invalid entry
1390 # discovery can have set the value form invalid entry
1387 if pushop.bkresult is not None:
1391 if pushop.bkresult is not None:
1388 pushop.bkresult = 1
1392 pushop.bkresult = 1
1389
1393
1390
1394
1391 class pulloperation:
1395 class pulloperation:
1392 """A object that represent a single pull operation
1396 """A object that represent a single pull operation
1393
1397
1394 It purpose is to carry pull related state and very common operation.
1398 It purpose is to carry pull related state and very common operation.
1395
1399
1396 A new should be created at the beginning of each pull and discarded
1400 A new should be created at the beginning of each pull and discarded
1397 afterward.
1401 afterward.
1398 """
1402 """
1399
1403
1400 def __init__(
1404 def __init__(
1401 self,
1405 self,
1402 repo,
1406 repo,
1403 remote,
1407 remote,
1404 heads=None,
1408 heads=None,
1405 force=False,
1409 force=False,
1406 bookmarks=(),
1410 bookmarks=(),
1407 remotebookmarks=None,
1411 remotebookmarks=None,
1408 streamclonerequested=None,
1412 streamclonerequested=None,
1409 includepats=None,
1413 includepats=None,
1410 excludepats=None,
1414 excludepats=None,
1411 depth=None,
1415 depth=None,
1412 path=None,
1416 path=None,
1413 ):
1417 ):
1414 # repo we pull into
1418 # repo we pull into
1415 self.repo = repo
1419 self.repo = repo
1416 # repo we pull from
1420 # repo we pull from
1417 self.remote = remote
1421 self.remote = remote
1418 # path object used to build this remote
1422 # path object used to build this remote
1419 #
1423 #
1420 # Ideally, the remote peer would carry that directly.
1424 # Ideally, the remote peer would carry that directly.
1421 self.remote_path = path
1425 self.remote_path = path
1422 # revision we try to pull (None is "all")
1426 # revision we try to pull (None is "all")
1423 self.heads = heads
1427 self.heads = heads
1424 # bookmark pulled explicitly
1428 # bookmark pulled explicitly
1425 self.explicitbookmarks = [
1429 self.explicitbookmarks = [
1426 repo._bookmarks.expandname(bookmark) for bookmark in bookmarks
1430 repo._bookmarks.expandname(bookmark) for bookmark in bookmarks
1427 ]
1431 ]
1428 # do we force pull?
1432 # do we force pull?
1429 self.force = force
1433 self.force = force
1430 # whether a streaming clone was requested
1434 # whether a streaming clone was requested
1431 self.streamclonerequested = streamclonerequested
1435 self.streamclonerequested = streamclonerequested
1432 # transaction manager
1436 # transaction manager
1433 self.trmanager = None
1437 self.trmanager = None
1434 # set of common changeset between local and remote before pull
1438 # set of common changeset between local and remote before pull
1435 self.common = None
1439 self.common = None
1436 # set of pulled head
1440 # set of pulled head
1437 self.rheads = None
1441 self.rheads = None
1438 # list of missing changeset to fetch remotely
1442 # list of missing changeset to fetch remotely
1439 self.fetch = None
1443 self.fetch = None
1440 # remote bookmarks data
1444 # remote bookmarks data
1441 self.remotebookmarks = remotebookmarks
1445 self.remotebookmarks = remotebookmarks
1442 # result of changegroup pulling (used as return code by pull)
1446 # result of changegroup pulling (used as return code by pull)
1443 self.cgresult = None
1447 self.cgresult = None
1444 # list of step already done
1448 # list of step already done
1445 self.stepsdone = set()
1449 self.stepsdone = set()
1446 # Whether we attempted a clone from pre-generated bundles.
1450 # Whether we attempted a clone from pre-generated bundles.
1447 self.clonebundleattempted = False
1451 self.clonebundleattempted = False
1448 # Set of file patterns to include.
1452 # Set of file patterns to include.
1449 self.includepats = includepats
1453 self.includepats = includepats
1450 # Set of file patterns to exclude.
1454 # Set of file patterns to exclude.
1451 self.excludepats = excludepats
1455 self.excludepats = excludepats
1452 # Number of ancestor changesets to pull from each pulled head.
1456 # Number of ancestor changesets to pull from each pulled head.
1453 self.depth = depth
1457 self.depth = depth
1454
1458
1455 @util.propertycache
1459 @util.propertycache
1456 def pulledsubset(self):
1460 def pulledsubset(self):
1457 """heads of the set of changeset target by the pull"""
1461 """heads of the set of changeset target by the pull"""
1458 # compute target subset
1462 # compute target subset
1459 if self.heads is None:
1463 if self.heads is None:
1460 # We pulled every thing possible
1464 # We pulled every thing possible
1461 # sync on everything common
1465 # sync on everything common
1462 c = set(self.common)
1466 c = set(self.common)
1463 ret = list(self.common)
1467 ret = list(self.common)
1464 for n in self.rheads:
1468 for n in self.rheads:
1465 if n not in c:
1469 if n not in c:
1466 ret.append(n)
1470 ret.append(n)
1467 return ret
1471 return ret
1468 else:
1472 else:
1469 # We pulled a specific subset
1473 # We pulled a specific subset
1470 # sync on this subset
1474 # sync on this subset
1471 return self.heads
1475 return self.heads
1472
1476
1473 @util.propertycache
1477 @util.propertycache
1474 def canusebundle2(self):
1478 def canusebundle2(self):
1475 return not _forcebundle1(self)
1479 return not _forcebundle1(self)
1476
1480
1477 @util.propertycache
1481 @util.propertycache
1478 def remotebundle2caps(self):
1482 def remotebundle2caps(self):
1479 return bundle2.bundle2caps(self.remote)
1483 return bundle2.bundle2caps(self.remote)
1480
1484
1481 def gettransaction(self):
1485 def gettransaction(self):
1482 # deprecated; talk to trmanager directly
1486 # deprecated; talk to trmanager directly
1483 return self.trmanager.transaction()
1487 return self.trmanager.transaction()
1484
1488
1485
1489
1486 class transactionmanager(util.transactional):
1490 class transactionmanager(util.transactional):
1487 """An object to manage the life cycle of a transaction
1491 """An object to manage the life cycle of a transaction
1488
1492
1489 It creates the transaction on demand and calls the appropriate hooks when
1493 It creates the transaction on demand and calls the appropriate hooks when
1490 closing the transaction."""
1494 closing the transaction."""
1491
1495
1492 def __init__(self, repo, source, url):
1496 def __init__(self, repo, source, url):
1493 self.repo = repo
1497 self.repo = repo
1494 self.source = source
1498 self.source = source
1495 self.url = url
1499 self.url = url
1496 self._tr = None
1500 self._tr = None
1497
1501
1498 def transaction(self):
1502 def transaction(self):
1499 """Return an open transaction object, constructing if necessary"""
1503 """Return an open transaction object, constructing if necessary"""
1500 if not self._tr:
1504 if not self._tr:
1501 trname = b'%s\n%s' % (self.source, urlutil.hidepassword(self.url))
1505 trname = b'%s\n%s' % (self.source, urlutil.hidepassword(self.url))
1502 self._tr = self.repo.transaction(trname)
1506 self._tr = self.repo.transaction(trname)
1503 self._tr.hookargs[b'source'] = self.source
1507 self._tr.hookargs[b'source'] = self.source
1504 self._tr.hookargs[b'url'] = self.url
1508 self._tr.hookargs[b'url'] = self.url
1505 return self._tr
1509 return self._tr
1506
1510
1507 def close(self):
1511 def close(self):
1508 """close transaction if created"""
1512 """close transaction if created"""
1509 if self._tr is not None:
1513 if self._tr is not None:
1510 self._tr.close()
1514 self._tr.close()
1511
1515
1512 def release(self):
1516 def release(self):
1513 """release transaction if created"""
1517 """release transaction if created"""
1514 if self._tr is not None:
1518 if self._tr is not None:
1515 self._tr.release()
1519 self._tr.release()
1516
1520
1517
1521
1518 def listkeys(remote, namespace):
1522 def listkeys(remote, namespace):
1519 with remote.commandexecutor() as e:
1523 with remote.commandexecutor() as e:
1520 return e.callcommand(b'listkeys', {b'namespace': namespace}).result()
1524 return e.callcommand(b'listkeys', {b'namespace': namespace}).result()
1521
1525
1522
1526
1523 def _fullpullbundle2(repo, pullop):
1527 def _fullpullbundle2(repo, pullop):
1524 # The server may send a partial reply, i.e. when inlining
1528 # The server may send a partial reply, i.e. when inlining
1525 # pre-computed bundles. In that case, update the common
1529 # pre-computed bundles. In that case, update the common
1526 # set based on the results and pull another bundle.
1530 # set based on the results and pull another bundle.
1527 #
1531 #
1528 # There are two indicators that the process is finished:
1532 # There are two indicators that the process is finished:
1529 # - no changeset has been added, or
1533 # - no changeset has been added, or
1530 # - all remote heads are known locally.
1534 # - all remote heads are known locally.
1531 # The head check must use the unfiltered view as obsoletion
1535 # The head check must use the unfiltered view as obsoletion
1532 # markers can hide heads.
1536 # markers can hide heads.
1533 unfi = repo.unfiltered()
1537 unfi = repo.unfiltered()
1534 unficl = unfi.changelog
1538 unficl = unfi.changelog
1535
1539
1536 def headsofdiff(h1, h2):
1540 def headsofdiff(h1, h2):
1537 """Returns heads(h1 % h2)"""
1541 """Returns heads(h1 % h2)"""
1538 res = unfi.set(b'heads(%ln %% %ln)', h1, h2)
1542 res = unfi.set(b'heads(%ln %% %ln)', h1, h2)
1539 return {ctx.node() for ctx in res}
1543 return {ctx.node() for ctx in res}
1540
1544
1541 def headsofunion(h1, h2):
1545 def headsofunion(h1, h2):
1542 """Returns heads((h1 + h2) - null)"""
1546 """Returns heads((h1 + h2) - null)"""
1543 res = unfi.set(b'heads((%ln + %ln - null))', h1, h2)
1547 res = unfi.set(b'heads((%ln + %ln - null))', h1, h2)
1544 return {ctx.node() for ctx in res}
1548 return {ctx.node() for ctx in res}
1545
1549
1546 while True:
1550 while True:
1547 old_heads = unficl.heads()
1551 old_heads = unficl.heads()
1548 clstart = len(unficl)
1552 clstart = len(unficl)
1549 _pullbundle2(pullop)
1553 _pullbundle2(pullop)
1550 if requirements.NARROW_REQUIREMENT in repo.requirements:
1554 if requirements.NARROW_REQUIREMENT in repo.requirements:
1551 # XXX narrow clones filter the heads on the server side during
1555 # XXX narrow clones filter the heads on the server side during
1552 # XXX getbundle and result in partial replies as well.
1556 # XXX getbundle and result in partial replies as well.
1553 # XXX Disable pull bundles in this case as band aid to avoid
1557 # XXX Disable pull bundles in this case as band aid to avoid
1554 # XXX extra round trips.
1558 # XXX extra round trips.
1555 break
1559 break
1556 if clstart == len(unficl):
1560 if clstart == len(unficl):
1557 break
1561 break
1558 if all(unficl.hasnode(n) for n in pullop.rheads):
1562 if all(unficl.hasnode(n) for n in pullop.rheads):
1559 break
1563 break
1560 new_heads = headsofdiff(unficl.heads(), old_heads)
1564 new_heads = headsofdiff(unficl.heads(), old_heads)
1561 pullop.common = headsofunion(new_heads, pullop.common)
1565 pullop.common = headsofunion(new_heads, pullop.common)
1562 pullop.rheads = set(pullop.rheads) - pullop.common
1566 pullop.rheads = set(pullop.rheads) - pullop.common
1563
1567
1564
1568
1565 def add_confirm_callback(repo, pullop):
1569 def add_confirm_callback(repo, pullop):
1566 """adds a finalize callback to transaction which can be used to show stats
1570 """adds a finalize callback to transaction which can be used to show stats
1567 to user and confirm the pull before committing transaction"""
1571 to user and confirm the pull before committing transaction"""
1568
1572
1569 tr = pullop.trmanager.transaction()
1573 tr = pullop.trmanager.transaction()
1570 scmutil.registersummarycallback(
1574 scmutil.registersummarycallback(
1571 repo, tr, txnname=b'pull', as_validator=True
1575 repo, tr, txnname=b'pull', as_validator=True
1572 )
1576 )
1573 reporef = weakref.ref(repo.unfiltered())
1577 reporef = weakref.ref(repo.unfiltered())
1574
1578
1575 def prompt(tr):
1579 def prompt(tr):
1576 repo = reporef()
1580 repo = reporef()
1577 cm = _(b'accept incoming changes (yn)?$$ &Yes $$ &No')
1581 cm = _(b'accept incoming changes (yn)?$$ &Yes $$ &No')
1578 if repo.ui.promptchoice(cm):
1582 if repo.ui.promptchoice(cm):
1579 raise error.Abort(b"user aborted")
1583 raise error.Abort(b"user aborted")
1580
1584
1581 tr.addvalidator(b'900-pull-prompt', prompt)
1585 tr.addvalidator(b'900-pull-prompt', prompt)
1582
1586
1583
1587
1584 def pull(
1588 def pull(
1585 repo,
1589 repo,
1586 remote,
1590 remote,
1587 path=None,
1591 path=None,
1588 heads=None,
1592 heads=None,
1589 force=False,
1593 force=False,
1590 bookmarks=(),
1594 bookmarks=(),
1591 opargs=None,
1595 opargs=None,
1592 streamclonerequested=None,
1596 streamclonerequested=None,
1593 includepats=None,
1597 includepats=None,
1594 excludepats=None,
1598 excludepats=None,
1595 depth=None,
1599 depth=None,
1596 confirm=None,
1600 confirm=None,
1597 ):
1601 ):
1598 """Fetch repository data from a remote.
1602 """Fetch repository data from a remote.
1599
1603
1600 This is the main function used to retrieve data from a remote repository.
1604 This is the main function used to retrieve data from a remote repository.
1601
1605
1602 ``repo`` is the local repository to clone into.
1606 ``repo`` is the local repository to clone into.
1603 ``remote`` is a peer instance.
1607 ``remote`` is a peer instance.
1604 ``heads`` is an iterable of revisions we want to pull. ``None`` (the
1608 ``heads`` is an iterable of revisions we want to pull. ``None`` (the
1605 default) means to pull everything from the remote.
1609 default) means to pull everything from the remote.
1606 ``bookmarks`` is an iterable of bookmarks requesting to be pulled. By
1610 ``bookmarks`` is an iterable of bookmarks requesting to be pulled. By
1607 default, all remote bookmarks are pulled.
1611 default, all remote bookmarks are pulled.
1608 ``opargs`` are additional keyword arguments to pass to ``pulloperation``
1612 ``opargs`` are additional keyword arguments to pass to ``pulloperation``
1609 initialization.
1613 initialization.
1610 ``streamclonerequested`` is a boolean indicating whether a "streaming
1614 ``streamclonerequested`` is a boolean indicating whether a "streaming
1611 clone" is requested. A "streaming clone" is essentially a raw file copy
1615 clone" is requested. A "streaming clone" is essentially a raw file copy
1612 of revlogs from the server. This only works when the local repository is
1616 of revlogs from the server. This only works when the local repository is
1613 empty. The default value of ``None`` means to respect the server
1617 empty. The default value of ``None`` means to respect the server
1614 configuration for preferring stream clones.
1618 configuration for preferring stream clones.
1615 ``includepats`` and ``excludepats`` define explicit file patterns to
1619 ``includepats`` and ``excludepats`` define explicit file patterns to
1616 include and exclude in storage, respectively. If not defined, narrow
1620 include and exclude in storage, respectively. If not defined, narrow
1617 patterns from the repo instance are used, if available.
1621 patterns from the repo instance are used, if available.
1618 ``depth`` is an integer indicating the DAG depth of history we're
1622 ``depth`` is an integer indicating the DAG depth of history we're
1619 interested in. If defined, for each revision specified in ``heads``, we
1623 interested in. If defined, for each revision specified in ``heads``, we
1620 will fetch up to this many of its ancestors and data associated with them.
1624 will fetch up to this many of its ancestors and data associated with them.
1621 ``confirm`` is a boolean indicating whether the pull should be confirmed
1625 ``confirm`` is a boolean indicating whether the pull should be confirmed
1622 before committing the transaction. This overrides HGPLAIN.
1626 before committing the transaction. This overrides HGPLAIN.
1623
1627
1624 Returns the ``pulloperation`` created for this pull.
1628 Returns the ``pulloperation`` created for this pull.
1625 """
1629 """
1626 if opargs is None:
1630 if opargs is None:
1627 opargs = {}
1631 opargs = {}
1628
1632
1629 # We allow the narrow patterns to be passed in explicitly to provide more
1633 # We allow the narrow patterns to be passed in explicitly to provide more
1630 # flexibility for API consumers.
1634 # flexibility for API consumers.
1631 if includepats or excludepats:
1635 if includepats or excludepats:
1632 includepats = includepats or set()
1636 includepats = includepats or set()
1633 excludepats = excludepats or set()
1637 excludepats = excludepats or set()
1634 else:
1638 else:
1635 includepats, excludepats = repo.narrowpats
1639 includepats, excludepats = repo.narrowpats
1636
1640
1637 narrowspec.validatepatterns(includepats)
1641 narrowspec.validatepatterns(includepats)
1638 narrowspec.validatepatterns(excludepats)
1642 narrowspec.validatepatterns(excludepats)
1639
1643
1640 pullop = pulloperation(
1644 pullop = pulloperation(
1641 repo,
1645 repo,
1642 remote,
1646 remote,
1643 path=path,
1647 path=path,
1644 heads=heads,
1648 heads=heads,
1645 force=force,
1649 force=force,
1646 bookmarks=bookmarks,
1650 bookmarks=bookmarks,
1647 streamclonerequested=streamclonerequested,
1651 streamclonerequested=streamclonerequested,
1648 includepats=includepats,
1652 includepats=includepats,
1649 excludepats=excludepats,
1653 excludepats=excludepats,
1650 depth=depth,
1654 depth=depth,
1651 **pycompat.strkwargs(opargs)
1655 **pycompat.strkwargs(opargs)
1652 )
1656 )
1653
1657
1654 peerlocal = pullop.remote.local()
1658 peerlocal = pullop.remote.local()
1655 if peerlocal:
1659 if peerlocal:
1656 missing = set(peerlocal.requirements) - pullop.repo.supported
1660 missing = set(peerlocal.requirements) - pullop.repo.supported
1657 if missing:
1661 if missing:
1658 msg = _(
1662 msg = _(
1659 b"required features are not"
1663 b"required features are not"
1660 b" supported in the destination:"
1664 b" supported in the destination:"
1661 b" %s"
1665 b" %s"
1662 ) % (b', '.join(sorted(missing)))
1666 ) % (b', '.join(sorted(missing)))
1663 raise error.Abort(msg)
1667 raise error.Abort(msg)
1664
1668
1665 for category in repo._wanted_sidedata:
1669 for category in repo._wanted_sidedata:
1666 # Check that a computer is registered for that category for at least
1670 # Check that a computer is registered for that category for at least
1667 # one revlog kind.
1671 # one revlog kind.
1668 for kind, computers in repo._sidedata_computers.items():
1672 for kind, computers in repo._sidedata_computers.items():
1669 if computers.get(category):
1673 if computers.get(category):
1670 break
1674 break
1671 else:
1675 else:
1672 # This should never happen since repos are supposed to be able to
1676 # This should never happen since repos are supposed to be able to
1673 # generate the sidedata they require.
1677 # generate the sidedata they require.
1674 raise error.ProgrammingError(
1678 raise error.ProgrammingError(
1675 _(
1679 _(
1676 b'sidedata category requested by local side without local'
1680 b'sidedata category requested by local side without local'
1677 b"support: '%s'"
1681 b"support: '%s'"
1678 )
1682 )
1679 % pycompat.bytestr(category)
1683 % pycompat.bytestr(category)
1680 )
1684 )
1681
1685
1682 pullop.trmanager = transactionmanager(repo, b'pull', remote.url())
1686 pullop.trmanager = transactionmanager(repo, b'pull', remote.url())
1683 wlock = util.nullcontextmanager()
1687 wlock = util.nullcontextmanager()
1684 if not bookmod.bookmarksinstore(repo):
1688 if not bookmod.bookmarksinstore(repo):
1685 wlock = repo.wlock()
1689 wlock = repo.wlock()
1686 with wlock, repo.lock(), pullop.trmanager:
1690 with wlock, repo.lock(), pullop.trmanager:
1687 if confirm or (
1691 if confirm or (
1688 repo.ui.configbool(b"pull", b"confirm") and not repo.ui.plain()
1692 repo.ui.configbool(b"pull", b"confirm") and not repo.ui.plain()
1689 ):
1693 ):
1690 add_confirm_callback(repo, pullop)
1694 add_confirm_callback(repo, pullop)
1691
1695
1692 # This should ideally be in _pullbundle2(). However, it needs to run
1696 # This should ideally be in _pullbundle2(). However, it needs to run
1693 # before discovery to avoid extra work.
1697 # before discovery to avoid extra work.
1694 _maybeapplyclonebundle(pullop)
1698 _maybeapplyclonebundle(pullop)
1695 streamclone.maybeperformlegacystreamclone(pullop)
1699 streamclone.maybeperformlegacystreamclone(pullop)
1696 _pulldiscovery(pullop)
1700 _pulldiscovery(pullop)
1697 if pullop.canusebundle2:
1701 if pullop.canusebundle2:
1698 _fullpullbundle2(repo, pullop)
1702 _fullpullbundle2(repo, pullop)
1699 _pullchangeset(pullop)
1703 _pullchangeset(pullop)
1700 _pullphase(pullop)
1704 _pullphase(pullop)
1701 _pullbookmarks(pullop)
1705 _pullbookmarks(pullop)
1702 _pullobsolete(pullop)
1706 _pullobsolete(pullop)
1703
1707
1704 # storing remotenames
1708 # storing remotenames
1705 if repo.ui.configbool(b'experimental', b'remotenames'):
1709 if repo.ui.configbool(b'experimental', b'remotenames'):
1706 logexchange.pullremotenames(repo, remote)
1710 logexchange.pullremotenames(repo, remote)
1707
1711
1708 return pullop
1712 return pullop
1709
1713
1710
1714
1711 # list of steps to perform discovery before pull
1715 # list of steps to perform discovery before pull
1712 pulldiscoveryorder = []
1716 pulldiscoveryorder = []
1713
1717
1714 # Mapping between step name and function
1718 # Mapping between step name and function
1715 #
1719 #
1716 # This exists to help extensions wrap steps if necessary
1720 # This exists to help extensions wrap steps if necessary
1717 pulldiscoverymapping = {}
1721 pulldiscoverymapping = {}
1718
1722
1719
1723
1720 def pulldiscovery(stepname):
1724 def pulldiscovery(stepname):
1721 """decorator for function performing discovery before pull
1725 """decorator for function performing discovery before pull
1722
1726
1723 The function is added to the step -> function mapping and appended to the
1727 The function is added to the step -> function mapping and appended to the
1724 list of steps. Beware that decorated function will be added in order (this
1728 list of steps. Beware that decorated function will be added in order (this
1725 may matter).
1729 may matter).
1726
1730
1727 You can only use this decorator for a new step, if you want to wrap a step
1731 You can only use this decorator for a new step, if you want to wrap a step
1728 from an extension, change the pulldiscovery dictionary directly."""
1732 from an extension, change the pulldiscovery dictionary directly."""
1729
1733
1730 def dec(func):
1734 def dec(func):
1731 assert stepname not in pulldiscoverymapping
1735 assert stepname not in pulldiscoverymapping
1732 pulldiscoverymapping[stepname] = func
1736 pulldiscoverymapping[stepname] = func
1733 pulldiscoveryorder.append(stepname)
1737 pulldiscoveryorder.append(stepname)
1734 return func
1738 return func
1735
1739
1736 return dec
1740 return dec
1737
1741
1738
1742
1739 def _pulldiscovery(pullop):
1743 def _pulldiscovery(pullop):
1740 """Run all discovery steps"""
1744 """Run all discovery steps"""
1741 for stepname in pulldiscoveryorder:
1745 for stepname in pulldiscoveryorder:
1742 step = pulldiscoverymapping[stepname]
1746 step = pulldiscoverymapping[stepname]
1743 step(pullop)
1747 step(pullop)
1744
1748
1745
1749
1746 @pulldiscovery(b'b1:bookmarks')
1750 @pulldiscovery(b'b1:bookmarks')
1747 def _pullbookmarkbundle1(pullop):
1751 def _pullbookmarkbundle1(pullop):
1748 """fetch bookmark data in bundle1 case
1752 """fetch bookmark data in bundle1 case
1749
1753
1750 If not using bundle2, we have to fetch bookmarks before changeset
1754 If not using bundle2, we have to fetch bookmarks before changeset
1751 discovery to reduce the chance and impact of race conditions."""
1755 discovery to reduce the chance and impact of race conditions."""
1752 if pullop.remotebookmarks is not None:
1756 if pullop.remotebookmarks is not None:
1753 return
1757 return
1754 if pullop.canusebundle2 and b'listkeys' in pullop.remotebundle2caps:
1758 if pullop.canusebundle2 and b'listkeys' in pullop.remotebundle2caps:
1755 # all known bundle2 servers now support listkeys, but lets be nice with
1759 # all known bundle2 servers now support listkeys, but lets be nice with
1756 # new implementation.
1760 # new implementation.
1757 return
1761 return
1758 books = listkeys(pullop.remote, b'bookmarks')
1762 books = listkeys(pullop.remote, b'bookmarks')
1759 pullop.remotebookmarks = bookmod.unhexlifybookmarks(books)
1763 pullop.remotebookmarks = bookmod.unhexlifybookmarks(books)
1760
1764
1761
1765
1762 @pulldiscovery(b'changegroup')
1766 @pulldiscovery(b'changegroup')
1763 def _pulldiscoverychangegroup(pullop):
1767 def _pulldiscoverychangegroup(pullop):
1764 """discovery phase for the pull
1768 """discovery phase for the pull
1765
1769
1766 Current handle changeset discovery only, will change handle all discovery
1770 Current handle changeset discovery only, will change handle all discovery
1767 at some point."""
1771 at some point."""
1768 tmp = discovery.findcommonincoming(
1772 tmp = discovery.findcommonincoming(
1769 pullop.repo, pullop.remote, heads=pullop.heads, force=pullop.force
1773 pullop.repo, pullop.remote, heads=pullop.heads, force=pullop.force
1770 )
1774 )
1771 common, fetch, rheads = tmp
1775 common, fetch, rheads = tmp
1772 has_node = pullop.repo.unfiltered().changelog.index.has_node
1776 has_node = pullop.repo.unfiltered().changelog.index.has_node
1773 if fetch and rheads:
1777 if fetch and rheads:
1774 # If a remote heads is filtered locally, put in back in common.
1778 # If a remote heads is filtered locally, put in back in common.
1775 #
1779 #
1776 # This is a hackish solution to catch most of "common but locally
1780 # This is a hackish solution to catch most of "common but locally
1777 # hidden situation". We do not performs discovery on unfiltered
1781 # hidden situation". We do not performs discovery on unfiltered
1778 # repository because it end up doing a pathological amount of round
1782 # repository because it end up doing a pathological amount of round
1779 # trip for w huge amount of changeset we do not care about.
1783 # trip for w huge amount of changeset we do not care about.
1780 #
1784 #
1781 # If a set of such "common but filtered" changeset exist on the server
1785 # If a set of such "common but filtered" changeset exist on the server
1782 # but are not including a remote heads, we'll not be able to detect it,
1786 # but are not including a remote heads, we'll not be able to detect it,
1783 scommon = set(common)
1787 scommon = set(common)
1784 for n in rheads:
1788 for n in rheads:
1785 if has_node(n):
1789 if has_node(n):
1786 if n not in scommon:
1790 if n not in scommon:
1787 common.append(n)
1791 common.append(n)
1788 if set(rheads).issubset(set(common)):
1792 if set(rheads).issubset(set(common)):
1789 fetch = []
1793 fetch = []
1790 pullop.common = common
1794 pullop.common = common
1791 pullop.fetch = fetch
1795 pullop.fetch = fetch
1792 pullop.rheads = rheads
1796 pullop.rheads = rheads
1793
1797
1794
1798
1795 def _pullbundle2(pullop):
1799 def _pullbundle2(pullop):
1796 """pull data using bundle2
1800 """pull data using bundle2
1797
1801
1798 For now, the only supported data are changegroup."""
1802 For now, the only supported data are changegroup."""
1799 kwargs = {b'bundlecaps': caps20to10(pullop.repo, role=b'client')}
1803 kwargs = {b'bundlecaps': caps20to10(pullop.repo, role=b'client')}
1800
1804
1801 # make ui easier to access
1805 # make ui easier to access
1802 ui = pullop.repo.ui
1806 ui = pullop.repo.ui
1803
1807
1804 # At the moment we don't do stream clones over bundle2. If that is
1808 # At the moment we don't do stream clones over bundle2. If that is
1805 # implemented then here's where the check for that will go.
1809 # implemented then here's where the check for that will go.
1806 streaming = streamclone.canperformstreamclone(pullop, bundle2=True)[0]
1810 streaming = streamclone.canperformstreamclone(pullop, bundle2=True)[0]
1807
1811
1808 # declare pull perimeters
1812 # declare pull perimeters
1809 kwargs[b'common'] = pullop.common
1813 kwargs[b'common'] = pullop.common
1810 kwargs[b'heads'] = pullop.heads or pullop.rheads
1814 kwargs[b'heads'] = pullop.heads or pullop.rheads
1811
1815
1812 # check server supports narrow and then adding includepats and excludepats
1816 # check server supports narrow and then adding includepats and excludepats
1813 servernarrow = pullop.remote.capable(wireprototypes.NARROWCAP)
1817 servernarrow = pullop.remote.capable(wireprototypes.NARROWCAP)
1814 if servernarrow and pullop.includepats:
1818 if servernarrow and pullop.includepats:
1815 kwargs[b'includepats'] = pullop.includepats
1819 kwargs[b'includepats'] = pullop.includepats
1816 if servernarrow and pullop.excludepats:
1820 if servernarrow and pullop.excludepats:
1817 kwargs[b'excludepats'] = pullop.excludepats
1821 kwargs[b'excludepats'] = pullop.excludepats
1818
1822
1819 if streaming:
1823 if streaming:
1820 kwargs[b'cg'] = False
1824 kwargs[b'cg'] = False
1821 kwargs[b'stream'] = True
1825 kwargs[b'stream'] = True
1822 pullop.stepsdone.add(b'changegroup')
1826 pullop.stepsdone.add(b'changegroup')
1823 pullop.stepsdone.add(b'phases')
1827 pullop.stepsdone.add(b'phases')
1824
1828
1825 else:
1829 else:
1826 # pulling changegroup
1830 # pulling changegroup
1827 pullop.stepsdone.add(b'changegroup')
1831 pullop.stepsdone.add(b'changegroup')
1828
1832
1829 kwargs[b'cg'] = pullop.fetch
1833 kwargs[b'cg'] = pullop.fetch
1830
1834
1831 legacyphase = b'phases' in ui.configlist(b'devel', b'legacy.exchange')
1835 legacyphase = b'phases' in ui.configlist(b'devel', b'legacy.exchange')
1832 hasbinaryphase = b'heads' in pullop.remotebundle2caps.get(b'phases', ())
1836 hasbinaryphase = b'heads' in pullop.remotebundle2caps.get(b'phases', ())
1833 if not legacyphase and hasbinaryphase:
1837 if not legacyphase and hasbinaryphase:
1834 kwargs[b'phases'] = True
1838 kwargs[b'phases'] = True
1835 pullop.stepsdone.add(b'phases')
1839 pullop.stepsdone.add(b'phases')
1836
1840
1837 if b'listkeys' in pullop.remotebundle2caps:
1841 if b'listkeys' in pullop.remotebundle2caps:
1838 if b'phases' not in pullop.stepsdone:
1842 if b'phases' not in pullop.stepsdone:
1839 kwargs[b'listkeys'] = [b'phases']
1843 kwargs[b'listkeys'] = [b'phases']
1840
1844
1841 bookmarksrequested = False
1845 bookmarksrequested = False
1842 legacybookmark = b'bookmarks' in ui.configlist(b'devel', b'legacy.exchange')
1846 legacybookmark = b'bookmarks' in ui.configlist(b'devel', b'legacy.exchange')
1843 hasbinarybook = b'bookmarks' in pullop.remotebundle2caps
1847 hasbinarybook = b'bookmarks' in pullop.remotebundle2caps
1844
1848
1845 if pullop.remotebookmarks is not None:
1849 if pullop.remotebookmarks is not None:
1846 pullop.stepsdone.add(b'request-bookmarks')
1850 pullop.stepsdone.add(b'request-bookmarks')
1847
1851
1848 if (
1852 if (
1849 b'request-bookmarks' not in pullop.stepsdone
1853 b'request-bookmarks' not in pullop.stepsdone
1850 and pullop.remotebookmarks is None
1854 and pullop.remotebookmarks is None
1851 and not legacybookmark
1855 and not legacybookmark
1852 and hasbinarybook
1856 and hasbinarybook
1853 ):
1857 ):
1854 kwargs[b'bookmarks'] = True
1858 kwargs[b'bookmarks'] = True
1855 bookmarksrequested = True
1859 bookmarksrequested = True
1856
1860
1857 if b'listkeys' in pullop.remotebundle2caps:
1861 if b'listkeys' in pullop.remotebundle2caps:
1858 if b'request-bookmarks' not in pullop.stepsdone:
1862 if b'request-bookmarks' not in pullop.stepsdone:
1859 # make sure to always includes bookmark data when migrating
1863 # make sure to always includes bookmark data when migrating
1860 # `hg incoming --bundle` to using this function.
1864 # `hg incoming --bundle` to using this function.
1861 pullop.stepsdone.add(b'request-bookmarks')
1865 pullop.stepsdone.add(b'request-bookmarks')
1862 kwargs.setdefault(b'listkeys', []).append(b'bookmarks')
1866 kwargs.setdefault(b'listkeys', []).append(b'bookmarks')
1863
1867
1864 # If this is a full pull / clone and the server supports the clone bundles
1868 # If this is a full pull / clone and the server supports the clone bundles
1865 # feature, tell the server whether we attempted a clone bundle. The
1869 # feature, tell the server whether we attempted a clone bundle. The
1866 # presence of this flag indicates the client supports clone bundles. This
1870 # presence of this flag indicates the client supports clone bundles. This
1867 # will enable the server to treat clients that support clone bundles
1871 # will enable the server to treat clients that support clone bundles
1868 # differently from those that don't.
1872 # differently from those that don't.
1869 if (
1873 if (
1870 pullop.remote.capable(b'clonebundles')
1874 pullop.remote.capable(b'clonebundles')
1871 and pullop.heads is None
1875 and pullop.heads is None
1872 and list(pullop.common) == [pullop.repo.nullid]
1876 and list(pullop.common) == [pullop.repo.nullid]
1873 ):
1877 ):
1874 kwargs[b'cbattempted'] = pullop.clonebundleattempted
1878 kwargs[b'cbattempted'] = pullop.clonebundleattempted
1875
1879
1876 if streaming:
1880 if streaming:
1877 pullop.repo.ui.status(_(b'streaming all changes\n'))
1881 pullop.repo.ui.status(_(b'streaming all changes\n'))
1878 elif not pullop.fetch:
1882 elif not pullop.fetch:
1879 pullop.repo.ui.status(_(b"no changes found\n"))
1883 pullop.repo.ui.status(_(b"no changes found\n"))
1880 pullop.cgresult = 0
1884 pullop.cgresult = 0
1881 else:
1885 else:
1882 if pullop.heads is None and list(pullop.common) == [pullop.repo.nullid]:
1886 if pullop.heads is None and list(pullop.common) == [pullop.repo.nullid]:
1883 pullop.repo.ui.status(_(b"requesting all changes\n"))
1887 pullop.repo.ui.status(_(b"requesting all changes\n"))
1884 if obsolete.isenabled(pullop.repo, obsolete.exchangeopt):
1888 if obsolete.isenabled(pullop.repo, obsolete.exchangeopt):
1885 remoteversions = bundle2.obsmarkersversion(pullop.remotebundle2caps)
1889 remoteversions = bundle2.obsmarkersversion(pullop.remotebundle2caps)
1886 if obsolete.commonversion(remoteversions) is not None:
1890 if obsolete.commonversion(remoteversions) is not None:
1887 kwargs[b'obsmarkers'] = True
1891 kwargs[b'obsmarkers'] = True
1888 pullop.stepsdone.add(b'obsmarkers')
1892 pullop.stepsdone.add(b'obsmarkers')
1889 _pullbundle2extraprepare(pullop, kwargs)
1893 _pullbundle2extraprepare(pullop, kwargs)
1890
1894
1891 remote_sidedata = bundle2.read_remote_wanted_sidedata(pullop.remote)
1895 remote_sidedata = bundle2.read_remote_wanted_sidedata(pullop.remote)
1892 if remote_sidedata:
1896 if remote_sidedata:
1893 kwargs[b'remote_sidedata'] = remote_sidedata
1897 kwargs[b'remote_sidedata'] = remote_sidedata
1894
1898
1895 with pullop.remote.commandexecutor() as e:
1899 with pullop.remote.commandexecutor() as e:
1896 args = dict(kwargs)
1900 args = dict(kwargs)
1897 args[b'source'] = b'pull'
1901 args[b'source'] = b'pull'
1898 bundle = e.callcommand(b'getbundle', args).result()
1902 bundle = e.callcommand(b'getbundle', args).result()
1899
1903
1900 try:
1904 try:
1901 op = bundle2.bundleoperation(
1905 op = bundle2.bundleoperation(
1902 pullop.repo, pullop.gettransaction, source=b'pull'
1906 pullop.repo, pullop.gettransaction, source=b'pull'
1903 )
1907 )
1904 op.modes[b'bookmarks'] = b'records'
1908 op.modes[b'bookmarks'] = b'records'
1905 bundle2.processbundle(pullop.repo, bundle, op=op)
1909 bundle2.processbundle(pullop.repo, bundle, op=op)
1906 except bundle2.AbortFromPart as exc:
1910 except bundle2.AbortFromPart as exc:
1907 pullop.repo.ui.error(_(b'remote: abort: %s\n') % exc)
1911 pullop.repo.ui.error(_(b'remote: abort: %s\n') % exc)
1908 raise error.RemoteError(_(b'pull failed on remote'), hint=exc.hint)
1912 raise error.RemoteError(_(b'pull failed on remote'), hint=exc.hint)
1909 except error.BundleValueError as exc:
1913 except error.BundleValueError as exc:
1910 raise error.RemoteError(_(b'missing support for %s') % exc)
1914 raise error.RemoteError(_(b'missing support for %s') % exc)
1911
1915
1912 if pullop.fetch:
1916 if pullop.fetch:
1913 pullop.cgresult = bundle2.combinechangegroupresults(op)
1917 pullop.cgresult = bundle2.combinechangegroupresults(op)
1914
1918
1915 # processing phases change
1919 # processing phases change
1916 for namespace, value in op.records[b'listkeys']:
1920 for namespace, value in op.records[b'listkeys']:
1917 if namespace == b'phases':
1921 if namespace == b'phases':
1918 _pullapplyphases(pullop, value)
1922 _pullapplyphases(pullop, value)
1919
1923
1920 # processing bookmark update
1924 # processing bookmark update
1921 if bookmarksrequested:
1925 if bookmarksrequested:
1922 books = {}
1926 books = {}
1923 for record in op.records[b'bookmarks']:
1927 for record in op.records[b'bookmarks']:
1924 books[record[b'bookmark']] = record[b"node"]
1928 books[record[b'bookmark']] = record[b"node"]
1925 pullop.remotebookmarks = books
1929 pullop.remotebookmarks = books
1926 else:
1930 else:
1927 for namespace, value in op.records[b'listkeys']:
1931 for namespace, value in op.records[b'listkeys']:
1928 if namespace == b'bookmarks':
1932 if namespace == b'bookmarks':
1929 pullop.remotebookmarks = bookmod.unhexlifybookmarks(value)
1933 pullop.remotebookmarks = bookmod.unhexlifybookmarks(value)
1930
1934
1931 # bookmark data were either already there or pulled in the bundle
1935 # bookmark data were either already there or pulled in the bundle
1932 if pullop.remotebookmarks is not None:
1936 if pullop.remotebookmarks is not None:
1933 _pullbookmarks(pullop)
1937 _pullbookmarks(pullop)
1934
1938
1935
1939
1936 def _pullbundle2extraprepare(pullop, kwargs):
1940 def _pullbundle2extraprepare(pullop, kwargs):
1937 """hook function so that extensions can extend the getbundle call"""
1941 """hook function so that extensions can extend the getbundle call"""
1938
1942
1939
1943
1940 def _pullchangeset(pullop):
1944 def _pullchangeset(pullop):
1941 """pull changeset from unbundle into the local repo"""
1945 """pull changeset from unbundle into the local repo"""
1942 # We delay the open of the transaction as late as possible so we
1946 # We delay the open of the transaction as late as possible so we
1943 # don't open transaction for nothing or you break future useful
1947 # don't open transaction for nothing or you break future useful
1944 # rollback call
1948 # rollback call
1945 if b'changegroup' in pullop.stepsdone:
1949 if b'changegroup' in pullop.stepsdone:
1946 return
1950 return
1947 pullop.stepsdone.add(b'changegroup')
1951 pullop.stepsdone.add(b'changegroup')
1948 if not pullop.fetch:
1952 if not pullop.fetch:
1949 pullop.repo.ui.status(_(b"no changes found\n"))
1953 pullop.repo.ui.status(_(b"no changes found\n"))
1950 pullop.cgresult = 0
1954 pullop.cgresult = 0
1951 return
1955 return
1952 tr = pullop.gettransaction()
1956 tr = pullop.gettransaction()
1953 if pullop.heads is None and list(pullop.common) == [pullop.repo.nullid]:
1957 if pullop.heads is None and list(pullop.common) == [pullop.repo.nullid]:
1954 pullop.repo.ui.status(_(b"requesting all changes\n"))
1958 pullop.repo.ui.status(_(b"requesting all changes\n"))
1955 elif pullop.heads is None and pullop.remote.capable(b'changegroupsubset'):
1959 elif pullop.heads is None and pullop.remote.capable(b'changegroupsubset'):
1956 # issue1320, avoid a race if remote changed after discovery
1960 # issue1320, avoid a race if remote changed after discovery
1957 pullop.heads = pullop.rheads
1961 pullop.heads = pullop.rheads
1958
1962
1959 if pullop.remote.capable(b'getbundle'):
1963 if pullop.remote.capable(b'getbundle'):
1960 # TODO: get bundlecaps from remote
1964 # TODO: get bundlecaps from remote
1961 cg = pullop.remote.getbundle(
1965 cg = pullop.remote.getbundle(
1962 b'pull', common=pullop.common, heads=pullop.heads or pullop.rheads
1966 b'pull', common=pullop.common, heads=pullop.heads or pullop.rheads
1963 )
1967 )
1964 elif pullop.heads is None:
1968 elif pullop.heads is None:
1965 with pullop.remote.commandexecutor() as e:
1969 with pullop.remote.commandexecutor() as e:
1966 cg = e.callcommand(
1970 cg = e.callcommand(
1967 b'changegroup',
1971 b'changegroup',
1968 {
1972 {
1969 b'nodes': pullop.fetch,
1973 b'nodes': pullop.fetch,
1970 b'source': b'pull',
1974 b'source': b'pull',
1971 },
1975 },
1972 ).result()
1976 ).result()
1973
1977
1974 elif not pullop.remote.capable(b'changegroupsubset'):
1978 elif not pullop.remote.capable(b'changegroupsubset'):
1975 raise error.Abort(
1979 raise error.Abort(
1976 _(
1980 _(
1977 b"partial pull cannot be done because "
1981 b"partial pull cannot be done because "
1978 b"other repository doesn't support "
1982 b"other repository doesn't support "
1979 b"changegroupsubset."
1983 b"changegroupsubset."
1980 )
1984 )
1981 )
1985 )
1982 else:
1986 else:
1983 with pullop.remote.commandexecutor() as e:
1987 with pullop.remote.commandexecutor() as e:
1984 cg = e.callcommand(
1988 cg = e.callcommand(
1985 b'changegroupsubset',
1989 b'changegroupsubset',
1986 {
1990 {
1987 b'bases': pullop.fetch,
1991 b'bases': pullop.fetch,
1988 b'heads': pullop.heads,
1992 b'heads': pullop.heads,
1989 b'source': b'pull',
1993 b'source': b'pull',
1990 },
1994 },
1991 ).result()
1995 ).result()
1992
1996
1993 bundleop = bundle2.applybundle(
1997 bundleop = bundle2.applybundle(
1994 pullop.repo, cg, tr, b'pull', pullop.remote.url()
1998 pullop.repo, cg, tr, b'pull', pullop.remote.url()
1995 )
1999 )
1996 pullop.cgresult = bundle2.combinechangegroupresults(bundleop)
2000 pullop.cgresult = bundle2.combinechangegroupresults(bundleop)
1997
2001
1998
2002
1999 def _pullphase(pullop):
2003 def _pullphase(pullop):
2000 # Get remote phases data from remote
2004 # Get remote phases data from remote
2001 if b'phases' in pullop.stepsdone:
2005 if b'phases' in pullop.stepsdone:
2002 return
2006 return
2003 remotephases = listkeys(pullop.remote, b'phases')
2007 remotephases = listkeys(pullop.remote, b'phases')
2004 _pullapplyphases(pullop, remotephases)
2008 _pullapplyphases(pullop, remotephases)
2005
2009
2006
2010
2007 def _pullapplyphases(pullop, remotephases):
2011 def _pullapplyphases(pullop, remotephases):
2008 """apply phase movement from observed remote state"""
2012 """apply phase movement from observed remote state"""
2009 if b'phases' in pullop.stepsdone:
2013 if b'phases' in pullop.stepsdone:
2010 return
2014 return
2011 pullop.stepsdone.add(b'phases')
2015 pullop.stepsdone.add(b'phases')
2012 publishing = bool(remotephases.get(b'publishing', False))
2016 publishing = bool(remotephases.get(b'publishing', False))
2013 if remotephases and not publishing:
2017 if remotephases and not publishing:
2014 # remote is new and non-publishing
2018 # remote is new and non-publishing
2015 pheads, _dr = phases.analyzeremotephases(
2019 pheads, _dr = phases.analyzeremotephases(
2016 pullop.repo, pullop.pulledsubset, remotephases
2020 pullop.repo, pullop.pulledsubset, remotephases
2017 )
2021 )
2018 dheads = pullop.pulledsubset
2022 dheads = pullop.pulledsubset
2019 else:
2023 else:
2020 # Remote is old or publishing all common changesets
2024 # Remote is old or publishing all common changesets
2021 # should be seen as public
2025 # should be seen as public
2022 pheads = pullop.pulledsubset
2026 pheads = pullop.pulledsubset
2023 dheads = []
2027 dheads = []
2024 unfi = pullop.repo.unfiltered()
2028 unfi = pullop.repo.unfiltered()
2025 phase = unfi._phasecache.phase
2029 phase = unfi._phasecache.phase
2026 rev = unfi.changelog.index.get_rev
2030 rev = unfi.changelog.index.get_rev
2027 public = phases.public
2031 public = phases.public
2028 draft = phases.draft
2032 draft = phases.draft
2029
2033
2030 # exclude changesets already public locally and update the others
2034 # exclude changesets already public locally and update the others
2031 pheads = [pn for pn in pheads if phase(unfi, rev(pn)) > public]
2035 pheads = [pn for pn in pheads if phase(unfi, rev(pn)) > public]
2032 if pheads:
2036 if pheads:
2033 tr = pullop.gettransaction()
2037 tr = pullop.gettransaction()
2034 phases.advanceboundary(pullop.repo, tr, public, pheads)
2038 phases.advanceboundary(pullop.repo, tr, public, pheads)
2035
2039
2036 # exclude changesets already draft locally and update the others
2040 # exclude changesets already draft locally and update the others
2037 dheads = [pn for pn in dheads if phase(unfi, rev(pn)) > draft]
2041 dheads = [pn for pn in dheads if phase(unfi, rev(pn)) > draft]
2038 if dheads:
2042 if dheads:
2039 tr = pullop.gettransaction()
2043 tr = pullop.gettransaction()
2040 phases.advanceboundary(pullop.repo, tr, draft, dheads)
2044 phases.advanceboundary(pullop.repo, tr, draft, dheads)
2041
2045
2042
2046
2043 def _pullbookmarks(pullop):
2047 def _pullbookmarks(pullop):
2044 """process the remote bookmark information to update the local one"""
2048 """process the remote bookmark information to update the local one"""
2045 if b'bookmarks' in pullop.stepsdone:
2049 if b'bookmarks' in pullop.stepsdone:
2046 return
2050 return
2047 pullop.stepsdone.add(b'bookmarks')
2051 pullop.stepsdone.add(b'bookmarks')
2048 repo = pullop.repo
2052 repo = pullop.repo
2049 remotebookmarks = pullop.remotebookmarks
2053 remotebookmarks = pullop.remotebookmarks
2050 bookmarks_mode = None
2054 bookmarks_mode = None
2051 if pullop.remote_path is not None:
2055 if pullop.remote_path is not None:
2052 bookmarks_mode = pullop.remote_path.bookmarks_mode
2056 bookmarks_mode = pullop.remote_path.bookmarks_mode
2053 bookmod.updatefromremote(
2057 bookmod.updatefromremote(
2054 repo.ui,
2058 repo.ui,
2055 repo,
2059 repo,
2056 remotebookmarks,
2060 remotebookmarks,
2057 pullop.remote.url(),
2061 pullop.remote.url(),
2058 pullop.gettransaction,
2062 pullop.gettransaction,
2059 explicit=pullop.explicitbookmarks,
2063 explicit=pullop.explicitbookmarks,
2060 mode=bookmarks_mode,
2064 mode=bookmarks_mode,
2061 )
2065 )
2062
2066
2063
2067
2064 def _pullobsolete(pullop):
2068 def _pullobsolete(pullop):
2065 """utility function to pull obsolete markers from a remote
2069 """utility function to pull obsolete markers from a remote
2066
2070
2067 The `gettransaction` is function that return the pull transaction, creating
2071 The `gettransaction` is function that return the pull transaction, creating
2068 one if necessary. We return the transaction to inform the calling code that
2072 one if necessary. We return the transaction to inform the calling code that
2069 a new transaction have been created (when applicable).
2073 a new transaction have been created (when applicable).
2070
2074
2071 Exists mostly to allow overriding for experimentation purpose"""
2075 Exists mostly to allow overriding for experimentation purpose"""
2072 if b'obsmarkers' in pullop.stepsdone:
2076 if b'obsmarkers' in pullop.stepsdone:
2073 return
2077 return
2074 pullop.stepsdone.add(b'obsmarkers')
2078 pullop.stepsdone.add(b'obsmarkers')
2075 tr = None
2079 tr = None
2076 if obsolete.isenabled(pullop.repo, obsolete.exchangeopt):
2080 if obsolete.isenabled(pullop.repo, obsolete.exchangeopt):
2077 pullop.repo.ui.debug(b'fetching remote obsolete markers\n')
2081 pullop.repo.ui.debug(b'fetching remote obsolete markers\n')
2078 remoteobs = listkeys(pullop.remote, b'obsolete')
2082 remoteobs = listkeys(pullop.remote, b'obsolete')
2079 if b'dump0' in remoteobs:
2083 if b'dump0' in remoteobs:
2080 tr = pullop.gettransaction()
2084 tr = pullop.gettransaction()
2081 markers = []
2085 markers = []
2082 for key in sorted(remoteobs, reverse=True):
2086 for key in sorted(remoteobs, reverse=True):
2083 if key.startswith(b'dump'):
2087 if key.startswith(b'dump'):
2084 data = util.b85decode(remoteobs[key])
2088 data = util.b85decode(remoteobs[key])
2085 version, newmarks = obsolete._readmarkers(data)
2089 version, newmarks = obsolete._readmarkers(data)
2086 markers += newmarks
2090 markers += newmarks
2087 if markers:
2091 if markers:
2088 pullop.repo.obsstore.add(tr, markers)
2092 pullop.repo.obsstore.add(tr, markers)
2089 pullop.repo.invalidatevolatilesets()
2093 pullop.repo.invalidatevolatilesets()
2090 return tr
2094 return tr
2091
2095
2092
2096
2093 def applynarrowacl(repo, kwargs):
2097 def applynarrowacl(repo, kwargs):
2094 """Apply narrow fetch access control.
2098 """Apply narrow fetch access control.
2095
2099
2096 This massages the named arguments for getbundle wire protocol commands
2100 This massages the named arguments for getbundle wire protocol commands
2097 so requested data is filtered through access control rules.
2101 so requested data is filtered through access control rules.
2098 """
2102 """
2099 ui = repo.ui
2103 ui = repo.ui
2100 # TODO this assumes existence of HTTP and is a layering violation.
2104 # TODO this assumes existence of HTTP and is a layering violation.
2101 username = ui.shortuser(ui.environ.get(b'REMOTE_USER') or ui.username())
2105 username = ui.shortuser(ui.environ.get(b'REMOTE_USER') or ui.username())
2102 user_includes = ui.configlist(
2106 user_includes = ui.configlist(
2103 _NARROWACL_SECTION,
2107 _NARROWACL_SECTION,
2104 username + b'.includes',
2108 username + b'.includes',
2105 ui.configlist(_NARROWACL_SECTION, b'default.includes'),
2109 ui.configlist(_NARROWACL_SECTION, b'default.includes'),
2106 )
2110 )
2107 user_excludes = ui.configlist(
2111 user_excludes = ui.configlist(
2108 _NARROWACL_SECTION,
2112 _NARROWACL_SECTION,
2109 username + b'.excludes',
2113 username + b'.excludes',
2110 ui.configlist(_NARROWACL_SECTION, b'default.excludes'),
2114 ui.configlist(_NARROWACL_SECTION, b'default.excludes'),
2111 )
2115 )
2112 if not user_includes:
2116 if not user_includes:
2113 raise error.Abort(
2117 raise error.Abort(
2114 _(b"%s configuration for user %s is empty")
2118 _(b"%s configuration for user %s is empty")
2115 % (_NARROWACL_SECTION, username)
2119 % (_NARROWACL_SECTION, username)
2116 )
2120 )
2117
2121
2118 user_includes = [
2122 user_includes = [
2119 b'path:.' if p == b'*' else b'path:' + p for p in user_includes
2123 b'path:.' if p == b'*' else b'path:' + p for p in user_includes
2120 ]
2124 ]
2121 user_excludes = [
2125 user_excludes = [
2122 b'path:.' if p == b'*' else b'path:' + p for p in user_excludes
2126 b'path:.' if p == b'*' else b'path:' + p for p in user_excludes
2123 ]
2127 ]
2124
2128
2125 req_includes = set(kwargs.get('includepats', []))
2129 req_includes = set(kwargs.get('includepats', []))
2126 req_excludes = set(kwargs.get('excludepats', []))
2130 req_excludes = set(kwargs.get('excludepats', []))
2127
2131
2128 req_includes, req_excludes, invalid_includes = narrowspec.restrictpatterns(
2132 req_includes, req_excludes, invalid_includes = narrowspec.restrictpatterns(
2129 req_includes, req_excludes, user_includes, user_excludes
2133 req_includes, req_excludes, user_includes, user_excludes
2130 )
2134 )
2131
2135
2132 if invalid_includes:
2136 if invalid_includes:
2133 raise error.Abort(
2137 raise error.Abort(
2134 _(b"The following includes are not accessible for %s: %s")
2138 _(b"The following includes are not accessible for %s: %s")
2135 % (username, stringutil.pprint(invalid_includes))
2139 % (username, stringutil.pprint(invalid_includes))
2136 )
2140 )
2137
2141
2138 new_args = {}
2142 new_args = {}
2139 new_args.update(kwargs)
2143 new_args.update(kwargs)
2140 new_args['narrow'] = True
2144 new_args['narrow'] = True
2141 new_args['narrow_acl'] = True
2145 new_args['narrow_acl'] = True
2142 new_args['includepats'] = req_includes
2146 new_args['includepats'] = req_includes
2143 if req_excludes:
2147 if req_excludes:
2144 new_args['excludepats'] = req_excludes
2148 new_args['excludepats'] = req_excludes
2145
2149
2146 return new_args
2150 return new_args
2147
2151
2148
2152
2149 def _computeellipsis(repo, common, heads, known, match, depth=None):
2153 def _computeellipsis(repo, common, heads, known, match, depth=None):
2150 """Compute the shape of a narrowed DAG.
2154 """Compute the shape of a narrowed DAG.
2151
2155
2152 Args:
2156 Args:
2153 repo: The repository we're transferring.
2157 repo: The repository we're transferring.
2154 common: The roots of the DAG range we're transferring.
2158 common: The roots of the DAG range we're transferring.
2155 May be just [nullid], which means all ancestors of heads.
2159 May be just [nullid], which means all ancestors of heads.
2156 heads: The heads of the DAG range we're transferring.
2160 heads: The heads of the DAG range we're transferring.
2157 match: The narrowmatcher that allows us to identify relevant changes.
2161 match: The narrowmatcher that allows us to identify relevant changes.
2158 depth: If not None, only consider nodes to be full nodes if they are at
2162 depth: If not None, only consider nodes to be full nodes if they are at
2159 most depth changesets away from one of heads.
2163 most depth changesets away from one of heads.
2160
2164
2161 Returns:
2165 Returns:
2162 A tuple of (visitnodes, relevant_nodes, ellipsisroots) where:
2166 A tuple of (visitnodes, relevant_nodes, ellipsisroots) where:
2163
2167
2164 visitnodes: The list of nodes (either full or ellipsis) which
2168 visitnodes: The list of nodes (either full or ellipsis) which
2165 need to be sent to the client.
2169 need to be sent to the client.
2166 relevant_nodes: The set of changelog nodes which change a file inside
2170 relevant_nodes: The set of changelog nodes which change a file inside
2167 the narrowspec. The client needs these as non-ellipsis nodes.
2171 the narrowspec. The client needs these as non-ellipsis nodes.
2168 ellipsisroots: A dict of {rev: parents} that is used in
2172 ellipsisroots: A dict of {rev: parents} that is used in
2169 narrowchangegroup to produce ellipsis nodes with the
2173 narrowchangegroup to produce ellipsis nodes with the
2170 correct parents.
2174 correct parents.
2171 """
2175 """
2172 cl = repo.changelog
2176 cl = repo.changelog
2173 mfl = repo.manifestlog
2177 mfl = repo.manifestlog
2174
2178
2175 clrev = cl.rev
2179 clrev = cl.rev
2176
2180
2177 commonrevs = {clrev(n) for n in common} | {nullrev}
2181 commonrevs = {clrev(n) for n in common} | {nullrev}
2178 headsrevs = {clrev(n) for n in heads}
2182 headsrevs = {clrev(n) for n in heads}
2179
2183
2180 if depth:
2184 if depth:
2181 revdepth = {h: 0 for h in headsrevs}
2185 revdepth = {h: 0 for h in headsrevs}
2182
2186
2183 ellipsisheads = collections.defaultdict(set)
2187 ellipsisheads = collections.defaultdict(set)
2184 ellipsisroots = collections.defaultdict(set)
2188 ellipsisroots = collections.defaultdict(set)
2185
2189
2186 def addroot(head, curchange):
2190 def addroot(head, curchange):
2187 """Add a root to an ellipsis head, splitting heads with 3 roots."""
2191 """Add a root to an ellipsis head, splitting heads with 3 roots."""
2188 ellipsisroots[head].add(curchange)
2192 ellipsisroots[head].add(curchange)
2189 # Recursively split ellipsis heads with 3 roots by finding the
2193 # Recursively split ellipsis heads with 3 roots by finding the
2190 # roots' youngest common descendant which is an elided merge commit.
2194 # roots' youngest common descendant which is an elided merge commit.
2191 # That descendant takes 2 of the 3 roots as its own, and becomes a
2195 # That descendant takes 2 of the 3 roots as its own, and becomes a
2192 # root of the head.
2196 # root of the head.
2193 while len(ellipsisroots[head]) > 2:
2197 while len(ellipsisroots[head]) > 2:
2194 child, roots = splithead(head)
2198 child, roots = splithead(head)
2195 splitroots(head, child, roots)
2199 splitroots(head, child, roots)
2196 head = child # Recurse in case we just added a 3rd root
2200 head = child # Recurse in case we just added a 3rd root
2197
2201
2198 def splitroots(head, child, roots):
2202 def splitroots(head, child, roots):
2199 ellipsisroots[head].difference_update(roots)
2203 ellipsisroots[head].difference_update(roots)
2200 ellipsisroots[head].add(child)
2204 ellipsisroots[head].add(child)
2201 ellipsisroots[child].update(roots)
2205 ellipsisroots[child].update(roots)
2202 ellipsisroots[child].discard(child)
2206 ellipsisroots[child].discard(child)
2203
2207
2204 def splithead(head):
2208 def splithead(head):
2205 r1, r2, r3 = sorted(ellipsisroots[head])
2209 r1, r2, r3 = sorted(ellipsisroots[head])
2206 for nr1, nr2 in ((r2, r3), (r1, r3), (r1, r2)):
2210 for nr1, nr2 in ((r2, r3), (r1, r3), (r1, r2)):
2207 mid = repo.revs(
2211 mid = repo.revs(
2208 b'sort(merge() & %d::%d & %d::%d, -rev)', nr1, head, nr2, head
2212 b'sort(merge() & %d::%d & %d::%d, -rev)', nr1, head, nr2, head
2209 )
2213 )
2210 for j in mid:
2214 for j in mid:
2211 if j == nr2:
2215 if j == nr2:
2212 return nr2, (nr1, nr2)
2216 return nr2, (nr1, nr2)
2213 if j not in ellipsisroots or len(ellipsisroots[j]) < 2:
2217 if j not in ellipsisroots or len(ellipsisroots[j]) < 2:
2214 return j, (nr1, nr2)
2218 return j, (nr1, nr2)
2215 raise error.Abort(
2219 raise error.Abort(
2216 _(
2220 _(
2217 b'Failed to split up ellipsis node! head: %d, '
2221 b'Failed to split up ellipsis node! head: %d, '
2218 b'roots: %d %d %d'
2222 b'roots: %d %d %d'
2219 )
2223 )
2220 % (head, r1, r2, r3)
2224 % (head, r1, r2, r3)
2221 )
2225 )
2222
2226
2223 missing = list(cl.findmissingrevs(common=commonrevs, heads=headsrevs))
2227 missing = list(cl.findmissingrevs(common=commonrevs, heads=headsrevs))
2224 visit = reversed(missing)
2228 visit = reversed(missing)
2225 relevant_nodes = set()
2229 relevant_nodes = set()
2226 visitnodes = [cl.node(m) for m in missing]
2230 visitnodes = [cl.node(m) for m in missing]
2227 required = set(headsrevs) | known
2231 required = set(headsrevs) | known
2228 for rev in visit:
2232 for rev in visit:
2229 clrev = cl.changelogrevision(rev)
2233 clrev = cl.changelogrevision(rev)
2230 ps = [prev for prev in cl.parentrevs(rev) if prev != nullrev]
2234 ps = [prev for prev in cl.parentrevs(rev) if prev != nullrev]
2231 if depth is not None:
2235 if depth is not None:
2232 curdepth = revdepth[rev]
2236 curdepth = revdepth[rev]
2233 for p in ps:
2237 for p in ps:
2234 revdepth[p] = min(curdepth + 1, revdepth.get(p, depth + 1))
2238 revdepth[p] = min(curdepth + 1, revdepth.get(p, depth + 1))
2235 needed = False
2239 needed = False
2236 shallow_enough = depth is None or revdepth[rev] <= depth
2240 shallow_enough = depth is None or revdepth[rev] <= depth
2237 if shallow_enough:
2241 if shallow_enough:
2238 curmf = mfl[clrev.manifest].read()
2242 curmf = mfl[clrev.manifest].read()
2239 if ps:
2243 if ps:
2240 # We choose to not trust the changed files list in
2244 # We choose to not trust the changed files list in
2241 # changesets because it's not always correct. TODO: could
2245 # changesets because it's not always correct. TODO: could
2242 # we trust it for the non-merge case?
2246 # we trust it for the non-merge case?
2243 p1mf = mfl[cl.changelogrevision(ps[0]).manifest].read()
2247 p1mf = mfl[cl.changelogrevision(ps[0]).manifest].read()
2244 needed = bool(curmf.diff(p1mf, match))
2248 needed = bool(curmf.diff(p1mf, match))
2245 if not needed and len(ps) > 1:
2249 if not needed and len(ps) > 1:
2246 # For merge changes, the list of changed files is not
2250 # For merge changes, the list of changed files is not
2247 # helpful, since we need to emit the merge if a file
2251 # helpful, since we need to emit the merge if a file
2248 # in the narrow spec has changed on either side of the
2252 # in the narrow spec has changed on either side of the
2249 # merge. As a result, we do a manifest diff to check.
2253 # merge. As a result, we do a manifest diff to check.
2250 p2mf = mfl[cl.changelogrevision(ps[1]).manifest].read()
2254 p2mf = mfl[cl.changelogrevision(ps[1]).manifest].read()
2251 needed = bool(curmf.diff(p2mf, match))
2255 needed = bool(curmf.diff(p2mf, match))
2252 else:
2256 else:
2253 # For a root node, we need to include the node if any
2257 # For a root node, we need to include the node if any
2254 # files in the node match the narrowspec.
2258 # files in the node match the narrowspec.
2255 needed = any(curmf.walk(match))
2259 needed = any(curmf.walk(match))
2256
2260
2257 if needed:
2261 if needed:
2258 for head in ellipsisheads[rev]:
2262 for head in ellipsisheads[rev]:
2259 addroot(head, rev)
2263 addroot(head, rev)
2260 for p in ps:
2264 for p in ps:
2261 required.add(p)
2265 required.add(p)
2262 relevant_nodes.add(cl.node(rev))
2266 relevant_nodes.add(cl.node(rev))
2263 else:
2267 else:
2264 if not ps:
2268 if not ps:
2265 ps = [nullrev]
2269 ps = [nullrev]
2266 if rev in required:
2270 if rev in required:
2267 for head in ellipsisheads[rev]:
2271 for head in ellipsisheads[rev]:
2268 addroot(head, rev)
2272 addroot(head, rev)
2269 for p in ps:
2273 for p in ps:
2270 ellipsisheads[p].add(rev)
2274 ellipsisheads[p].add(rev)
2271 else:
2275 else:
2272 for p in ps:
2276 for p in ps:
2273 ellipsisheads[p] |= ellipsisheads[rev]
2277 ellipsisheads[p] |= ellipsisheads[rev]
2274
2278
2275 # add common changesets as roots of their reachable ellipsis heads
2279 # add common changesets as roots of their reachable ellipsis heads
2276 for c in commonrevs:
2280 for c in commonrevs:
2277 for head in ellipsisheads[c]:
2281 for head in ellipsisheads[c]:
2278 addroot(head, c)
2282 addroot(head, c)
2279 return visitnodes, relevant_nodes, ellipsisroots
2283 return visitnodes, relevant_nodes, ellipsisroots
2280
2284
2281
2285
2282 def caps20to10(repo, role):
2286 def caps20to10(repo, role):
2283 """return a set with appropriate options to use bundle20 during getbundle"""
2287 """return a set with appropriate options to use bundle20 during getbundle"""
2284 caps = {b'HG20'}
2288 caps = {b'HG20'}
2285 capsblob = bundle2.encodecaps(bundle2.getrepocaps(repo, role=role))
2289 capsblob = bundle2.encodecaps(bundle2.getrepocaps(repo, role=role))
2286 caps.add(b'bundle2=' + urlreq.quote(capsblob))
2290 caps.add(b'bundle2=' + urlreq.quote(capsblob))
2287 return caps
2291 return caps
2288
2292
2289
2293
2290 # List of names of steps to perform for a bundle2 for getbundle, order matters.
2294 # List of names of steps to perform for a bundle2 for getbundle, order matters.
2291 getbundle2partsorder = []
2295 getbundle2partsorder = []
2292
2296
2293 # Mapping between step name and function
2297 # Mapping between step name and function
2294 #
2298 #
2295 # This exists to help extensions wrap steps if necessary
2299 # This exists to help extensions wrap steps if necessary
2296 getbundle2partsmapping = {}
2300 getbundle2partsmapping = {}
2297
2301
2298
2302
2299 def getbundle2partsgenerator(stepname, idx=None):
2303 def getbundle2partsgenerator(stepname, idx=None):
2300 """decorator for function generating bundle2 part for getbundle
2304 """decorator for function generating bundle2 part for getbundle
2301
2305
2302 The function is added to the step -> function mapping and appended to the
2306 The function is added to the step -> function mapping and appended to the
2303 list of steps. Beware that decorated functions will be added in order
2307 list of steps. Beware that decorated functions will be added in order
2304 (this may matter).
2308 (this may matter).
2305
2309
2306 You can only use this decorator for new steps, if you want to wrap a step
2310 You can only use this decorator for new steps, if you want to wrap a step
2307 from an extension, attack the getbundle2partsmapping dictionary directly."""
2311 from an extension, attack the getbundle2partsmapping dictionary directly."""
2308
2312
2309 def dec(func):
2313 def dec(func):
2310 assert stepname not in getbundle2partsmapping
2314 assert stepname not in getbundle2partsmapping
2311 getbundle2partsmapping[stepname] = func
2315 getbundle2partsmapping[stepname] = func
2312 if idx is None:
2316 if idx is None:
2313 getbundle2partsorder.append(stepname)
2317 getbundle2partsorder.append(stepname)
2314 else:
2318 else:
2315 getbundle2partsorder.insert(idx, stepname)
2319 getbundle2partsorder.insert(idx, stepname)
2316 return func
2320 return func
2317
2321
2318 return dec
2322 return dec
2319
2323
2320
2324
2321 def bundle2requested(bundlecaps):
2325 def bundle2requested(bundlecaps):
2322 if bundlecaps is not None:
2326 if bundlecaps is not None:
2323 return any(cap.startswith(b'HG2') for cap in bundlecaps)
2327 return any(cap.startswith(b'HG2') for cap in bundlecaps)
2324 return False
2328 return False
2325
2329
2326
2330
2327 def getbundlechunks(
2331 def getbundlechunks(
2328 repo,
2332 repo,
2329 source,
2333 source,
2330 heads=None,
2334 heads=None,
2331 common=None,
2335 common=None,
2332 bundlecaps=None,
2336 bundlecaps=None,
2333 remote_sidedata=None,
2337 remote_sidedata=None,
2334 **kwargs
2338 **kwargs
2335 ):
2339 ):
2336 """Return chunks constituting a bundle's raw data.
2340 """Return chunks constituting a bundle's raw data.
2337
2341
2338 Could be a bundle HG10 or a bundle HG20 depending on bundlecaps
2342 Could be a bundle HG10 or a bundle HG20 depending on bundlecaps
2339 passed.
2343 passed.
2340
2344
2341 Returns a 2-tuple of a dict with metadata about the generated bundle
2345 Returns a 2-tuple of a dict with metadata about the generated bundle
2342 and an iterator over raw chunks (of varying sizes).
2346 and an iterator over raw chunks (of varying sizes).
2343 """
2347 """
2344 kwargs = pycompat.byteskwargs(kwargs)
2348 kwargs = pycompat.byteskwargs(kwargs)
2345 info = {}
2349 info = {}
2346 usebundle2 = bundle2requested(bundlecaps)
2350 usebundle2 = bundle2requested(bundlecaps)
2347 # bundle10 case
2351 # bundle10 case
2348 if not usebundle2:
2352 if not usebundle2:
2349 if bundlecaps and not kwargs.get(b'cg', True):
2353 if bundlecaps and not kwargs.get(b'cg', True):
2350 raise ValueError(
2354 raise ValueError(
2351 _(b'request for bundle10 must include changegroup')
2355 _(b'request for bundle10 must include changegroup')
2352 )
2356 )
2353
2357
2354 if kwargs:
2358 if kwargs:
2355 raise ValueError(
2359 raise ValueError(
2356 _(b'unsupported getbundle arguments: %s')
2360 _(b'unsupported getbundle arguments: %s')
2357 % b', '.join(sorted(kwargs.keys()))
2361 % b', '.join(sorted(kwargs.keys()))
2358 )
2362 )
2359 outgoing = _computeoutgoing(repo, heads, common)
2363 outgoing = _computeoutgoing(repo, heads, common)
2360 info[b'bundleversion'] = 1
2364 info[b'bundleversion'] = 1
2361 return (
2365 return (
2362 info,
2366 info,
2363 changegroup.makestream(
2367 changegroup.makestream(
2364 repo,
2368 repo,
2365 outgoing,
2369 outgoing,
2366 b'01',
2370 b'01',
2367 source,
2371 source,
2368 bundlecaps=bundlecaps,
2372 bundlecaps=bundlecaps,
2369 remote_sidedata=remote_sidedata,
2373 remote_sidedata=remote_sidedata,
2370 ),
2374 ),
2371 )
2375 )
2372
2376
2373 # bundle20 case
2377 # bundle20 case
2374 info[b'bundleversion'] = 2
2378 info[b'bundleversion'] = 2
2375 b2caps = {}
2379 b2caps = {}
2376 for bcaps in bundlecaps:
2380 for bcaps in bundlecaps:
2377 if bcaps.startswith(b'bundle2='):
2381 if bcaps.startswith(b'bundle2='):
2378 blob = urlreq.unquote(bcaps[len(b'bundle2=') :])
2382 blob = urlreq.unquote(bcaps[len(b'bundle2=') :])
2379 b2caps.update(bundle2.decodecaps(blob))
2383 b2caps.update(bundle2.decodecaps(blob))
2380 bundler = bundle2.bundle20(repo.ui, b2caps)
2384 bundler = bundle2.bundle20(repo.ui, b2caps)
2381
2385
2382 kwargs[b'heads'] = heads
2386 kwargs[b'heads'] = heads
2383 kwargs[b'common'] = common
2387 kwargs[b'common'] = common
2384
2388
2385 for name in getbundle2partsorder:
2389 for name in getbundle2partsorder:
2386 func = getbundle2partsmapping[name]
2390 func = getbundle2partsmapping[name]
2387 func(
2391 func(
2388 bundler,
2392 bundler,
2389 repo,
2393 repo,
2390 source,
2394 source,
2391 bundlecaps=bundlecaps,
2395 bundlecaps=bundlecaps,
2392 b2caps=b2caps,
2396 b2caps=b2caps,
2393 remote_sidedata=remote_sidedata,
2397 remote_sidedata=remote_sidedata,
2394 **pycompat.strkwargs(kwargs)
2398 **pycompat.strkwargs(kwargs)
2395 )
2399 )
2396
2400
2397 info[b'prefercompressed'] = bundler.prefercompressed
2401 info[b'prefercompressed'] = bundler.prefercompressed
2398
2402
2399 return info, bundler.getchunks()
2403 return info, bundler.getchunks()
2400
2404
2401
2405
2402 @getbundle2partsgenerator(b'stream2')
2406 @getbundle2partsgenerator(b'stream2')
2403 def _getbundlestream2(bundler, repo, *args, **kwargs):
2407 def _getbundlestream2(bundler, repo, *args, **kwargs):
2404 return bundle2.addpartbundlestream2(bundler, repo, **kwargs)
2408 return bundle2.addpartbundlestream2(bundler, repo, **kwargs)
2405
2409
2406
2410
2407 @getbundle2partsgenerator(b'changegroup')
2411 @getbundle2partsgenerator(b'changegroup')
2408 def _getbundlechangegrouppart(
2412 def _getbundlechangegrouppart(
2409 bundler,
2413 bundler,
2410 repo,
2414 repo,
2411 source,
2415 source,
2412 bundlecaps=None,
2416 bundlecaps=None,
2413 b2caps=None,
2417 b2caps=None,
2414 heads=None,
2418 heads=None,
2415 common=None,
2419 common=None,
2416 remote_sidedata=None,
2420 remote_sidedata=None,
2417 **kwargs
2421 **kwargs
2418 ):
2422 ):
2419 """add a changegroup part to the requested bundle"""
2423 """add a changegroup part to the requested bundle"""
2420 if not kwargs.get('cg', True) or not b2caps:
2424 if not kwargs.get('cg', True) or not b2caps:
2421 return
2425 return
2422
2426
2423 version = b'01'
2427 version = b'01'
2424 cgversions = b2caps.get(b'changegroup')
2428 cgversions = b2caps.get(b'changegroup')
2425 if cgversions: # 3.1 and 3.2 ship with an empty value
2429 if cgversions: # 3.1 and 3.2 ship with an empty value
2426 cgversions = [
2430 cgversions = [
2427 v
2431 v
2428 for v in cgversions
2432 for v in cgversions
2429 if v in changegroup.supportedoutgoingversions(repo)
2433 if v in changegroup.supportedoutgoingversions(repo)
2430 ]
2434 ]
2431 if not cgversions:
2435 if not cgversions:
2432 raise error.Abort(_(b'no common changegroup version'))
2436 raise error.Abort(_(b'no common changegroup version'))
2433 version = max(cgversions)
2437 version = max(cgversions)
2434
2438
2435 outgoing = _computeoutgoing(repo, heads, common)
2439 outgoing = _computeoutgoing(repo, heads, common)
2436 if not outgoing.missing:
2440 if not outgoing.missing:
2437 return
2441 return
2438
2442
2439 if kwargs.get('narrow', False):
2443 if kwargs.get('narrow', False):
2440 include = sorted(filter(bool, kwargs.get('includepats', [])))
2444 include = sorted(filter(bool, kwargs.get('includepats', [])))
2441 exclude = sorted(filter(bool, kwargs.get('excludepats', [])))
2445 exclude = sorted(filter(bool, kwargs.get('excludepats', [])))
2442 matcher = narrowspec.match(repo.root, include=include, exclude=exclude)
2446 matcher = narrowspec.match(repo.root, include=include, exclude=exclude)
2443 else:
2447 else:
2444 matcher = None
2448 matcher = None
2445
2449
2446 cgstream = changegroup.makestream(
2450 cgstream = changegroup.makestream(
2447 repo,
2451 repo,
2448 outgoing,
2452 outgoing,
2449 version,
2453 version,
2450 source,
2454 source,
2451 bundlecaps=bundlecaps,
2455 bundlecaps=bundlecaps,
2452 matcher=matcher,
2456 matcher=matcher,
2453 remote_sidedata=remote_sidedata,
2457 remote_sidedata=remote_sidedata,
2454 )
2458 )
2455
2459
2456 part = bundler.newpart(b'changegroup', data=cgstream)
2460 part = bundler.newpart(b'changegroup', data=cgstream)
2457 if cgversions:
2461 if cgversions:
2458 part.addparam(b'version', version)
2462 part.addparam(b'version', version)
2459
2463
2460 part.addparam(b'nbchanges', b'%d' % len(outgoing.missing), mandatory=False)
2464 part.addparam(b'nbchanges', b'%d' % len(outgoing.missing), mandatory=False)
2461
2465
2462 if scmutil.istreemanifest(repo):
2466 if scmutil.istreemanifest(repo):
2463 part.addparam(b'treemanifest', b'1')
2467 part.addparam(b'treemanifest', b'1')
2464
2468
2465 if repository.REPO_FEATURE_SIDE_DATA in repo.features:
2469 if repository.REPO_FEATURE_SIDE_DATA in repo.features:
2466 part.addparam(b'exp-sidedata', b'1')
2470 part.addparam(b'exp-sidedata', b'1')
2467 sidedata = bundle2.format_remote_wanted_sidedata(repo)
2471 sidedata = bundle2.format_remote_wanted_sidedata(repo)
2468 part.addparam(b'exp-wanted-sidedata', sidedata)
2472 part.addparam(b'exp-wanted-sidedata', sidedata)
2469
2473
2470 if (
2474 if (
2471 kwargs.get('narrow', False)
2475 kwargs.get('narrow', False)
2472 and kwargs.get('narrow_acl', False)
2476 and kwargs.get('narrow_acl', False)
2473 and (include or exclude)
2477 and (include or exclude)
2474 ):
2478 ):
2475 # this is mandatory because otherwise ACL clients won't work
2479 # this is mandatory because otherwise ACL clients won't work
2476 narrowspecpart = bundler.newpart(b'Narrow:responsespec')
2480 narrowspecpart = bundler.newpart(b'Narrow:responsespec')
2477 narrowspecpart.data = b'%s\0%s' % (
2481 narrowspecpart.data = b'%s\0%s' % (
2478 b'\n'.join(include),
2482 b'\n'.join(include),
2479 b'\n'.join(exclude),
2483 b'\n'.join(exclude),
2480 )
2484 )
2481
2485
2482
2486
2483 @getbundle2partsgenerator(b'bookmarks')
2487 @getbundle2partsgenerator(b'bookmarks')
2484 def _getbundlebookmarkpart(
2488 def _getbundlebookmarkpart(
2485 bundler, repo, source, bundlecaps=None, b2caps=None, **kwargs
2489 bundler, repo, source, bundlecaps=None, b2caps=None, **kwargs
2486 ):
2490 ):
2487 """add a bookmark part to the requested bundle"""
2491 """add a bookmark part to the requested bundle"""
2488 if not kwargs.get('bookmarks', False):
2492 if not kwargs.get('bookmarks', False):
2489 return
2493 return
2490 if not b2caps or b'bookmarks' not in b2caps:
2494 if not b2caps or b'bookmarks' not in b2caps:
2491 raise error.Abort(_(b'no common bookmarks exchange method'))
2495 raise error.Abort(_(b'no common bookmarks exchange method'))
2492 books = bookmod.listbinbookmarks(repo)
2496 books = bookmod.listbinbookmarks(repo)
2493 data = bookmod.binaryencode(repo, books)
2497 data = bookmod.binaryencode(repo, books)
2494 if data:
2498 if data:
2495 bundler.newpart(b'bookmarks', data=data)
2499 bundler.newpart(b'bookmarks', data=data)
2496
2500
2497
2501
2498 @getbundle2partsgenerator(b'listkeys')
2502 @getbundle2partsgenerator(b'listkeys')
2499 def _getbundlelistkeysparts(
2503 def _getbundlelistkeysparts(
2500 bundler, repo, source, bundlecaps=None, b2caps=None, **kwargs
2504 bundler, repo, source, bundlecaps=None, b2caps=None, **kwargs
2501 ):
2505 ):
2502 """add parts containing listkeys namespaces to the requested bundle"""
2506 """add parts containing listkeys namespaces to the requested bundle"""
2503 listkeys = kwargs.get('listkeys', ())
2507 listkeys = kwargs.get('listkeys', ())
2504 for namespace in listkeys:
2508 for namespace in listkeys:
2505 part = bundler.newpart(b'listkeys')
2509 part = bundler.newpart(b'listkeys')
2506 part.addparam(b'namespace', namespace)
2510 part.addparam(b'namespace', namespace)
2507 keys = repo.listkeys(namespace).items()
2511 keys = repo.listkeys(namespace).items()
2508 part.data = pushkey.encodekeys(keys)
2512 part.data = pushkey.encodekeys(keys)
2509
2513
2510
2514
2511 @getbundle2partsgenerator(b'obsmarkers')
2515 @getbundle2partsgenerator(b'obsmarkers')
2512 def _getbundleobsmarkerpart(
2516 def _getbundleobsmarkerpart(
2513 bundler, repo, source, bundlecaps=None, b2caps=None, heads=None, **kwargs
2517 bundler, repo, source, bundlecaps=None, b2caps=None, heads=None, **kwargs
2514 ):
2518 ):
2515 """add an obsolescence markers part to the requested bundle"""
2519 """add an obsolescence markers part to the requested bundle"""
2516 if kwargs.get('obsmarkers', False):
2520 if kwargs.get('obsmarkers', False):
2517 if heads is None:
2521 if heads is None:
2518 heads = repo.heads()
2522 heads = repo.heads()
2519 subset = [c.node() for c in repo.set(b'::%ln', heads)]
2523 subset = [c.node() for c in repo.set(b'::%ln', heads)]
2520 markers = repo.obsstore.relevantmarkers(subset)
2524 markers = repo.obsstore.relevantmarkers(subset)
2521 markers = obsutil.sortedmarkers(markers)
2525 markers = obsutil.sortedmarkers(markers)
2522 bundle2.buildobsmarkerspart(bundler, markers)
2526 bundle2.buildobsmarkerspart(bundler, markers)
2523
2527
2524
2528
2525 @getbundle2partsgenerator(b'phases')
2529 @getbundle2partsgenerator(b'phases')
2526 def _getbundlephasespart(
2530 def _getbundlephasespart(
2527 bundler, repo, source, bundlecaps=None, b2caps=None, heads=None, **kwargs
2531 bundler, repo, source, bundlecaps=None, b2caps=None, heads=None, **kwargs
2528 ):
2532 ):
2529 """add phase heads part to the requested bundle"""
2533 """add phase heads part to the requested bundle"""
2530 if kwargs.get('phases', False):
2534 if kwargs.get('phases', False):
2531 if not b2caps or b'heads' not in b2caps.get(b'phases'):
2535 if not b2caps or b'heads' not in b2caps.get(b'phases'):
2532 raise error.Abort(_(b'no common phases exchange method'))
2536 raise error.Abort(_(b'no common phases exchange method'))
2533 if heads is None:
2537 if heads is None:
2534 heads = repo.heads()
2538 heads = repo.heads()
2535
2539
2536 headsbyphase = collections.defaultdict(set)
2540 headsbyphase = collections.defaultdict(set)
2537 if repo.publishing():
2541 if repo.publishing():
2538 headsbyphase[phases.public] = heads
2542 headsbyphase[phases.public] = heads
2539 else:
2543 else:
2540 # find the appropriate heads to move
2544 # find the appropriate heads to move
2541
2545
2542 phase = repo._phasecache.phase
2546 phase = repo._phasecache.phase
2543 node = repo.changelog.node
2547 node = repo.changelog.node
2544 rev = repo.changelog.rev
2548 rev = repo.changelog.rev
2545 for h in heads:
2549 for h in heads:
2546 headsbyphase[phase(repo, rev(h))].add(h)
2550 headsbyphase[phase(repo, rev(h))].add(h)
2547 seenphases = list(headsbyphase.keys())
2551 seenphases = list(headsbyphase.keys())
2548
2552
2549 # We do not handle anything but public and draft phase for now)
2553 # We do not handle anything but public and draft phase for now)
2550 if seenphases:
2554 if seenphases:
2551 assert max(seenphases) <= phases.draft
2555 assert max(seenphases) <= phases.draft
2552
2556
2553 # if client is pulling non-public changesets, we need to find
2557 # if client is pulling non-public changesets, we need to find
2554 # intermediate public heads.
2558 # intermediate public heads.
2555 draftheads = headsbyphase.get(phases.draft, set())
2559 draftheads = headsbyphase.get(phases.draft, set())
2556 if draftheads:
2560 if draftheads:
2557 publicheads = headsbyphase.get(phases.public, set())
2561 publicheads = headsbyphase.get(phases.public, set())
2558
2562
2559 revset = b'heads(only(%ln, %ln) and public())'
2563 revset = b'heads(only(%ln, %ln) and public())'
2560 extraheads = repo.revs(revset, draftheads, publicheads)
2564 extraheads = repo.revs(revset, draftheads, publicheads)
2561 for r in extraheads:
2565 for r in extraheads:
2562 headsbyphase[phases.public].add(node(r))
2566 headsbyphase[phases.public].add(node(r))
2563
2567
2564 # transform data in a format used by the encoding function
2568 # transform data in a format used by the encoding function
2565 phasemapping = {
2569 phasemapping = {
2566 phase: sorted(headsbyphase[phase]) for phase in phases.allphases
2570 phase: sorted(headsbyphase[phase]) for phase in phases.allphases
2567 }
2571 }
2568
2572
2569 # generate the actual part
2573 # generate the actual part
2570 phasedata = phases.binaryencode(phasemapping)
2574 phasedata = phases.binaryencode(phasemapping)
2571 bundler.newpart(b'phase-heads', data=phasedata)
2575 bundler.newpart(b'phase-heads', data=phasedata)
2572
2576
2573
2577
2574 @getbundle2partsgenerator(b'hgtagsfnodes')
2578 @getbundle2partsgenerator(b'hgtagsfnodes')
2575 def _getbundletagsfnodes(
2579 def _getbundletagsfnodes(
2576 bundler,
2580 bundler,
2577 repo,
2581 repo,
2578 source,
2582 source,
2579 bundlecaps=None,
2583 bundlecaps=None,
2580 b2caps=None,
2584 b2caps=None,
2581 heads=None,
2585 heads=None,
2582 common=None,
2586 common=None,
2583 **kwargs
2587 **kwargs
2584 ):
2588 ):
2585 """Transfer the .hgtags filenodes mapping.
2589 """Transfer the .hgtags filenodes mapping.
2586
2590
2587 Only values for heads in this bundle will be transferred.
2591 Only values for heads in this bundle will be transferred.
2588
2592
2589 The part data consists of pairs of 20 byte changeset node and .hgtags
2593 The part data consists of pairs of 20 byte changeset node and .hgtags
2590 filenodes raw values.
2594 filenodes raw values.
2591 """
2595 """
2592 # Don't send unless:
2596 # Don't send unless:
2593 # - changeset are being exchanged,
2597 # - changeset are being exchanged,
2594 # - the client supports it.
2598 # - the client supports it.
2595 if not b2caps or not (kwargs.get('cg', True) and b'hgtagsfnodes' in b2caps):
2599 if not b2caps or not (kwargs.get('cg', True) and b'hgtagsfnodes' in b2caps):
2596 return
2600 return
2597
2601
2598 outgoing = _computeoutgoing(repo, heads, common)
2602 outgoing = _computeoutgoing(repo, heads, common)
2599 bundle2.addparttagsfnodescache(repo, bundler, outgoing)
2603 bundle2.addparttagsfnodescache(repo, bundler, outgoing)
2600
2604
2601
2605
2602 @getbundle2partsgenerator(b'cache:rev-branch-cache')
2606 @getbundle2partsgenerator(b'cache:rev-branch-cache')
2603 def _getbundlerevbranchcache(
2607 def _getbundlerevbranchcache(
2604 bundler,
2608 bundler,
2605 repo,
2609 repo,
2606 source,
2610 source,
2607 bundlecaps=None,
2611 bundlecaps=None,
2608 b2caps=None,
2612 b2caps=None,
2609 heads=None,
2613 heads=None,
2610 common=None,
2614 common=None,
2611 **kwargs
2615 **kwargs
2612 ):
2616 ):
2613 """Transfer the rev-branch-cache mapping
2617 """Transfer the rev-branch-cache mapping
2614
2618
2615 The payload is a series of data related to each branch
2619 The payload is a series of data related to each branch
2616
2620
2617 1) branch name length
2621 1) branch name length
2618 2) number of open heads
2622 2) number of open heads
2619 3) number of closed heads
2623 3) number of closed heads
2620 4) open heads nodes
2624 4) open heads nodes
2621 5) closed heads nodes
2625 5) closed heads nodes
2622 """
2626 """
2623 # Don't send unless:
2627 # Don't send unless:
2624 # - changeset are being exchanged,
2628 # - changeset are being exchanged,
2625 # - the client supports it.
2629 # - the client supports it.
2626 # - narrow bundle isn't in play (not currently compatible).
2630 # - narrow bundle isn't in play (not currently compatible).
2627 if (
2631 if (
2628 not kwargs.get('cg', True)
2632 not kwargs.get('cg', True)
2629 or not b2caps
2633 or not b2caps
2630 or b'rev-branch-cache' not in b2caps
2634 or b'rev-branch-cache' not in b2caps
2631 or kwargs.get('narrow', False)
2635 or kwargs.get('narrow', False)
2632 or repo.ui.has_section(_NARROWACL_SECTION)
2636 or repo.ui.has_section(_NARROWACL_SECTION)
2633 ):
2637 ):
2634 return
2638 return
2635
2639
2636 outgoing = _computeoutgoing(repo, heads, common)
2640 outgoing = _computeoutgoing(repo, heads, common)
2637 bundle2.addpartrevbranchcache(repo, bundler, outgoing)
2641 bundle2.addpartrevbranchcache(repo, bundler, outgoing)
2638
2642
2639
2643
2640 def check_heads(repo, their_heads, context):
2644 def check_heads(repo, their_heads, context):
2641 """check if the heads of a repo have been modified
2645 """check if the heads of a repo have been modified
2642
2646
2643 Used by peer for unbundling.
2647 Used by peer for unbundling.
2644 """
2648 """
2645 heads = repo.heads()
2649 heads = repo.heads()
2646 heads_hash = hashutil.sha1(b''.join(sorted(heads))).digest()
2650 heads_hash = hashutil.sha1(b''.join(sorted(heads))).digest()
2647 if not (
2651 if not (
2648 their_heads == [b'force']
2652 their_heads == [b'force']
2649 or their_heads == heads
2653 or their_heads == heads
2650 or their_heads == [b'hashed', heads_hash]
2654 or their_heads == [b'hashed', heads_hash]
2651 ):
2655 ):
2652 # someone else committed/pushed/unbundled while we
2656 # someone else committed/pushed/unbundled while we
2653 # were transferring data
2657 # were transferring data
2654 raise error.PushRaced(
2658 raise error.PushRaced(
2655 b'repository changed while %s - please try again' % context
2659 b'repository changed while %s - please try again' % context
2656 )
2660 )
2657
2661
2658
2662
2659 def unbundle(repo, cg, heads, source, url):
2663 def unbundle(repo, cg, heads, source, url):
2660 """Apply a bundle to a repo.
2664 """Apply a bundle to a repo.
2661
2665
2662 this function makes sure the repo is locked during the application and have
2666 this function makes sure the repo is locked during the application and have
2663 mechanism to check that no push race occurred between the creation of the
2667 mechanism to check that no push race occurred between the creation of the
2664 bundle and its application.
2668 bundle and its application.
2665
2669
2666 If the push was raced as PushRaced exception is raised."""
2670 If the push was raced as PushRaced exception is raised."""
2667 r = 0
2671 r = 0
2668 # need a transaction when processing a bundle2 stream
2672 # need a transaction when processing a bundle2 stream
2669 # [wlock, lock, tr] - needs to be an array so nested functions can modify it
2673 # [wlock, lock, tr] - needs to be an array so nested functions can modify it
2670 lockandtr = [None, None, None]
2674 lockandtr = [None, None, None]
2671 recordout = None
2675 recordout = None
2672 # quick fix for output mismatch with bundle2 in 3.4
2676 # quick fix for output mismatch with bundle2 in 3.4
2673 captureoutput = repo.ui.configbool(
2677 captureoutput = repo.ui.configbool(
2674 b'experimental', b'bundle2-output-capture'
2678 b'experimental', b'bundle2-output-capture'
2675 )
2679 )
2676 if url.startswith(b'remote:http:') or url.startswith(b'remote:https:'):
2680 if url.startswith(b'remote:http:') or url.startswith(b'remote:https:'):
2677 captureoutput = True
2681 captureoutput = True
2678 try:
2682 try:
2679 # note: outside bundle1, 'heads' is expected to be empty and this
2683 # note: outside bundle1, 'heads' is expected to be empty and this
2680 # 'check_heads' call wil be a no-op
2684 # 'check_heads' call wil be a no-op
2681 check_heads(repo, heads, b'uploading changes')
2685 check_heads(repo, heads, b'uploading changes')
2682 # push can proceed
2686 # push can proceed
2683 if not isinstance(cg, bundle2.unbundle20):
2687 if not isinstance(cg, bundle2.unbundle20):
2684 # legacy case: bundle1 (changegroup 01)
2688 # legacy case: bundle1 (changegroup 01)
2685 txnname = b"\n".join([source, urlutil.hidepassword(url)])
2689 txnname = b"\n".join([source, urlutil.hidepassword(url)])
2686 with repo.lock(), repo.transaction(txnname) as tr:
2690 with repo.lock(), repo.transaction(txnname) as tr:
2687 op = bundle2.applybundle(repo, cg, tr, source, url)
2691 op = bundle2.applybundle(repo, cg, tr, source, url)
2688 r = bundle2.combinechangegroupresults(op)
2692 r = bundle2.combinechangegroupresults(op)
2689 else:
2693 else:
2690 r = None
2694 r = None
2691 try:
2695 try:
2692
2696
2693 def gettransaction():
2697 def gettransaction():
2694 if not lockandtr[2]:
2698 if not lockandtr[2]:
2695 if not bookmod.bookmarksinstore(repo):
2699 if not bookmod.bookmarksinstore(repo):
2696 lockandtr[0] = repo.wlock()
2700 lockandtr[0] = repo.wlock()
2697 lockandtr[1] = repo.lock()
2701 lockandtr[1] = repo.lock()
2698 lockandtr[2] = repo.transaction(source)
2702 lockandtr[2] = repo.transaction(source)
2699 lockandtr[2].hookargs[b'source'] = source
2703 lockandtr[2].hookargs[b'source'] = source
2700 lockandtr[2].hookargs[b'url'] = url
2704 lockandtr[2].hookargs[b'url'] = url
2701 lockandtr[2].hookargs[b'bundle2'] = b'1'
2705 lockandtr[2].hookargs[b'bundle2'] = b'1'
2702 return lockandtr[2]
2706 return lockandtr[2]
2703
2707
2704 # Do greedy locking by default until we're satisfied with lazy
2708 # Do greedy locking by default until we're satisfied with lazy
2705 # locking.
2709 # locking.
2706 if not repo.ui.configbool(
2710 if not repo.ui.configbool(
2707 b'experimental', b'bundle2lazylocking'
2711 b'experimental', b'bundle2lazylocking'
2708 ):
2712 ):
2709 gettransaction()
2713 gettransaction()
2710
2714
2711 op = bundle2.bundleoperation(
2715 op = bundle2.bundleoperation(
2712 repo,
2716 repo,
2713 gettransaction,
2717 gettransaction,
2714 captureoutput=captureoutput,
2718 captureoutput=captureoutput,
2715 source=b'push',
2719 source=b'push',
2716 )
2720 )
2717 try:
2721 try:
2718 op = bundle2.processbundle(repo, cg, op=op)
2722 op = bundle2.processbundle(repo, cg, op=op)
2719 finally:
2723 finally:
2720 r = op.reply
2724 r = op.reply
2721 if captureoutput and r is not None:
2725 if captureoutput and r is not None:
2722 repo.ui.pushbuffer(error=True, subproc=True)
2726 repo.ui.pushbuffer(error=True, subproc=True)
2723
2727
2724 def recordout(output):
2728 def recordout(output):
2725 r.newpart(b'output', data=output, mandatory=False)
2729 r.newpart(b'output', data=output, mandatory=False)
2726
2730
2727 if lockandtr[2] is not None:
2731 if lockandtr[2] is not None:
2728 lockandtr[2].close()
2732 lockandtr[2].close()
2729 except BaseException as exc:
2733 except BaseException as exc:
2730 exc.duringunbundle2 = True
2734 exc.duringunbundle2 = True
2731 if captureoutput and r is not None:
2735 if captureoutput and r is not None:
2732 parts = exc._bundle2salvagedoutput = r.salvageoutput()
2736 parts = exc._bundle2salvagedoutput = r.salvageoutput()
2733
2737
2734 def recordout(output):
2738 def recordout(output):
2735 part = bundle2.bundlepart(
2739 part = bundle2.bundlepart(
2736 b'output', data=output, mandatory=False
2740 b'output', data=output, mandatory=False
2737 )
2741 )
2738 parts.append(part)
2742 parts.append(part)
2739
2743
2740 raise
2744 raise
2741 finally:
2745 finally:
2742 lockmod.release(lockandtr[2], lockandtr[1], lockandtr[0])
2746 lockmod.release(lockandtr[2], lockandtr[1], lockandtr[0])
2743 if recordout is not None:
2747 if recordout is not None:
2744 recordout(repo.ui.popbuffer())
2748 recordout(repo.ui.popbuffer())
2745 return r
2749 return r
2746
2750
2747
2751
2748 def _maybeapplyclonebundle(pullop):
2752 def _maybeapplyclonebundle(pullop):
2749 """Apply a clone bundle from a remote, if possible."""
2753 """Apply a clone bundle from a remote, if possible."""
2750
2754
2751 repo = pullop.repo
2755 repo = pullop.repo
2752 remote = pullop.remote
2756 remote = pullop.remote
2753
2757
2754 if not repo.ui.configbool(b'ui', b'clonebundles'):
2758 if not repo.ui.configbool(b'ui', b'clonebundles'):
2755 return
2759 return
2756
2760
2757 # Only run if local repo is empty.
2761 # Only run if local repo is empty.
2758 if len(repo):
2762 if len(repo):
2759 return
2763 return
2760
2764
2761 if pullop.heads:
2765 if pullop.heads:
2762 return
2766 return
2763
2767
2764 if not remote.capable(b'clonebundles'):
2768 if not remote.capable(b'clonebundles'):
2765 return
2769 return
2766
2770
2767 with remote.commandexecutor() as e:
2771 with remote.commandexecutor() as e:
2768 res = e.callcommand(b'clonebundles', {}).result()
2772 res = e.callcommand(b'clonebundles', {}).result()
2769
2773
2770 # If we call the wire protocol command, that's good enough to record the
2774 # If we call the wire protocol command, that's good enough to record the
2771 # attempt.
2775 # attempt.
2772 pullop.clonebundleattempted = True
2776 pullop.clonebundleattempted = True
2773
2777
2774 entries = bundlecaches.parseclonebundlesmanifest(repo, res)
2778 entries = bundlecaches.parseclonebundlesmanifest(repo, res)
2775 if not entries:
2779 if not entries:
2776 repo.ui.note(
2780 repo.ui.note(
2777 _(
2781 _(
2778 b'no clone bundles available on remote; '
2782 b'no clone bundles available on remote; '
2779 b'falling back to regular clone\n'
2783 b'falling back to regular clone\n'
2780 )
2784 )
2781 )
2785 )
2782 return
2786 return
2783
2787
2784 entries = bundlecaches.filterclonebundleentries(
2788 entries = bundlecaches.filterclonebundleentries(
2785 repo, entries, streamclonerequested=pullop.streamclonerequested
2789 repo, entries, streamclonerequested=pullop.streamclonerequested
2786 )
2790 )
2787
2791
2788 if not entries:
2792 if not entries:
2789 # There is a thundering herd concern here. However, if a server
2793 # There is a thundering herd concern here. However, if a server
2790 # operator doesn't advertise bundles appropriate for its clients,
2794 # operator doesn't advertise bundles appropriate for its clients,
2791 # they deserve what's coming. Furthermore, from a client's
2795 # they deserve what's coming. Furthermore, from a client's
2792 # perspective, no automatic fallback would mean not being able to
2796 # perspective, no automatic fallback would mean not being able to
2793 # clone!
2797 # clone!
2794 repo.ui.warn(
2798 repo.ui.warn(
2795 _(
2799 _(
2796 b'no compatible clone bundles available on server; '
2800 b'no compatible clone bundles available on server; '
2797 b'falling back to regular clone\n'
2801 b'falling back to regular clone\n'
2798 )
2802 )
2799 )
2803 )
2800 repo.ui.warn(
2804 repo.ui.warn(
2801 _(b'(you may want to report this to the server operator)\n')
2805 _(b'(you may want to report this to the server operator)\n')
2802 )
2806 )
2803 return
2807 return
2804
2808
2805 entries = bundlecaches.sortclonebundleentries(repo.ui, entries)
2809 entries = bundlecaches.sortclonebundleentries(repo.ui, entries)
2806
2810
2807 url = entries[0][b'URL']
2811 url = entries[0][b'URL']
2808 repo.ui.status(_(b'applying clone bundle from %s\n') % url)
2812 repo.ui.status(_(b'applying clone bundle from %s\n') % url)
2809 if trypullbundlefromurl(repo.ui, repo, url):
2813 if trypullbundlefromurl(repo.ui, repo, url):
2810 repo.ui.status(_(b'finished applying clone bundle\n'))
2814 repo.ui.status(_(b'finished applying clone bundle\n'))
2811 # Bundle failed.
2815 # Bundle failed.
2812 #
2816 #
2813 # We abort by default to avoid the thundering herd of
2817 # We abort by default to avoid the thundering herd of
2814 # clients flooding a server that was expecting expensive
2818 # clients flooding a server that was expecting expensive
2815 # clone load to be offloaded.
2819 # clone load to be offloaded.
2816 elif repo.ui.configbool(b'ui', b'clonebundlefallback'):
2820 elif repo.ui.configbool(b'ui', b'clonebundlefallback'):
2817 repo.ui.warn(_(b'falling back to normal clone\n'))
2821 repo.ui.warn(_(b'falling back to normal clone\n'))
2818 else:
2822 else:
2819 raise error.Abort(
2823 raise error.Abort(
2820 _(b'error applying bundle'),
2824 _(b'error applying bundle'),
2821 hint=_(
2825 hint=_(
2822 b'if this error persists, consider contacting '
2826 b'if this error persists, consider contacting '
2823 b'the server operator or disable clone '
2827 b'the server operator or disable clone '
2824 b'bundles via '
2828 b'bundles via '
2825 b'"--config ui.clonebundles=false"'
2829 b'"--config ui.clonebundles=false"'
2826 ),
2830 ),
2827 )
2831 )
2828
2832
2829
2833
2830 def trypullbundlefromurl(ui, repo, url):
2834 def trypullbundlefromurl(ui, repo, url):
2831 """Attempt to apply a bundle from a URL."""
2835 """Attempt to apply a bundle from a URL."""
2832 with repo.lock(), repo.transaction(b'bundleurl') as tr:
2836 with repo.lock(), repo.transaction(b'bundleurl') as tr:
2833 try:
2837 try:
2834 fh = urlmod.open(ui, url)
2838 fh = urlmod.open(ui, url)
2835 cg = readbundle(ui, fh, b'stream')
2839 cg = readbundle(ui, fh, b'stream')
2836
2840
2837 if isinstance(cg, streamclone.streamcloneapplier):
2841 if isinstance(cg, streamclone.streamcloneapplier):
2838 cg.apply(repo)
2842 cg.apply(repo)
2839 else:
2843 else:
2840 bundle2.applybundle(repo, cg, tr, b'clonebundles', url)
2844 bundle2.applybundle(repo, cg, tr, b'clonebundles', url)
2841 return True
2845 return True
2842 except urlerr.httperror as e:
2846 except urlerr.httperror as e:
2843 ui.warn(
2847 ui.warn(
2844 _(b'HTTP error fetching bundle: %s\n')
2848 _(b'HTTP error fetching bundle: %s\n')
2845 % stringutil.forcebytestr(e)
2849 % stringutil.forcebytestr(e)
2846 )
2850 )
2847 except urlerr.urlerror as e:
2851 except urlerr.urlerror as e:
2848 ui.warn(
2852 ui.warn(
2849 _(b'error fetching bundle: %s\n')
2853 _(b'error fetching bundle: %s\n')
2850 % stringutil.forcebytestr(e.reason)
2854 % stringutil.forcebytestr(e.reason)
2851 )
2855 )
2852
2856
2853 return False
2857 return False
@@ -1,1523 +1,1533 b''
1 ==================================================
1 ==================================================
2 Test obsmarkers interaction with bundle and strip
2 Test obsmarkers interaction with bundle and strip
3 ==================================================
3 ==================================================
4
4
5 Setup a repository with various case
5 Setup a repository with various case
6 ====================================
6 ====================================
7
7
8 Config setup
8 Config setup
9 ------------
9 ------------
10
10
11 $ cat >> $HGRCPATH <<EOF
11 $ cat >> $HGRCPATH <<EOF
12 > [command-templates]
12 > [command-templates]
13 > # simpler log output
13 > # simpler log output
14 > log = "{node|short}: {desc}\n"
14 > log = "{node|short}: {desc}\n"
15 >
15 >
16 > [experimental]
16 > [experimental]
17 > # enable evolution
17 > # enable evolution
18 > evolution=true
18 > evolution=true
19 >
19 >
20 > # include obsmarkers in bundle
20 > # include obsmarkers in bundle
21 > evolution.bundle-obsmarker = yes
21 > evolution.bundle-obsmarker = yes
22 >
22 >
23 > [extensions]
23 > [extensions]
24 > # needed for some tests
24 > # needed for some tests
25 > strip =
25 > strip =
26 > [defaults]
26 > [defaults]
27 > # we'll query many hidden changeset
27 > # we'll query many hidden changeset
28 > debugobsolete = --hidden
28 > debugobsolete = --hidden
29 > EOF
29 > EOF
30
30
31 $ mkcommit() {
31 $ mkcommit() {
32 > echo "$1" > "$1"
32 > echo "$1" > "$1"
33 > hg add "$1"
33 > hg add "$1"
34 > hg ci -m "$1"
34 > hg ci -m "$1"
35 > }
35 > }
36
36
37 $ getid() {
37 $ getid() {
38 > hg log --hidden --template '{node}\n' --rev "$1"
38 > hg log --hidden --template '{node}\n' --rev "$1"
39 > }
39 > }
40
40
41 $ mktestrepo () {
41 $ mktestrepo () {
42 > [ -n "$1" ] || exit 1
42 > [ -n "$1" ] || exit 1
43 > cd $TESTTMP
43 > cd $TESTTMP
44 > hg init $1
44 > hg init $1
45 > cd $1
45 > cd $1
46 > mkcommit ROOT
46 > mkcommit ROOT
47 > }
47 > }
48
48
49 Function to compare the expected bundled obsmarkers with the actually bundled
49 Function to compare the expected bundled obsmarkers with the actually bundled
50 obsmarkers. It also check the obsmarkers backed up during strip.
50 obsmarkers. It also check the obsmarkers backed up during strip.
51
51
52 $ testrevs () {
52 $ testrevs () {
53 > revs="$1"
53 > revs="$1"
54 > testname=`basename \`pwd\``
54 > testname=`basename \`pwd\``
55 > revsname=`hg --hidden log -T '-{desc}' --rev "${revs}"`
55 > revsname=`hg --hidden log -T '-{desc}' --rev "${revs}"`
56 > prefix="${TESTTMP}/${testname}${revsname}"
56 > prefix="${TESTTMP}/${testname}${revsname}"
57 > markersfile="${prefix}-relevant-markers.txt"
57 > markersfile="${prefix}-relevant-markers.txt"
58 > exclufile="${prefix}-exclusive-markers.txt"
58 > exclufile="${prefix}-exclusive-markers.txt"
59 > bundlefile="${prefix}-bundle.hg"
59 > bundlefile="${prefix}-bundle.hg"
60 > contentfile="${prefix}-bundle-markers.hg"
60 > contentfile="${prefix}-bundle-markers.hg"
61 > stripcontentfile="${prefix}-bundle-markers.hg"
61 > stripcontentfile="${prefix}-bundle-markers.hg"
62 > hg debugobsolete --hidden --rev "${revs}" | sed 's/^/ /' > "${markersfile}"
62 > hg debugobsolete --hidden --rev "${revs}" | sed 's/^/ /' > "${markersfile}"
63 > hg debugobsolete --hidden --rev "${revs}" --exclusive | sed 's/^/ /' > "${exclufile}"
63 > hg debugobsolete --hidden --rev "${revs}" --exclusive | sed 's/^/ /' > "${exclufile}"
64 > echo '### Matched revisions###'
64 > echo '### Matched revisions###'
65 > hg log --hidden --rev "${revs}" | sort
65 > hg log --hidden --rev "${revs}" | sort
66 > echo '### Relevant markers ###'
66 > echo '### Relevant markers ###'
67 > cat "${markersfile}"
67 > cat "${markersfile}"
68 > printf "# bundling: "
68 > printf "# bundling: "
69 > hg bundle --hidden --base "parents(roots(${revs}))" --rev "${revs}" "${bundlefile}"
69 > hg bundle --hidden --base "parents(roots(${revs}))" --rev "${revs}" "${bundlefile}"
70 > hg debugbundle --part-type obsmarkers "${bundlefile}" | sed 1,3d > "${contentfile}"
70 > hg debugbundle --part-type obsmarkers "${bundlefile}" | sed 1,3d > "${contentfile}"
71 > echo '### Bundled markers ###'
71 > echo '### Bundled markers ###'
72 > cat "${contentfile}"
72 > cat "${contentfile}"
73 > echo '### diff <relevant> <bundled> ###'
73 > echo '### diff <relevant> <bundled> ###'
74 > cmp "${markersfile}" "${contentfile}" || diff -u "${markersfile}" "${contentfile}"
74 > cmp "${markersfile}" "${contentfile}" || diff -u "${markersfile}" "${contentfile}"
75 > echo '#################################'
75 > echo '#################################'
76 > echo '### Exclusive markers ###'
76 > echo '### Exclusive markers ###'
77 > cat "${exclufile}"
77 > cat "${exclufile}"
78 > # if the matched revs do not have children, we also check the result of strip
78 > # if the matched revs do not have children, we also check the result of strip
79 > children=`hg log --hidden --rev "((${revs})::) - (${revs})"`
79 > children=`hg log --hidden --rev "((${revs})::) - (${revs})"`
80 > if [ -z "$children" ];
80 > if [ -z "$children" ];
81 > then
81 > then
82 > printf "# stripping: "
82 > printf "# stripping: "
83 > prestripfile="${prefix}-pre-strip.txt"
83 > prestripfile="${prefix}-pre-strip.txt"
84 > poststripfile="${prefix}-post-strip.txt"
84 > poststripfile="${prefix}-post-strip.txt"
85 > strippedfile="${prefix}-stripped-markers.txt"
85 > strippedfile="${prefix}-stripped-markers.txt"
86 > hg debugobsolete --hidden | sort | sed 's/^/ /' > "${prestripfile}"
86 > hg debugobsolete --hidden | sort | sed 's/^/ /' > "${prestripfile}"
87 > hg strip --hidden --rev "${revs}"
87 > hg strip --hidden --rev "${revs}"
88 > hg debugobsolete --hidden | sort | sed 's/^/ /' > "${poststripfile}"
88 > hg debugobsolete --hidden | sort | sed 's/^/ /' > "${poststripfile}"
89 > hg debugbundle --part-type obsmarkers .hg/strip-backup/* | sed 1,3d > "${stripcontentfile}"
89 > hg debugbundle --part-type obsmarkers .hg/strip-backup/* | sed 1,3d > "${stripcontentfile}"
90 > echo '### Backup markers ###'
90 > echo '### Backup markers ###'
91 > cat "${stripcontentfile}"
91 > cat "${stripcontentfile}"
92 > echo '### diff <relevant> <backed-up> ###'
92 > echo '### diff <relevant> <backed-up> ###'
93 > cmp "${markersfile}" "${stripcontentfile}" || diff -u "${markersfile}" "${stripcontentfile}"
93 > cmp "${markersfile}" "${stripcontentfile}" || diff -u "${markersfile}" "${stripcontentfile}"
94 > echo '#################################'
94 > echo '#################################'
95 > cat "${prestripfile}" "${poststripfile}" | sort | uniq -u > "${strippedfile}"
95 > cat "${prestripfile}" "${poststripfile}" | sort | uniq -u > "${strippedfile}"
96 > echo '### Stripped markers ###'
96 > echo '### Stripped markers ###'
97 > cat "${strippedfile}"
97 > cat "${strippedfile}"
98 > echo '### diff <exclusive> <stripped> ###'
98 > echo '### diff <exclusive> <stripped> ###'
99 > cmp "${exclufile}" "${strippedfile}" || diff -u "${exclufile}" "${strippedfile}"
99 > cmp "${exclufile}" "${strippedfile}" || diff -u "${exclufile}" "${strippedfile}"
100 > echo '#################################'
100 > echo '#################################'
101 > # restore and clean up repo for the next test
101 > # restore and clean up repo for the next test
102 > hg unbundle .hg/strip-backup/* | sed 's/^/# unbundling: /'
102 > hg unbundle .hg/strip-backup/* | sed 's/^/# unbundling: /'
103 > # clean up directory for the next test
103 > # clean up directory for the next test
104 > rm .hg/strip-backup/*
104 > rm .hg/strip-backup/*
105 > fi
105 > fi
106 > }
106 > }
107
107
108 root setup
108 root setup
109 -------------
109 -------------
110
110
111 simple chain
111 simple chain
112 ============
112 ============
113
113
114 . A0
114 . A0
115 . β‡ ΓΈβ‡ β—” A1
115 . β‡ ΓΈβ‡ β—” A1
116 . |/
116 . |/
117 . ●
117 . ●
118
118
119 setup
119 setup
120 -----
120 -----
121
121
122 $ mktestrepo simple-chain
122 $ mktestrepo simple-chain
123 $ mkcommit 'C-A0'
123 $ mkcommit 'C-A0'
124 $ hg up 'desc("ROOT")'
124 $ hg up 'desc("ROOT")'
125 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
125 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
126 $ mkcommit 'C-A1'
126 $ mkcommit 'C-A1'
127 created new head
127 created new head
128 $ hg debugobsolete a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 `getid 'desc("C-A0")'`
128 $ hg debugobsolete a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 `getid 'desc("C-A0")'`
129 1 new obsolescence markers
129 1 new obsolescence markers
130 $ hg debugobsolete `getid 'desc("C-A0")'` a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1
130 $ hg debugobsolete `getid 'desc("C-A0")'` a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1
131 1 new obsolescence markers
131 1 new obsolescence markers
132 obsoleted 1 changesets
132 obsoleted 1 changesets
133 $ hg debugobsolete a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1 `getid 'desc("C-A1")'`
133 $ hg debugobsolete a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1 `getid 'desc("C-A1")'`
134 1 new obsolescence markers
134 1 new obsolescence markers
135
135
136 $ hg up 'desc("ROOT")'
136 $ hg up 'desc("ROOT")'
137 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
137 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
138 $ hg log --hidden -G
138 $ hg log --hidden -G
139 o cf2c22470d67: C-A1
139 o cf2c22470d67: C-A1
140 |
140 |
141 | x 84fcb0dfe17b: C-A0
141 | x 84fcb0dfe17b: C-A0
142 |/
142 |/
143 @ ea207398892e: ROOT
143 @ ea207398892e: ROOT
144
144
145 $ hg debugobsolete
145 $ hg debugobsolete
146 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
146 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
147 84fcb0dfe17b256ebae52e05572993b9194c018a a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
147 84fcb0dfe17b256ebae52e05572993b9194c018a a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
148 a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1 cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
148 a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1 cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
149
149
150 Actual testing
150 Actual testing
151 --------------
151 --------------
152
152
153 $ testrevs 'desc("C-A0")'
153 $ testrevs 'desc("C-A0")'
154 ### Matched revisions###
154 ### Matched revisions###
155 84fcb0dfe17b: C-A0
155 84fcb0dfe17b: C-A0
156 ### Relevant markers ###
156 ### Relevant markers ###
157 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
157 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
158 # bundling: 1 changesets found
158 # bundling: 1 changesets found
159 ### Bundled markers ###
159 ### Bundled markers ###
160 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
160 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
161 ### diff <relevant> <bundled> ###
161 ### diff <relevant> <bundled> ###
162 #################################
162 #################################
163 ### Exclusive markers ###
163 ### Exclusive markers ###
164 # stripping: saved backup bundle to $TESTTMP/simple-chain/.hg/strip-backup/84fcb0dfe17b-6454bbdc-backup.hg
164 # stripping: saved backup bundle to $TESTTMP/simple-chain/.hg/strip-backup/84fcb0dfe17b-6454bbdc-backup.hg
165 ### Backup markers ###
165 ### Backup markers ###
166 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
166 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
167 ### diff <relevant> <backed-up> ###
167 ### diff <relevant> <backed-up> ###
168 #################################
168 #################################
169 ### Stripped markers ###
169 ### Stripped markers ###
170 ### diff <exclusive> <stripped> ###
170 ### diff <exclusive> <stripped> ###
171 #################################
171 #################################
172 # unbundling: adding changesets
172 # unbundling: adding changesets
173 # unbundling: adding manifests
173 # unbundling: adding manifests
174 # unbundling: adding file changes
174 # unbundling: adding file changes
175 # unbundling: added 1 changesets with 1 changes to 1 files (+1 heads)
175 # unbundling: added 1 changesets with 1 changes to 1 files (+1 heads)
176 # unbundling: (1 other changesets obsolete on arrival)
176 # unbundling: (1 other changesets obsolete on arrival)
177 # unbundling: (run 'hg heads' to see heads)
177 # unbundling: (run 'hg heads' to see heads)
178
178
179 $ testrevs 'desc("C-A1")'
179 $ testrevs 'desc("C-A1")'
180 ### Matched revisions###
180 ### Matched revisions###
181 cf2c22470d67: C-A1
181 cf2c22470d67: C-A1
182 ### Relevant markers ###
182 ### Relevant markers ###
183 84fcb0dfe17b256ebae52e05572993b9194c018a a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
183 84fcb0dfe17b256ebae52e05572993b9194c018a a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
184 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
184 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
185 a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1 cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
185 a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1 cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
186 # bundling: 1 changesets found
186 # bundling: 1 changesets found
187 ### Bundled markers ###
187 ### Bundled markers ###
188 84fcb0dfe17b256ebae52e05572993b9194c018a a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
188 84fcb0dfe17b256ebae52e05572993b9194c018a a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
189 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
189 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
190 a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1 cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
190 a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1 cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
191 ### diff <relevant> <bundled> ###
191 ### diff <relevant> <bundled> ###
192 #################################
192 #################################
193 ### Exclusive markers ###
193 ### Exclusive markers ###
194 84fcb0dfe17b256ebae52e05572993b9194c018a a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
194 84fcb0dfe17b256ebae52e05572993b9194c018a a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
195 a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1 cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
195 a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1 cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
196 # stripping: saved backup bundle to $TESTTMP/simple-chain/.hg/strip-backup/cf2c22470d67-fa0f07b0-backup.hg
196 # stripping: saved backup bundle to $TESTTMP/simple-chain/.hg/strip-backup/cf2c22470d67-fa0f07b0-backup.hg
197 ### Backup markers ###
197 ### Backup markers ###
198 84fcb0dfe17b256ebae52e05572993b9194c018a a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
198 84fcb0dfe17b256ebae52e05572993b9194c018a a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
199 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
199 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
200 a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1 cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
200 a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1 cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
201 ### diff <relevant> <backed-up> ###
201 ### diff <relevant> <backed-up> ###
202 #################################
202 #################################
203 ### Stripped markers ###
203 ### Stripped markers ###
204 84fcb0dfe17b256ebae52e05572993b9194c018a a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
204 84fcb0dfe17b256ebae52e05572993b9194c018a a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
205 a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1 cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
205 a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1 cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
206 ### diff <exclusive> <stripped> ###
206 ### diff <exclusive> <stripped> ###
207 #################################
207 #################################
208 # unbundling: adding changesets
208 # unbundling: adding changesets
209 # unbundling: adding manifests
209 # unbundling: adding manifests
210 # unbundling: adding file changes
210 # unbundling: adding file changes
211 # unbundling: added 1 changesets with 1 changes to 1 files (+1 heads)
211 # unbundling: added 1 changesets with 1 changes to 1 files (+1 heads)
212 # unbundling: 2 new obsolescence markers
212 # unbundling: 2 new obsolescence markers
213 # unbundling: obsoleted 1 changesets
213 # unbundling: obsoleted 1 changesets
214 # unbundling: new changesets cf2c22470d67 (1 drafts)
214 # unbundling: new changesets cf2c22470d67 (1 drafts)
215 # unbundling: (run 'hg heads' to see heads)
215 # unbundling: (run 'hg heads' to see heads)
216
216
217 $ testrevs 'desc("C-A")'
217 $ testrevs 'desc("C-A")'
218 ### Matched revisions###
218 ### Matched revisions###
219 84fcb0dfe17b: C-A0
219 84fcb0dfe17b: C-A0
220 cf2c22470d67: C-A1
220 cf2c22470d67: C-A1
221 ### Relevant markers ###
221 ### Relevant markers ###
222 84fcb0dfe17b256ebae52e05572993b9194c018a a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
222 84fcb0dfe17b256ebae52e05572993b9194c018a a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
223 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
223 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
224 a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1 cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
224 a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1 cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
225 # bundling: 2 changesets found
225 # bundling: 2 changesets found
226 ### Bundled markers ###
226 ### Bundled markers ###
227 84fcb0dfe17b256ebae52e05572993b9194c018a a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
227 84fcb0dfe17b256ebae52e05572993b9194c018a a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
228 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
228 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
229 a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1 cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
229 a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1 cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
230 ### diff <relevant> <bundled> ###
230 ### diff <relevant> <bundled> ###
231 #################################
231 #################################
232 ### Exclusive markers ###
232 ### Exclusive markers ###
233 84fcb0dfe17b256ebae52e05572993b9194c018a a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
233 84fcb0dfe17b256ebae52e05572993b9194c018a a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
234 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
234 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
235 a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1 cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
235 a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1 cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
236 # stripping: saved backup bundle to $TESTTMP/simple-chain/.hg/strip-backup/cf2c22470d67-fce4fc64-backup.hg
236 # stripping: saved backup bundle to $TESTTMP/simple-chain/.hg/strip-backup/cf2c22470d67-fce4fc64-backup.hg
237 ### Backup markers ###
237 ### Backup markers ###
238 84fcb0dfe17b256ebae52e05572993b9194c018a a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
238 84fcb0dfe17b256ebae52e05572993b9194c018a a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
239 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
239 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
240 a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1 cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
240 a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1 cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
241 ### diff <relevant> <backed-up> ###
241 ### diff <relevant> <backed-up> ###
242 #################################
242 #################################
243 ### Stripped markers ###
243 ### Stripped markers ###
244 84fcb0dfe17b256ebae52e05572993b9194c018a a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
244 84fcb0dfe17b256ebae52e05572993b9194c018a a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
245 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
245 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
246 a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1 cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
246 a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1 cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
247 ### diff <exclusive> <stripped> ###
247 ### diff <exclusive> <stripped> ###
248 #################################
248 #################################
249 # unbundling: adding changesets
249 # unbundling: adding changesets
250 # unbundling: adding manifests
250 # unbundling: adding manifests
251 # unbundling: adding file changes
251 # unbundling: adding file changes
252 # unbundling: added 2 changesets with 2 changes to 2 files (+1 heads)
252 # unbundling: added 2 changesets with 2 changes to 2 files (+1 heads)
253 # unbundling: 3 new obsolescence markers
253 # unbundling: 3 new obsolescence markers
254 # unbundling: new changesets cf2c22470d67 (1 drafts)
254 # unbundling: new changesets cf2c22470d67 (1 drafts)
255 # unbundling: (1 other changesets obsolete on arrival)
255 # unbundling: (1 other changesets obsolete on arrival)
256 # unbundling: (run 'hg heads' to see heads)
256 # unbundling: (run 'hg heads' to see heads)
257
257
258 chain with prune children
258 chain with prune children
259 =========================
259 =========================
260
260
261 . β‡ βŠ— B0
261 . β‡ βŠ— B0
262 . |
262 . |
263 . β‡ ΓΈβ‡ β—” A1
263 . β‡ ΓΈβ‡ β—” A1
264 . |
264 . |
265 . ●
265 . ●
266
266
267 setup
267 setup
268 -----
268 -----
269
269
270 $ mktestrepo prune
270 $ mktestrepo prune
271 $ mkcommit 'C-A0'
271 $ mkcommit 'C-A0'
272 $ mkcommit 'C-B0'
272 $ mkcommit 'C-B0'
273 $ hg up 'desc("ROOT")'
273 $ hg up 'desc("ROOT")'
274 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
274 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
275 $ mkcommit 'C-A1'
275 $ mkcommit 'C-A1'
276 created new head
276 created new head
277 $ hg debugobsolete a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 `getid 'desc("C-A0")'`
277 $ hg debugobsolete a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 `getid 'desc("C-A0")'`
278 1 new obsolescence markers
278 1 new obsolescence markers
279 $ hg debugobsolete `getid 'desc("C-A0")'` `getid 'desc("C-A1")'`
279 $ hg debugobsolete `getid 'desc("C-A0")'` `getid 'desc("C-A1")'`
280 1 new obsolescence markers
280 1 new obsolescence markers
281 obsoleted 1 changesets
281 obsoleted 1 changesets
282 1 new orphan changesets
282 1 new orphan changesets
283 $ hg debugobsolete --record-parents `getid 'desc("C-B0")'`
283 $ hg debugobsolete --record-parents `getid 'desc("C-B0")'`
284 1 new obsolescence markers
284 1 new obsolescence markers
285 obsoleted 1 changesets
285 obsoleted 1 changesets
286 $ hg up 'desc("ROOT")'
286 $ hg up 'desc("ROOT")'
287 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
287 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
288 $ hg log --hidden -G
288 $ hg log --hidden -G
289 o cf2c22470d67: C-A1
289 o cf2c22470d67: C-A1
290 |
290 |
291 | x 29f93b1df87b: C-B0
291 | x 29f93b1df87b: C-B0
292 | |
292 | |
293 | x 84fcb0dfe17b: C-A0
293 | x 84fcb0dfe17b: C-A0
294 |/
294 |/
295 @ ea207398892e: ROOT
295 @ ea207398892e: ROOT
296
296
297 $ hg debugobsolete
297 $ hg debugobsolete
298 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
298 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
299 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
299 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
300 29f93b1df87baee1824e014080d8adf145f81783 0 {84fcb0dfe17b256ebae52e05572993b9194c018a} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
300 29f93b1df87baee1824e014080d8adf145f81783 0 {84fcb0dfe17b256ebae52e05572993b9194c018a} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
301
301
302 Actual testing
302 Actual testing
303 --------------
303 --------------
304
304
305 $ testrevs 'desc("C-A0")'
305 $ testrevs 'desc("C-A0")'
306 ### Matched revisions###
306 ### Matched revisions###
307 84fcb0dfe17b: C-A0
307 84fcb0dfe17b: C-A0
308 ### Relevant markers ###
308 ### Relevant markers ###
309 29f93b1df87baee1824e014080d8adf145f81783 0 {84fcb0dfe17b256ebae52e05572993b9194c018a} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
309 29f93b1df87baee1824e014080d8adf145f81783 0 {84fcb0dfe17b256ebae52e05572993b9194c018a} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
310 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
310 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
311 # bundling: 1 changesets found
311 # bundling: 1 changesets found
312 ### Bundled markers ###
312 ### Bundled markers ###
313 29f93b1df87baee1824e014080d8adf145f81783 0 {84fcb0dfe17b256ebae52e05572993b9194c018a} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
313 29f93b1df87baee1824e014080d8adf145f81783 0 {84fcb0dfe17b256ebae52e05572993b9194c018a} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
314 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
314 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
315 ### diff <relevant> <bundled> ###
315 ### diff <relevant> <bundled> ###
316 #################################
316 #################################
317 ### Exclusive markers ###
317 ### Exclusive markers ###
318
318
319 (The strip markers is considered exclusive to the pruned changeset even if it
319 (The strip markers is considered exclusive to the pruned changeset even if it
320 is also considered "relevant" to its parent. This allows to strip prune
320 is also considered "relevant" to its parent. This allows to strip prune
321 markers. This avoid leaving prune markers from dead-end that could be
321 markers. This avoid leaving prune markers from dead-end that could be
322 problematic)
322 problematic)
323
323
324 $ testrevs 'desc("C-B0")'
324 $ testrevs 'desc("C-B0")'
325 ### Matched revisions###
325 ### Matched revisions###
326 29f93b1df87b: C-B0
326 29f93b1df87b: C-B0
327 ### Relevant markers ###
327 ### Relevant markers ###
328 29f93b1df87baee1824e014080d8adf145f81783 0 {84fcb0dfe17b256ebae52e05572993b9194c018a} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
328 29f93b1df87baee1824e014080d8adf145f81783 0 {84fcb0dfe17b256ebae52e05572993b9194c018a} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
329 # bundling: 1 changesets found
329 # bundling: 1 changesets found
330 ### Bundled markers ###
330 ### Bundled markers ###
331 29f93b1df87baee1824e014080d8adf145f81783 0 {84fcb0dfe17b256ebae52e05572993b9194c018a} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
331 29f93b1df87baee1824e014080d8adf145f81783 0 {84fcb0dfe17b256ebae52e05572993b9194c018a} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
332 ### diff <relevant> <bundled> ###
332 ### diff <relevant> <bundled> ###
333 #################################
333 #################################
334 ### Exclusive markers ###
334 ### Exclusive markers ###
335 29f93b1df87baee1824e014080d8adf145f81783 0 {84fcb0dfe17b256ebae52e05572993b9194c018a} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
335 29f93b1df87baee1824e014080d8adf145f81783 0 {84fcb0dfe17b256ebae52e05572993b9194c018a} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
336 # stripping: saved backup bundle to $TESTTMP/prune/.hg/strip-backup/29f93b1df87b-7fb32101-backup.hg
336 # stripping: saved backup bundle to $TESTTMP/prune/.hg/strip-backup/29f93b1df87b-7fb32101-backup.hg
337 ### Backup markers ###
337 ### Backup markers ###
338 29f93b1df87baee1824e014080d8adf145f81783 0 {84fcb0dfe17b256ebae52e05572993b9194c018a} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
338 29f93b1df87baee1824e014080d8adf145f81783 0 {84fcb0dfe17b256ebae52e05572993b9194c018a} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
339 ### diff <relevant> <backed-up> ###
339 ### diff <relevant> <backed-up> ###
340 #################################
340 #################################
341 ### Stripped markers ###
341 ### Stripped markers ###
342 29f93b1df87baee1824e014080d8adf145f81783 0 {84fcb0dfe17b256ebae52e05572993b9194c018a} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
342 29f93b1df87baee1824e014080d8adf145f81783 0 {84fcb0dfe17b256ebae52e05572993b9194c018a} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
343 ### diff <exclusive> <stripped> ###
343 ### diff <exclusive> <stripped> ###
344 #################################
344 #################################
345 # unbundling: adding changesets
345 # unbundling: adding changesets
346 # unbundling: adding manifests
346 # unbundling: adding manifests
347 # unbundling: adding file changes
347 # unbundling: adding file changes
348 # unbundling: added 1 changesets with 1 changes to 1 files
348 # unbundling: added 1 changesets with 1 changes to 1 files
349 # unbundling: 1 new obsolescence markers
349 # unbundling: 1 new obsolescence markers
350 # unbundling: (1 other changesets obsolete on arrival)
350 # unbundling: (1 other changesets obsolete on arrival)
351 # unbundling: (run 'hg update' to get a working copy)
351 # unbundling: (run 'hg update' to get a working copy)
352
352
353 $ testrevs 'desc("C-A1")'
353 $ testrevs 'desc("C-A1")'
354 ### Matched revisions###
354 ### Matched revisions###
355 cf2c22470d67: C-A1
355 cf2c22470d67: C-A1
356 ### Relevant markers ###
356 ### Relevant markers ###
357 29f93b1df87baee1824e014080d8adf145f81783 0 {84fcb0dfe17b256ebae52e05572993b9194c018a} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
357 29f93b1df87baee1824e014080d8adf145f81783 0 {84fcb0dfe17b256ebae52e05572993b9194c018a} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
358 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
358 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
359 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
359 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
360 # bundling: 1 changesets found
360 # bundling: 1 changesets found
361 ### Bundled markers ###
361 ### Bundled markers ###
362 29f93b1df87baee1824e014080d8adf145f81783 0 {84fcb0dfe17b256ebae52e05572993b9194c018a} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
362 29f93b1df87baee1824e014080d8adf145f81783 0 {84fcb0dfe17b256ebae52e05572993b9194c018a} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
363 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
363 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
364 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
364 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
365 ### diff <relevant> <bundled> ###
365 ### diff <relevant> <bundled> ###
366 #################################
366 #################################
367 ### Exclusive markers ###
367 ### Exclusive markers ###
368 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
368 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
369 # stripping: saved backup bundle to $TESTTMP/prune/.hg/strip-backup/cf2c22470d67-fa0f07b0-backup.hg
369 # stripping: saved backup bundle to $TESTTMP/prune/.hg/strip-backup/cf2c22470d67-fa0f07b0-backup.hg
370 ### Backup markers ###
370 ### Backup markers ###
371 29f93b1df87baee1824e014080d8adf145f81783 0 {84fcb0dfe17b256ebae52e05572993b9194c018a} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
371 29f93b1df87baee1824e014080d8adf145f81783 0 {84fcb0dfe17b256ebae52e05572993b9194c018a} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
372 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
372 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
373 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
373 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
374 ### diff <relevant> <backed-up> ###
374 ### diff <relevant> <backed-up> ###
375 #################################
375 #################################
376 ### Stripped markers ###
376 ### Stripped markers ###
377 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
377 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
378 ### diff <exclusive> <stripped> ###
378 ### diff <exclusive> <stripped> ###
379 #################################
379 #################################
380 # unbundling: adding changesets
380 # unbundling: adding changesets
381 # unbundling: adding manifests
381 # unbundling: adding manifests
382 # unbundling: adding file changes
382 # unbundling: adding file changes
383 # unbundling: added 1 changesets with 1 changes to 1 files (+1 heads)
383 # unbundling: added 1 changesets with 1 changes to 1 files (+1 heads)
384 # unbundling: 1 new obsolescence markers
384 # unbundling: 1 new obsolescence markers
385 # unbundling: obsoleted 1 changesets
385 # unbundling: obsoleted 1 changesets
386 # unbundling: new changesets cf2c22470d67 (1 drafts)
386 # unbundling: new changesets cf2c22470d67 (1 drafts)
387 # unbundling: (run 'hg heads' to see heads)
387 # unbundling: (run 'hg heads' to see heads)
388
388
389 bundling multiple revisions
389 bundling multiple revisions
390
390
391 $ testrevs 'desc("C-A")'
391 $ testrevs 'desc("C-A")'
392 ### Matched revisions###
392 ### Matched revisions###
393 84fcb0dfe17b: C-A0
393 84fcb0dfe17b: C-A0
394 cf2c22470d67: C-A1
394 cf2c22470d67: C-A1
395 ### Relevant markers ###
395 ### Relevant markers ###
396 29f93b1df87baee1824e014080d8adf145f81783 0 {84fcb0dfe17b256ebae52e05572993b9194c018a} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
396 29f93b1df87baee1824e014080d8adf145f81783 0 {84fcb0dfe17b256ebae52e05572993b9194c018a} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
397 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
397 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
398 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
398 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
399 # bundling: 2 changesets found
399 # bundling: 2 changesets found
400 ### Bundled markers ###
400 ### Bundled markers ###
401 29f93b1df87baee1824e014080d8adf145f81783 0 {84fcb0dfe17b256ebae52e05572993b9194c018a} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
401 29f93b1df87baee1824e014080d8adf145f81783 0 {84fcb0dfe17b256ebae52e05572993b9194c018a} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
402 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
402 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
403 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
403 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
404 ### diff <relevant> <bundled> ###
404 ### diff <relevant> <bundled> ###
405 #################################
405 #################################
406 ### Exclusive markers ###
406 ### Exclusive markers ###
407 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
407 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
408 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
408 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
409
409
410 $ testrevs 'desc("C-")'
410 $ testrevs 'desc("C-")'
411 ### Matched revisions###
411 ### Matched revisions###
412 29f93b1df87b: C-B0
412 29f93b1df87b: C-B0
413 84fcb0dfe17b: C-A0
413 84fcb0dfe17b: C-A0
414 cf2c22470d67: C-A1
414 cf2c22470d67: C-A1
415 ### Relevant markers ###
415 ### Relevant markers ###
416 29f93b1df87baee1824e014080d8adf145f81783 0 {84fcb0dfe17b256ebae52e05572993b9194c018a} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
416 29f93b1df87baee1824e014080d8adf145f81783 0 {84fcb0dfe17b256ebae52e05572993b9194c018a} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
417 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
417 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
418 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
418 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
419 # bundling: 3 changesets found
419 # bundling: 3 changesets found
420 ### Bundled markers ###
420 ### Bundled markers ###
421 29f93b1df87baee1824e014080d8adf145f81783 0 {84fcb0dfe17b256ebae52e05572993b9194c018a} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
421 29f93b1df87baee1824e014080d8adf145f81783 0 {84fcb0dfe17b256ebae52e05572993b9194c018a} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
422 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
422 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
423 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
423 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
424 ### diff <relevant> <bundled> ###
424 ### diff <relevant> <bundled> ###
425 #################################
425 #################################
426 ### Exclusive markers ###
426 ### Exclusive markers ###
427 29f93b1df87baee1824e014080d8adf145f81783 0 {84fcb0dfe17b256ebae52e05572993b9194c018a} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
427 29f93b1df87baee1824e014080d8adf145f81783 0 {84fcb0dfe17b256ebae52e05572993b9194c018a} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
428 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
428 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
429 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
429 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
430 # stripping: saved backup bundle to $TESTTMP/prune/.hg/strip-backup/cf2c22470d67-884c33b0-backup.hg
430 # stripping: saved backup bundle to $TESTTMP/prune/.hg/strip-backup/cf2c22470d67-884c33b0-backup.hg
431 ### Backup markers ###
431 ### Backup markers ###
432 29f93b1df87baee1824e014080d8adf145f81783 0 {84fcb0dfe17b256ebae52e05572993b9194c018a} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
432 29f93b1df87baee1824e014080d8adf145f81783 0 {84fcb0dfe17b256ebae52e05572993b9194c018a} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
433 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
433 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
434 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
434 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
435 ### diff <relevant> <backed-up> ###
435 ### diff <relevant> <backed-up> ###
436 #################################
436 #################################
437 ### Stripped markers ###
437 ### Stripped markers ###
438 29f93b1df87baee1824e014080d8adf145f81783 0 {84fcb0dfe17b256ebae52e05572993b9194c018a} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
438 29f93b1df87baee1824e014080d8adf145f81783 0 {84fcb0dfe17b256ebae52e05572993b9194c018a} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
439 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
439 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
440 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
440 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
441 ### diff <exclusive> <stripped> ###
441 ### diff <exclusive> <stripped> ###
442 #################################
442 #################################
443 # unbundling: adding changesets
443 # unbundling: adding changesets
444 # unbundling: adding manifests
444 # unbundling: adding manifests
445 # unbundling: adding file changes
445 # unbundling: adding file changes
446 # unbundling: added 3 changesets with 3 changes to 3 files (+1 heads)
446 # unbundling: added 3 changesets with 3 changes to 3 files (+1 heads)
447 # unbundling: 3 new obsolescence markers
447 # unbundling: 3 new obsolescence markers
448 # unbundling: new changesets cf2c22470d67 (1 drafts)
448 # unbundling: new changesets cf2c22470d67 (1 drafts)
449 # unbundling: (2 other changesets obsolete on arrival)
449 # unbundling: (2 other changesets obsolete on arrival)
450 # unbundling: (run 'hg heads' to see heads)
450 # unbundling: (run 'hg heads' to see heads)
451
451
452 chain with precursors also pruned
452 chain with precursors also pruned
453 =================================
453 =================================
454
454
455 . A0 (also pruned)
455 . A0 (also pruned)
456 . β‡ ΓΈβ‡ β—” A1
456 . β‡ ΓΈβ‡ β—” A1
457 . |
457 . |
458 . ●
458 . ●
459
459
460 setup
460 setup
461 -----
461 -----
462
462
463 $ mktestrepo prune-inline
463 $ mktestrepo prune-inline
464 $ mkcommit 'C-A0'
464 $ mkcommit 'C-A0'
465 $ hg up 'desc("ROOT")'
465 $ hg up 'desc("ROOT")'
466 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
466 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
467 $ mkcommit 'C-A1'
467 $ mkcommit 'C-A1'
468 created new head
468 created new head
469 $ hg debugobsolete a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 `getid 'desc("C-A0")'`
469 $ hg debugobsolete a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 `getid 'desc("C-A0")'`
470 1 new obsolescence markers
470 1 new obsolescence markers
471 $ hg debugobsolete --record-parents `getid 'desc("C-A0")'`
471 $ hg debugobsolete --record-parents `getid 'desc("C-A0")'`
472 1 new obsolescence markers
472 1 new obsolescence markers
473 obsoleted 1 changesets
473 obsoleted 1 changesets
474 $ hg debugobsolete `getid 'desc("C-A0")'` `getid 'desc("C-A1")'`
474 $ hg debugobsolete `getid 'desc("C-A0")'` `getid 'desc("C-A1")'`
475 1 new obsolescence markers
475 1 new obsolescence markers
476 $ hg up 'desc("ROOT")'
476 $ hg up 'desc("ROOT")'
477 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
477 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
478 $ hg log --hidden -G
478 $ hg log --hidden -G
479 o cf2c22470d67: C-A1
479 o cf2c22470d67: C-A1
480 |
480 |
481 | x 84fcb0dfe17b: C-A0
481 | x 84fcb0dfe17b: C-A0
482 |/
482 |/
483 @ ea207398892e: ROOT
483 @ ea207398892e: ROOT
484
484
485 $ hg debugobsolete
485 $ hg debugobsolete
486 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
486 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
487 84fcb0dfe17b256ebae52e05572993b9194c018a 0 {ea207398892eb49e06441f10dda2a731f0450f20} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
487 84fcb0dfe17b256ebae52e05572993b9194c018a 0 {ea207398892eb49e06441f10dda2a731f0450f20} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
488 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
488 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
489
489
490 Actual testing
490 Actual testing
491 --------------
491 --------------
492
492
493 $ testrevs 'desc("C-A0")'
493 $ testrevs 'desc("C-A0")'
494 ### Matched revisions###
494 ### Matched revisions###
495 84fcb0dfe17b: C-A0
495 84fcb0dfe17b: C-A0
496 ### Relevant markers ###
496 ### Relevant markers ###
497 84fcb0dfe17b256ebae52e05572993b9194c018a 0 {ea207398892eb49e06441f10dda2a731f0450f20} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
497 84fcb0dfe17b256ebae52e05572993b9194c018a 0 {ea207398892eb49e06441f10dda2a731f0450f20} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
498 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
498 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
499 # bundling: 1 changesets found
499 # bundling: 1 changesets found
500 ### Bundled markers ###
500 ### Bundled markers ###
501 84fcb0dfe17b256ebae52e05572993b9194c018a 0 {ea207398892eb49e06441f10dda2a731f0450f20} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
501 84fcb0dfe17b256ebae52e05572993b9194c018a 0 {ea207398892eb49e06441f10dda2a731f0450f20} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
502 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
502 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
503 ### diff <relevant> <bundled> ###
503 ### diff <relevant> <bundled> ###
504 #################################
504 #################################
505 ### Exclusive markers ###
505 ### Exclusive markers ###
506 # stripping: saved backup bundle to $TESTTMP/prune-inline/.hg/strip-backup/84fcb0dfe17b-6454bbdc-backup.hg
506 # stripping: saved backup bundle to $TESTTMP/prune-inline/.hg/strip-backup/84fcb0dfe17b-6454bbdc-backup.hg
507 ### Backup markers ###
507 ### Backup markers ###
508 84fcb0dfe17b256ebae52e05572993b9194c018a 0 {ea207398892eb49e06441f10dda2a731f0450f20} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
508 84fcb0dfe17b256ebae52e05572993b9194c018a 0 {ea207398892eb49e06441f10dda2a731f0450f20} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
509 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
509 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
510 ### diff <relevant> <backed-up> ###
510 ### diff <relevant> <backed-up> ###
511 #################################
511 #################################
512 ### Stripped markers ###
512 ### Stripped markers ###
513 ### diff <exclusive> <stripped> ###
513 ### diff <exclusive> <stripped> ###
514 #################################
514 #################################
515 # unbundling: adding changesets
515 # unbundling: adding changesets
516 # unbundling: adding manifests
516 # unbundling: adding manifests
517 # unbundling: adding file changes
517 # unbundling: adding file changes
518 # unbundling: added 1 changesets with 1 changes to 1 files (+1 heads)
518 # unbundling: added 1 changesets with 1 changes to 1 files (+1 heads)
519 # unbundling: (1 other changesets obsolete on arrival)
519 # unbundling: (1 other changesets obsolete on arrival)
520 # unbundling: (run 'hg heads' to see heads)
520 # unbundling: (run 'hg heads' to see heads)
521
521
522 $ testrevs 'desc("C-A1")'
522 $ testrevs 'desc("C-A1")'
523 ### Matched revisions###
523 ### Matched revisions###
524 cf2c22470d67: C-A1
524 cf2c22470d67: C-A1
525 ### Relevant markers ###
525 ### Relevant markers ###
526 84fcb0dfe17b256ebae52e05572993b9194c018a 0 {ea207398892eb49e06441f10dda2a731f0450f20} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
526 84fcb0dfe17b256ebae52e05572993b9194c018a 0 {ea207398892eb49e06441f10dda2a731f0450f20} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
527 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
527 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
528 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
528 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
529 # bundling: 1 changesets found
529 # bundling: 1 changesets found
530 ### Bundled markers ###
530 ### Bundled markers ###
531 84fcb0dfe17b256ebae52e05572993b9194c018a 0 {ea207398892eb49e06441f10dda2a731f0450f20} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
531 84fcb0dfe17b256ebae52e05572993b9194c018a 0 {ea207398892eb49e06441f10dda2a731f0450f20} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
532 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
532 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
533 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
533 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
534 ### diff <relevant> <bundled> ###
534 ### diff <relevant> <bundled> ###
535 #################################
535 #################################
536 ### Exclusive markers ###
536 ### Exclusive markers ###
537 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
537 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
538 # stripping: saved backup bundle to $TESTTMP/prune-inline/.hg/strip-backup/cf2c22470d67-fa0f07b0-backup.hg
538 # stripping: saved backup bundle to $TESTTMP/prune-inline/.hg/strip-backup/cf2c22470d67-fa0f07b0-backup.hg
539 ### Backup markers ###
539 ### Backup markers ###
540 84fcb0dfe17b256ebae52e05572993b9194c018a 0 {ea207398892eb49e06441f10dda2a731f0450f20} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
540 84fcb0dfe17b256ebae52e05572993b9194c018a 0 {ea207398892eb49e06441f10dda2a731f0450f20} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
541 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
541 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
542 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
542 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
543 ### diff <relevant> <backed-up> ###
543 ### diff <relevant> <backed-up> ###
544 #################################
544 #################################
545 ### Stripped markers ###
545 ### Stripped markers ###
546 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
546 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
547 ### diff <exclusive> <stripped> ###
547 ### diff <exclusive> <stripped> ###
548 #################################
548 #################################
549 # unbundling: adding changesets
549 # unbundling: adding changesets
550 # unbundling: adding manifests
550 # unbundling: adding manifests
551 # unbundling: adding file changes
551 # unbundling: adding file changes
552 # unbundling: added 1 changesets with 1 changes to 1 files (+1 heads)
552 # unbundling: added 1 changesets with 1 changes to 1 files (+1 heads)
553 # unbundling: 1 new obsolescence markers
553 # unbundling: 1 new obsolescence markers
554 # unbundling: new changesets cf2c22470d67 (1 drafts)
554 # unbundling: new changesets cf2c22470d67 (1 drafts)
555 # unbundling: (run 'hg heads' to see heads)
555 # unbundling: (run 'hg heads' to see heads)
556
556
557 $ testrevs 'desc("C-A")'
557 $ testrevs 'desc("C-A")'
558 ### Matched revisions###
558 ### Matched revisions###
559 84fcb0dfe17b: C-A0
559 84fcb0dfe17b: C-A0
560 cf2c22470d67: C-A1
560 cf2c22470d67: C-A1
561 ### Relevant markers ###
561 ### Relevant markers ###
562 84fcb0dfe17b256ebae52e05572993b9194c018a 0 {ea207398892eb49e06441f10dda2a731f0450f20} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
562 84fcb0dfe17b256ebae52e05572993b9194c018a 0 {ea207398892eb49e06441f10dda2a731f0450f20} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
563 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
563 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
564 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
564 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
565 # bundling: 2 changesets found
565 # bundling: 2 changesets found
566 ### Bundled markers ###
566 ### Bundled markers ###
567 84fcb0dfe17b256ebae52e05572993b9194c018a 0 {ea207398892eb49e06441f10dda2a731f0450f20} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
567 84fcb0dfe17b256ebae52e05572993b9194c018a 0 {ea207398892eb49e06441f10dda2a731f0450f20} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
568 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
568 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
569 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
569 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
570 ### diff <relevant> <bundled> ###
570 ### diff <relevant> <bundled> ###
571 #################################
571 #################################
572 ### Exclusive markers ###
572 ### Exclusive markers ###
573 84fcb0dfe17b256ebae52e05572993b9194c018a 0 {ea207398892eb49e06441f10dda2a731f0450f20} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
573 84fcb0dfe17b256ebae52e05572993b9194c018a 0 {ea207398892eb49e06441f10dda2a731f0450f20} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
574 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
574 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
575 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
575 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
576 # stripping: saved backup bundle to $TESTTMP/prune-inline/.hg/strip-backup/cf2c22470d67-fce4fc64-backup.hg
576 # stripping: saved backup bundle to $TESTTMP/prune-inline/.hg/strip-backup/cf2c22470d67-fce4fc64-backup.hg
577 ### Backup markers ###
577 ### Backup markers ###
578 84fcb0dfe17b256ebae52e05572993b9194c018a 0 {ea207398892eb49e06441f10dda2a731f0450f20} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
578 84fcb0dfe17b256ebae52e05572993b9194c018a 0 {ea207398892eb49e06441f10dda2a731f0450f20} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
579 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
579 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
580 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
580 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
581 ### diff <relevant> <backed-up> ###
581 ### diff <relevant> <backed-up> ###
582 #################################
582 #################################
583 ### Stripped markers ###
583 ### Stripped markers ###
584 84fcb0dfe17b256ebae52e05572993b9194c018a 0 {ea207398892eb49e06441f10dda2a731f0450f20} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
584 84fcb0dfe17b256ebae52e05572993b9194c018a 0 {ea207398892eb49e06441f10dda2a731f0450f20} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
585 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
585 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
586 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
586 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
587 ### diff <exclusive> <stripped> ###
587 ### diff <exclusive> <stripped> ###
588 #################################
588 #################################
589 # unbundling: adding changesets
589 # unbundling: adding changesets
590 # unbundling: adding manifests
590 # unbundling: adding manifests
591 # unbundling: adding file changes
591 # unbundling: adding file changes
592 # unbundling: added 2 changesets with 2 changes to 2 files (+1 heads)
592 # unbundling: added 2 changesets with 2 changes to 2 files (+1 heads)
593 # unbundling: 3 new obsolescence markers
593 # unbundling: 3 new obsolescence markers
594 # unbundling: new changesets cf2c22470d67 (1 drafts)
594 # unbundling: new changesets cf2c22470d67 (1 drafts)
595 # unbundling: (1 other changesets obsolete on arrival)
595 # unbundling: (1 other changesets obsolete on arrival)
596 # unbundling: (run 'hg heads' to see heads)
596 # unbundling: (run 'hg heads' to see heads)
597
597
598 chain with missing prune
598 chain with missing prune
599 ========================
599 ========================
600
600
601 . βŠ— B
601 . βŠ— B
602 . |
602 . |
603 . β‡ β—Œβ‡ β—” A1
603 . β‡ β—Œβ‡ β—” A1
604 . |
604 . |
605 . ●
605 . ●
606
606
607 setup
607 setup
608 -----
608 -----
609
609
610 $ mktestrepo missing-prune
610 $ mktestrepo missing-prune
611 $ mkcommit 'C-A0'
611 $ mkcommit 'C-A0'
612 $ mkcommit 'C-B0'
612 $ mkcommit 'C-B0'
613 $ hg up 'desc("ROOT")'
613 $ hg up 'desc("ROOT")'
614 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
614 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
615 $ mkcommit 'C-A1'
615 $ mkcommit 'C-A1'
616 created new head
616 created new head
617 $ hg debugobsolete a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 `getid 'desc("C-A0")'`
617 $ hg debugobsolete a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 `getid 'desc("C-A0")'`
618 1 new obsolescence markers
618 1 new obsolescence markers
619 $ hg debugobsolete `getid 'desc("C-A0")'` `getid 'desc("C-A1")'`
619 $ hg debugobsolete `getid 'desc("C-A0")'` `getid 'desc("C-A1")'`
620 1 new obsolescence markers
620 1 new obsolescence markers
621 obsoleted 1 changesets
621 obsoleted 1 changesets
622 1 new orphan changesets
622 1 new orphan changesets
623 $ hg debugobsolete --record-parents `getid 'desc("C-B0")'`
623 $ hg debugobsolete --record-parents `getid 'desc("C-B0")'`
624 1 new obsolescence markers
624 1 new obsolescence markers
625 obsoleted 1 changesets
625 obsoleted 1 changesets
626
626
627 (it is annoying to create prune with parent data without the changeset, so we strip it after the fact)
627 (it is annoying to create prune with parent data without the changeset, so we strip it after the fact)
628
628
629 $ hg strip --hidden --rev 'desc("C-A0")::' --no-backup --config devel.strip-obsmarkers=no
629 $ hg strip --hidden --rev 'desc("C-A0")::' --no-backup --config devel.strip-obsmarkers=no
630
630
631 $ hg up 'desc("ROOT")'
631 $ hg up 'desc("ROOT")'
632 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
632 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
633 $ hg log --hidden -G
633 $ hg log --hidden -G
634 o cf2c22470d67: C-A1
634 o cf2c22470d67: C-A1
635 |
635 |
636 @ ea207398892e: ROOT
636 @ ea207398892e: ROOT
637
637
638 $ hg debugobsolete
638 $ hg debugobsolete
639 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
639 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
640 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
640 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
641 29f93b1df87baee1824e014080d8adf145f81783 0 {84fcb0dfe17b256ebae52e05572993b9194c018a} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
641 29f93b1df87baee1824e014080d8adf145f81783 0 {84fcb0dfe17b256ebae52e05572993b9194c018a} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
642
642
643 Actual testing
643 Actual testing
644 --------------
644 --------------
645
645
646 $ testrevs 'desc("C-A1")'
646 $ testrevs 'desc("C-A1")'
647 ### Matched revisions###
647 ### Matched revisions###
648 cf2c22470d67: C-A1
648 cf2c22470d67: C-A1
649 ### Relevant markers ###
649 ### Relevant markers ###
650 29f93b1df87baee1824e014080d8adf145f81783 0 {84fcb0dfe17b256ebae52e05572993b9194c018a} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
650 29f93b1df87baee1824e014080d8adf145f81783 0 {84fcb0dfe17b256ebae52e05572993b9194c018a} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
651 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
651 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
652 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
652 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
653 # bundling: 1 changesets found
653 # bundling: 1 changesets found
654 ### Bundled markers ###
654 ### Bundled markers ###
655 29f93b1df87baee1824e014080d8adf145f81783 0 {84fcb0dfe17b256ebae52e05572993b9194c018a} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
655 29f93b1df87baee1824e014080d8adf145f81783 0 {84fcb0dfe17b256ebae52e05572993b9194c018a} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
656 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
656 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
657 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
657 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
658 ### diff <relevant> <bundled> ###
658 ### diff <relevant> <bundled> ###
659 #################################
659 #################################
660 ### Exclusive markers ###
660 ### Exclusive markers ###
661 29f93b1df87baee1824e014080d8adf145f81783 0 {84fcb0dfe17b256ebae52e05572993b9194c018a} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
661 29f93b1df87baee1824e014080d8adf145f81783 0 {84fcb0dfe17b256ebae52e05572993b9194c018a} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
662 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
662 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
663 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
663 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
664 # stripping: saved backup bundle to $TESTTMP/missing-prune/.hg/strip-backup/cf2c22470d67-fa0f07b0-backup.hg
664 # stripping: saved backup bundle to $TESTTMP/missing-prune/.hg/strip-backup/cf2c22470d67-fa0f07b0-backup.hg
665 ### Backup markers ###
665 ### Backup markers ###
666 29f93b1df87baee1824e014080d8adf145f81783 0 {84fcb0dfe17b256ebae52e05572993b9194c018a} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
666 29f93b1df87baee1824e014080d8adf145f81783 0 {84fcb0dfe17b256ebae52e05572993b9194c018a} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
667 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
667 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
668 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
668 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
669 ### diff <relevant> <backed-up> ###
669 ### diff <relevant> <backed-up> ###
670 #################################
670 #################################
671 ### Stripped markers ###
671 ### Stripped markers ###
672 29f93b1df87baee1824e014080d8adf145f81783 0 {84fcb0dfe17b256ebae52e05572993b9194c018a} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
672 29f93b1df87baee1824e014080d8adf145f81783 0 {84fcb0dfe17b256ebae52e05572993b9194c018a} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
673 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
673 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
674 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
674 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
675 ### diff <exclusive> <stripped> ###
675 ### diff <exclusive> <stripped> ###
676 #################################
676 #################################
677 # unbundling: adding changesets
677 # unbundling: adding changesets
678 # unbundling: adding manifests
678 # unbundling: adding manifests
679 # unbundling: adding file changes
679 # unbundling: adding file changes
680 # unbundling: added 1 changesets with 1 changes to 1 files
680 # unbundling: added 1 changesets with 1 changes to 1 files
681 # unbundling: 3 new obsolescence markers
681 # unbundling: 3 new obsolescence markers
682 # unbundling: new changesets cf2c22470d67 (1 drafts)
682 # unbundling: new changesets cf2c22470d67 (1 drafts)
683 # unbundling: (run 'hg update' to get a working copy)
683 # unbundling: (run 'hg update' to get a working copy)
684
684
685 chain with precursors also pruned
685 chain with precursors also pruned
686 =================================
686 =================================
687
687
688 . A0 (also pruned)
688 . A0 (also pruned)
689 . β‡ β—Œβ‡ β—” A1
689 . β‡ β—Œβ‡ β—” A1
690 . |
690 . |
691 . ●
691 . ●
692
692
693 setup
693 setup
694 -----
694 -----
695
695
696 $ mktestrepo prune-inline-missing
696 $ mktestrepo prune-inline-missing
697 $ mkcommit 'C-A0'
697 $ mkcommit 'C-A0'
698 $ hg up 'desc("ROOT")'
698 $ hg up 'desc("ROOT")'
699 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
699 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
700 $ mkcommit 'C-A1'
700 $ mkcommit 'C-A1'
701 created new head
701 created new head
702 $ hg debugobsolete a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 `getid 'desc("C-A0")'`
702 $ hg debugobsolete a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 `getid 'desc("C-A0")'`
703 1 new obsolescence markers
703 1 new obsolescence markers
704 $ hg debugobsolete --record-parents `getid 'desc("C-A0")'`
704 $ hg debugobsolete --record-parents `getid 'desc("C-A0")'`
705 1 new obsolescence markers
705 1 new obsolescence markers
706 obsoleted 1 changesets
706 obsoleted 1 changesets
707 $ hg debugobsolete `getid 'desc("C-A0")'` `getid 'desc("C-A1")'`
707 $ hg debugobsolete `getid 'desc("C-A0")'` `getid 'desc("C-A1")'`
708 1 new obsolescence markers
708 1 new obsolescence markers
709
709
710 (it is annoying to create prune with parent data without the changeset, so we strip it after the fact)
710 (it is annoying to create prune with parent data without the changeset, so we strip it after the fact)
711
711
712 $ hg strip --hidden --rev 'desc("C-A0")::' --no-backup --config devel.strip-obsmarkers=no
712 $ hg strip --hidden --rev 'desc("C-A0")::' --no-backup --config devel.strip-obsmarkers=no
713
713
714 $ hg up 'desc("ROOT")'
714 $ hg up 'desc("ROOT")'
715 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
715 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
716 $ hg log --hidden -G
716 $ hg log --hidden -G
717 o cf2c22470d67: C-A1
717 o cf2c22470d67: C-A1
718 |
718 |
719 @ ea207398892e: ROOT
719 @ ea207398892e: ROOT
720
720
721 $ hg debugobsolete
721 $ hg debugobsolete
722 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
722 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
723 84fcb0dfe17b256ebae52e05572993b9194c018a 0 {ea207398892eb49e06441f10dda2a731f0450f20} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
723 84fcb0dfe17b256ebae52e05572993b9194c018a 0 {ea207398892eb49e06441f10dda2a731f0450f20} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
724 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
724 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
725
725
726 Actual testing
726 Actual testing
727 --------------
727 --------------
728
728
729 $ testrevs 'desc("C-A1")'
729 $ testrevs 'desc("C-A1")'
730 ### Matched revisions###
730 ### Matched revisions###
731 cf2c22470d67: C-A1
731 cf2c22470d67: C-A1
732 ### Relevant markers ###
732 ### Relevant markers ###
733 84fcb0dfe17b256ebae52e05572993b9194c018a 0 {ea207398892eb49e06441f10dda2a731f0450f20} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
733 84fcb0dfe17b256ebae52e05572993b9194c018a 0 {ea207398892eb49e06441f10dda2a731f0450f20} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
734 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
734 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
735 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
735 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
736 # bundling: 1 changesets found
736 # bundling: 1 changesets found
737 ### Bundled markers ###
737 ### Bundled markers ###
738 84fcb0dfe17b256ebae52e05572993b9194c018a 0 {ea207398892eb49e06441f10dda2a731f0450f20} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
738 84fcb0dfe17b256ebae52e05572993b9194c018a 0 {ea207398892eb49e06441f10dda2a731f0450f20} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
739 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
739 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
740 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
740 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
741 ### diff <relevant> <bundled> ###
741 ### diff <relevant> <bundled> ###
742 #################################
742 #################################
743 ### Exclusive markers ###
743 ### Exclusive markers ###
744 84fcb0dfe17b256ebae52e05572993b9194c018a 0 {ea207398892eb49e06441f10dda2a731f0450f20} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
744 84fcb0dfe17b256ebae52e05572993b9194c018a 0 {ea207398892eb49e06441f10dda2a731f0450f20} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
745 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
745 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
746 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
746 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
747 # stripping: saved backup bundle to $TESTTMP/prune-inline-missing/.hg/strip-backup/cf2c22470d67-fa0f07b0-backup.hg
747 # stripping: saved backup bundle to $TESTTMP/prune-inline-missing/.hg/strip-backup/cf2c22470d67-fa0f07b0-backup.hg
748 ### Backup markers ###
748 ### Backup markers ###
749 84fcb0dfe17b256ebae52e05572993b9194c018a 0 {ea207398892eb49e06441f10dda2a731f0450f20} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
749 84fcb0dfe17b256ebae52e05572993b9194c018a 0 {ea207398892eb49e06441f10dda2a731f0450f20} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
750 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
750 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
751 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
751 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
752 ### diff <relevant> <backed-up> ###
752 ### diff <relevant> <backed-up> ###
753 #################################
753 #################################
754 ### Stripped markers ###
754 ### Stripped markers ###
755 84fcb0dfe17b256ebae52e05572993b9194c018a 0 {ea207398892eb49e06441f10dda2a731f0450f20} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
755 84fcb0dfe17b256ebae52e05572993b9194c018a 0 {ea207398892eb49e06441f10dda2a731f0450f20} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
756 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
756 84fcb0dfe17b256ebae52e05572993b9194c018a cf2c22470d67233004e934a31184ac2b35389914 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
757 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
757 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 84fcb0dfe17b256ebae52e05572993b9194c018a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
758 ### diff <exclusive> <stripped> ###
758 ### diff <exclusive> <stripped> ###
759 #################################
759 #################################
760 # unbundling: adding changesets
760 # unbundling: adding changesets
761 # unbundling: adding manifests
761 # unbundling: adding manifests
762 # unbundling: adding file changes
762 # unbundling: adding file changes
763 # unbundling: added 1 changesets with 1 changes to 1 files
763 # unbundling: added 1 changesets with 1 changes to 1 files
764 # unbundling: 3 new obsolescence markers
764 # unbundling: 3 new obsolescence markers
765 # unbundling: new changesets cf2c22470d67 (1 drafts)
765 # unbundling: new changesets cf2c22470d67 (1 drafts)
766 # unbundling: (run 'hg update' to get a working copy)
766 # unbundling: (run 'hg update' to get a working copy)
767
767
768 Chain with fold and split
768 Chain with fold and split
769 =========================
769 =========================
770
770
771 setup
771 setup
772 -----
772 -----
773
773
774 $ mktestrepo split-fold
774 $ mktestrepo split-fold
775 $ mkcommit 'C-A'
775 $ mkcommit 'C-A'
776 $ hg up 'desc("ROOT")'
776 $ hg up 'desc("ROOT")'
777 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
777 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
778 $ mkcommit 'C-B'
778 $ mkcommit 'C-B'
779 created new head
779 created new head
780 $ hg up 'desc("ROOT")'
780 $ hg up 'desc("ROOT")'
781 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
781 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
782 $ mkcommit 'C-C'
782 $ mkcommit 'C-C'
783 created new head
783 created new head
784 $ hg up 'desc("ROOT")'
784 $ hg up 'desc("ROOT")'
785 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
785 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
786 $ mkcommit 'C-D'
786 $ mkcommit 'C-D'
787 created new head
787 created new head
788 $ hg up 'desc("ROOT")'
788 $ hg up 'desc("ROOT")'
789 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
789 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
790 $ mkcommit 'C-E'
790 $ mkcommit 'C-E'
791 created new head
791 created new head
792 $ hg debugobsolete a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 `getid 'desc("C-A")'`
792 $ hg debugobsolete a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 `getid 'desc("C-A")'`
793 1 new obsolescence markers
793 1 new obsolescence markers
794 $ hg debugobsolete `getid 'desc("C-A")'` `getid 'desc("C-B")'` `getid 'desc("C-C")'` # record split
794 $ hg debugobsolete `getid 'desc("C-A")'` `getid 'desc("C-B")'` `getid 'desc("C-C")'` # record split
795 1 new obsolescence markers
795 1 new obsolescence markers
796 obsoleted 1 changesets
796 obsoleted 1 changesets
797 $ hg debugobsolete `getid 'desc("C-A")'` `getid 'desc("C-D")'` # other divergent
797 $ hg debugobsolete `getid 'desc("C-A")'` `getid 'desc("C-D")'` # other divergent
798 1 new obsolescence markers
798 1 new obsolescence markers
799 3 new content-divergent changesets
799 3 new content-divergent changesets
800 $ hg debugobsolete `getid 'desc("C-A")'` b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0
800 $ hg debugobsolete `getid 'desc("C-A")'` b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0
801 1 new obsolescence markers
801 1 new obsolescence markers
802 $ hg debugobsolete b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 `getid 'desc("C-E")'`
802 $ hg debugobsolete b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 `getid 'desc("C-E")'`
803 1 new obsolescence markers
803 1 new obsolescence markers
804 1 new content-divergent changesets
804 1 new content-divergent changesets
805 $ hg debugobsolete `getid 'desc("C-B")'` `getid 'desc("C-E")'`
805 $ hg debugobsolete `getid 'desc("C-B")'` `getid 'desc("C-E")'`
806 1 new obsolescence markers
806 1 new obsolescence markers
807 obsoleted 1 changesets
807 obsoleted 1 changesets
808 $ hg debugobsolete `getid 'desc("C-C")'` `getid 'desc("C-E")'`
808 $ hg debugobsolete `getid 'desc("C-C")'` `getid 'desc("C-E")'`
809 1 new obsolescence markers
809 1 new obsolescence markers
810 obsoleted 1 changesets
810 obsoleted 1 changesets
811 $ hg debugobsolete `getid 'desc("C-D")'` `getid 'desc("C-E")'`
811 $ hg debugobsolete `getid 'desc("C-D")'` `getid 'desc("C-E")'`
812 1 new obsolescence markers
812 1 new obsolescence markers
813 obsoleted 1 changesets
813 obsoleted 1 changesets
814 $ hg debugobsolete c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 `getid 'desc("C-E")'`
814 $ hg debugobsolete c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 `getid 'desc("C-E")'`
815 1 new obsolescence markers
815 1 new obsolescence markers
816
816
817 $ hg up 'desc("ROOT")'
817 $ hg up 'desc("ROOT")'
818 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
818 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
819 $ hg log --hidden -G
819 $ hg log --hidden -G
820 o 2f20ff6509f0: C-E
820 o 2f20ff6509f0: C-E
821 |
821 |
822 | x 06dc9da25ef0: C-D
822 | x 06dc9da25ef0: C-D
823 |/
823 |/
824 | x 27ec657ca21d: C-C
824 | x 27ec657ca21d: C-C
825 |/
825 |/
826 | x a9b9da38ed96: C-B
826 | x a9b9da38ed96: C-B
827 |/
827 |/
828 | x 9ac430e15fca: C-A
828 | x 9ac430e15fca: C-A
829 |/
829 |/
830 @ ea207398892e: ROOT
830 @ ea207398892e: ROOT
831
831
832 $ hg debugobsolete
832 $ hg debugobsolete
833 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
833 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
834 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
834 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
835 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
835 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
836 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
836 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
837 b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
837 b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
838 a9b9da38ed96f8c6c14f429441f625a344eb4696 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
838 a9b9da38ed96f8c6c14f429441f625a344eb4696 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
839 27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
839 27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
840 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
840 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
841 c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
841 c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
842
842
843 Actual testing
843 Actual testing
844 --------------
844 --------------
845
845
846 $ testrevs 'desc("C-A")'
846 $ testrevs 'desc("C-A")'
847 ### Matched revisions###
847 ### Matched revisions###
848 9ac430e15fca: C-A
848 9ac430e15fca: C-A
849 ### Relevant markers ###
849 ### Relevant markers ###
850 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
850 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
851 # bundling: 1 changesets found
851 # bundling: 1 changesets found
852 ### Bundled markers ###
852 ### Bundled markers ###
853 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
853 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
854 ### diff <relevant> <bundled> ###
854 ### diff <relevant> <bundled> ###
855 #################################
855 #################################
856 ### Exclusive markers ###
856 ### Exclusive markers ###
857 # stripping: saved backup bundle to $TESTTMP/split-fold/.hg/strip-backup/9ac430e15fca-81204eba-backup.hg
857 # stripping: saved backup bundle to $TESTTMP/split-fold/.hg/strip-backup/9ac430e15fca-81204eba-backup.hg
858 ### Backup markers ###
858 ### Backup markers ###
859 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
859 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
860 ### diff <relevant> <backed-up> ###
860 ### diff <relevant> <backed-up> ###
861 #################################
861 #################################
862 ### Stripped markers ###
862 ### Stripped markers ###
863 ### diff <exclusive> <stripped> ###
863 ### diff <exclusive> <stripped> ###
864 #################################
864 #################################
865 # unbundling: adding changesets
865 # unbundling: adding changesets
866 # unbundling: adding manifests
866 # unbundling: adding manifests
867 # unbundling: adding file changes
867 # unbundling: adding file changes
868 # unbundling: added 1 changesets with 1 changes to 1 files (+1 heads)
868 # unbundling: added 1 changesets with 1 changes to 1 files (+1 heads)
869 # unbundling: (1 other changesets obsolete on arrival)
869 # unbundling: (1 other changesets obsolete on arrival)
870 # unbundling: (run 'hg heads' to see heads)
870 # unbundling: (run 'hg heads' to see heads)
871
871
872 $ testrevs 'desc("C-B")'
872 $ testrevs 'desc("C-B")'
873 ### Matched revisions###
873 ### Matched revisions###
874 a9b9da38ed96: C-B
874 a9b9da38ed96: C-B
875 ### Relevant markers ###
875 ### Relevant markers ###
876 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
876 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
877 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
877 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
878 # bundling: 1 changesets found
878 # bundling: 1 changesets found
879 ### Bundled markers ###
879 ### Bundled markers ###
880 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
880 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
881 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
881 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
882 ### diff <relevant> <bundled> ###
882 ### diff <relevant> <bundled> ###
883 #################################
883 #################################
884 ### Exclusive markers ###
884 ### Exclusive markers ###
885 # stripping: saved backup bundle to $TESTTMP/split-fold/.hg/strip-backup/a9b9da38ed96-7465d6e9-backup.hg
885 # stripping: saved backup bundle to $TESTTMP/split-fold/.hg/strip-backup/a9b9da38ed96-7465d6e9-backup.hg
886 ### Backup markers ###
886 ### Backup markers ###
887 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
887 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
888 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
888 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
889 ### diff <relevant> <backed-up> ###
889 ### diff <relevant> <backed-up> ###
890 #################################
890 #################################
891 ### Stripped markers ###
891 ### Stripped markers ###
892 ### diff <exclusive> <stripped> ###
892 ### diff <exclusive> <stripped> ###
893 #################################
893 #################################
894 # unbundling: adding changesets
894 # unbundling: adding changesets
895 # unbundling: adding manifests
895 # unbundling: adding manifests
896 # unbundling: adding file changes
896 # unbundling: adding file changes
897 # unbundling: added 1 changesets with 1 changes to 1 files (+1 heads)
897 # unbundling: added 1 changesets with 1 changes to 1 files (+1 heads)
898 # unbundling: (1 other changesets obsolete on arrival)
898 # unbundling: (1 other changesets obsolete on arrival)
899 # unbundling: (run 'hg heads' to see heads)
899 # unbundling: (run 'hg heads' to see heads)
900
900
901 $ testrevs 'desc("C-C")'
901 $ testrevs 'desc("C-C")'
902 ### Matched revisions###
902 ### Matched revisions###
903 27ec657ca21d: C-C
903 27ec657ca21d: C-C
904 ### Relevant markers ###
904 ### Relevant markers ###
905 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
905 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
906 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
906 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
907 # bundling: 1 changesets found
907 # bundling: 1 changesets found
908 ### Bundled markers ###
908 ### Bundled markers ###
909 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
909 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
910 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
910 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
911 ### diff <relevant> <bundled> ###
911 ### diff <relevant> <bundled> ###
912 #################################
912 #################################
913 ### Exclusive markers ###
913 ### Exclusive markers ###
914 # stripping: saved backup bundle to $TESTTMP/split-fold/.hg/strip-backup/27ec657ca21d-d5dd1c7c-backup.hg
914 # stripping: saved backup bundle to $TESTTMP/split-fold/.hg/strip-backup/27ec657ca21d-d5dd1c7c-backup.hg
915 ### Backup markers ###
915 ### Backup markers ###
916 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
916 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
917 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
917 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
918 ### diff <relevant> <backed-up> ###
918 ### diff <relevant> <backed-up> ###
919 #################################
919 #################################
920 ### Stripped markers ###
920 ### Stripped markers ###
921 ### diff <exclusive> <stripped> ###
921 ### diff <exclusive> <stripped> ###
922 #################################
922 #################################
923 # unbundling: adding changesets
923 # unbundling: adding changesets
924 # unbundling: adding manifests
924 # unbundling: adding manifests
925 # unbundling: adding file changes
925 # unbundling: adding file changes
926 # unbundling: added 1 changesets with 1 changes to 1 files (+1 heads)
926 # unbundling: added 1 changesets with 1 changes to 1 files (+1 heads)
927 # unbundling: (1 other changesets obsolete on arrival)
927 # unbundling: (1 other changesets obsolete on arrival)
928 # unbundling: (run 'hg heads' to see heads)
928 # unbundling: (run 'hg heads' to see heads)
929
929
930 $ testrevs 'desc("C-D")'
930 $ testrevs 'desc("C-D")'
931 ### Matched revisions###
931 ### Matched revisions###
932 06dc9da25ef0: C-D
932 06dc9da25ef0: C-D
933 ### Relevant markers ###
933 ### Relevant markers ###
934 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
934 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
935 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
935 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
936 # bundling: 1 changesets found
936 # bundling: 1 changesets found
937 ### Bundled markers ###
937 ### Bundled markers ###
938 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
938 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
939 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
939 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
940 ### diff <relevant> <bundled> ###
940 ### diff <relevant> <bundled> ###
941 #################################
941 #################################
942 ### Exclusive markers ###
942 ### Exclusive markers ###
943 # stripping: saved backup bundle to $TESTTMP/split-fold/.hg/strip-backup/06dc9da25ef0-9b1c0a91-backup.hg
943 # stripping: saved backup bundle to $TESTTMP/split-fold/.hg/strip-backup/06dc9da25ef0-9b1c0a91-backup.hg
944 ### Backup markers ###
944 ### Backup markers ###
945 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
945 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
946 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
946 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
947 ### diff <relevant> <backed-up> ###
947 ### diff <relevant> <backed-up> ###
948 #################################
948 #################################
949 ### Stripped markers ###
949 ### Stripped markers ###
950 ### diff <exclusive> <stripped> ###
950 ### diff <exclusive> <stripped> ###
951 #################################
951 #################################
952 # unbundling: adding changesets
952 # unbundling: adding changesets
953 # unbundling: adding manifests
953 # unbundling: adding manifests
954 # unbundling: adding file changes
954 # unbundling: adding file changes
955 # unbundling: added 1 changesets with 1 changes to 1 files (+1 heads)
955 # unbundling: added 1 changesets with 1 changes to 1 files (+1 heads)
956 # unbundling: (1 other changesets obsolete on arrival)
956 # unbundling: (1 other changesets obsolete on arrival)
957 # unbundling: (run 'hg heads' to see heads)
957 # unbundling: (run 'hg heads' to see heads)
958
958
959 $ testrevs 'desc("C-E")'
959 $ testrevs 'desc("C-E")'
960 ### Matched revisions###
960 ### Matched revisions###
961 2f20ff6509f0: C-E
961 2f20ff6509f0: C-E
962 ### Relevant markers ###
962 ### Relevant markers ###
963 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
963 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
964 27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
964 27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
965 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
965 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
966 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
966 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
967 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
967 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
968 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
968 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
969 a9b9da38ed96f8c6c14f429441f625a344eb4696 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
969 a9b9da38ed96f8c6c14f429441f625a344eb4696 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
970 b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
970 b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
971 c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
971 c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
972 # bundling: 1 changesets found
972 # bundling: 1 changesets found
973 ### Bundled markers ###
973 ### Bundled markers ###
974 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
974 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
975 27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
975 27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
976 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
976 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
977 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
977 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
978 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
978 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
979 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
979 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
980 a9b9da38ed96f8c6c14f429441f625a344eb4696 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
980 a9b9da38ed96f8c6c14f429441f625a344eb4696 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
981 b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
981 b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
982 c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
982 c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
983 ### diff <relevant> <bundled> ###
983 ### diff <relevant> <bundled> ###
984 #################################
984 #################################
985 ### Exclusive markers ###
985 ### Exclusive markers ###
986 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
986 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
987 27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
987 27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
988 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
988 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
989 a9b9da38ed96f8c6c14f429441f625a344eb4696 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
989 a9b9da38ed96f8c6c14f429441f625a344eb4696 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
990 b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
990 b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
991 c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
991 c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
992 # stripping: saved backup bundle to $TESTTMP/split-fold/.hg/strip-backup/2f20ff6509f0-8adeb22d-backup.hg
992 # stripping: saved backup bundle to $TESTTMP/split-fold/.hg/strip-backup/2f20ff6509f0-8adeb22d-backup.hg
993 3 new content-divergent changesets
993 3 new content-divergent changesets
994 ### Backup markers ###
994 ### Backup markers ###
995 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
995 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
996 27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
996 27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
997 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
997 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
998 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
998 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
999 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
999 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1000 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1000 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1001 a9b9da38ed96f8c6c14f429441f625a344eb4696 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1001 a9b9da38ed96f8c6c14f429441f625a344eb4696 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1002 b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1002 b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1003 c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1003 c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1004 ### diff <relevant> <backed-up> ###
1004 ### diff <relevant> <backed-up> ###
1005 #################################
1005 #################################
1006 ### Stripped markers ###
1006 ### Stripped markers ###
1007 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1007 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1008 27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1008 27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1009 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1009 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1010 a9b9da38ed96f8c6c14f429441f625a344eb4696 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1010 a9b9da38ed96f8c6c14f429441f625a344eb4696 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1011 b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1011 b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1012 c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1012 c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1013 ### diff <exclusive> <stripped> ###
1013 ### diff <exclusive> <stripped> ###
1014 #################################
1014 #################################
1015 # unbundling: adding changesets
1015 # unbundling: adding changesets
1016 # unbundling: adding manifests
1016 # unbundling: adding manifests
1017 # unbundling: adding file changes
1017 # unbundling: adding file changes
1018 # unbundling: added 1 changesets with 1 changes to 1 files (+1 heads)
1018 # unbundling: added 1 changesets with 1 changes to 1 files (+1 heads)
1019 # unbundling: 6 new obsolescence markers
1019 # unbundling: 6 new obsolescence markers
1020 # unbundling: obsoleted 3 changesets
1020 # unbundling: obsoleted 3 changesets
1021 # unbundling: new changesets 2f20ff6509f0 (1 drafts)
1021 # unbundling: new changesets 2f20ff6509f0 (1 drafts)
1022 # unbundling: (run 'hg heads' to see heads)
1022 # unbundling: (run 'hg heads' to see heads)
1023
1023
1024 Bundle multiple revisions
1024 Bundle multiple revisions
1025
1025
1026 * each part of the split
1026 * each part of the split
1027
1027
1028 $ testrevs 'desc("C-B") + desc("C-C")'
1028 $ testrevs 'desc("C-B") + desc("C-C")'
1029 ### Matched revisions###
1029 ### Matched revisions###
1030 27ec657ca21d: C-C
1030 27ec657ca21d: C-C
1031 a9b9da38ed96: C-B
1031 a9b9da38ed96: C-B
1032 ### Relevant markers ###
1032 ### Relevant markers ###
1033 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1033 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1034 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1034 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1035 # bundling: 2 changesets found
1035 # bundling: 2 changesets found
1036 ### Bundled markers ###
1036 ### Bundled markers ###
1037 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1037 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1038 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1038 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1039 ### diff <relevant> <bundled> ###
1039 ### diff <relevant> <bundled> ###
1040 #################################
1040 #################################
1041 ### Exclusive markers ###
1041 ### Exclusive markers ###
1042 # stripping: saved backup bundle to $TESTTMP/split-fold/.hg/strip-backup/a9b9da38ed96-0daf625a-backup.hg
1042 # stripping: saved backup bundle to $TESTTMP/split-fold/.hg/strip-backup/a9b9da38ed96-0daf625a-backup.hg
1043 ### Backup markers ###
1043 ### Backup markers ###
1044 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1044 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1045 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1045 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1046 ### diff <relevant> <backed-up> ###
1046 ### diff <relevant> <backed-up> ###
1047 #################################
1047 #################################
1048 ### Stripped markers ###
1048 ### Stripped markers ###
1049 ### diff <exclusive> <stripped> ###
1049 ### diff <exclusive> <stripped> ###
1050 #################################
1050 #################################
1051 # unbundling: adding changesets
1051 # unbundling: adding changesets
1052 # unbundling: adding manifests
1052 # unbundling: adding manifests
1053 # unbundling: adding file changes
1053 # unbundling: adding file changes
1054 # unbundling: added 2 changesets with 2 changes to 2 files (+2 heads)
1054 # unbundling: added 2 changesets with 2 changes to 2 files (+2 heads)
1055 # unbundling: (2 other changesets obsolete on arrival)
1055 # unbundling: (2 other changesets obsolete on arrival)
1056 # unbundling: (run 'hg heads' to see heads)
1056 # unbundling: (run 'hg heads' to see heads)
1057
1057
1058 * top one and other divergent
1058 * top one and other divergent
1059
1059
1060 $ testrevs 'desc("C-E") + desc("C-D")'
1060 $ testrevs 'desc("C-E") + desc("C-D")'
1061 ### Matched revisions###
1061 ### Matched revisions###
1062 06dc9da25ef0: C-D
1062 06dc9da25ef0: C-D
1063 2f20ff6509f0: C-E
1063 2f20ff6509f0: C-E
1064 ### Relevant markers ###
1064 ### Relevant markers ###
1065 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1065 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1066 27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1066 27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1067 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1067 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1068 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1068 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1069 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1069 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1070 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1070 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1071 a9b9da38ed96f8c6c14f429441f625a344eb4696 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1071 a9b9da38ed96f8c6c14f429441f625a344eb4696 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1072 b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1072 b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1073 c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1073 c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1074 # bundling: 2 changesets found
1074 # bundling: 2 changesets found
1075 ### Bundled markers ###
1075 ### Bundled markers ###
1076 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1076 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1077 27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1077 27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1078 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1078 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1079 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1079 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1080 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1080 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1081 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1081 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1082 a9b9da38ed96f8c6c14f429441f625a344eb4696 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1082 a9b9da38ed96f8c6c14f429441f625a344eb4696 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1083 b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1083 b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1084 c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1084 c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1085 ### diff <relevant> <bundled> ###
1085 ### diff <relevant> <bundled> ###
1086 #################################
1086 #################################
1087 ### Exclusive markers ###
1087 ### Exclusive markers ###
1088 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1088 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1089 27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1089 27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1090 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1090 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1091 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1091 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1092 a9b9da38ed96f8c6c14f429441f625a344eb4696 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1092 a9b9da38ed96f8c6c14f429441f625a344eb4696 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1093 b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1093 b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1094 c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1094 c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1095 # stripping: saved backup bundle to $TESTTMP/split-fold/.hg/strip-backup/2f20ff6509f0-bf1b80f4-backup.hg
1095 # stripping: saved backup bundle to $TESTTMP/split-fold/.hg/strip-backup/2f20ff6509f0-bf1b80f4-backup.hg
1096 ### Backup markers ###
1096 ### Backup markers ###
1097 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1097 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1098 27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1098 27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1099 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1099 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1100 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1100 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1101 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1101 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1102 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1102 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1103 a9b9da38ed96f8c6c14f429441f625a344eb4696 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1103 a9b9da38ed96f8c6c14f429441f625a344eb4696 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1104 b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1104 b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1105 c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1105 c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1106 ### diff <relevant> <backed-up> ###
1106 ### diff <relevant> <backed-up> ###
1107 #################################
1107 #################################
1108 ### Stripped markers ###
1108 ### Stripped markers ###
1109 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1109 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1110 27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1110 27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1111 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1111 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1112 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1112 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1113 a9b9da38ed96f8c6c14f429441f625a344eb4696 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1113 a9b9da38ed96f8c6c14f429441f625a344eb4696 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1114 b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1114 b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1115 c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1115 c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1116 ### diff <exclusive> <stripped> ###
1116 ### diff <exclusive> <stripped> ###
1117 #################################
1117 #################################
1118 # unbundling: adding changesets
1118 # unbundling: adding changesets
1119 # unbundling: adding manifests
1119 # unbundling: adding manifests
1120 # unbundling: adding file changes
1120 # unbundling: adding file changes
1121 # unbundling: added 2 changesets with 2 changes to 2 files (+2 heads)
1121 # unbundling: added 2 changesets with 2 changes to 2 files (+2 heads)
1122 # unbundling: 7 new obsolescence markers
1122 # unbundling: 7 new obsolescence markers
1123 # unbundling: obsoleted 2 changesets
1123 # unbundling: obsoleted 2 changesets
1124 # unbundling: new changesets 2f20ff6509f0 (1 drafts)
1124 # unbundling: new changesets 2f20ff6509f0 (1 drafts)
1125 # unbundling: (1 other changesets obsolete on arrival)
1125 # unbundling: (1 other changesets obsolete on arrival)
1126 # unbundling: (run 'hg heads' to see heads)
1126 # unbundling: (run 'hg heads' to see heads)
1127
1127
1128 * top one and initial precursors
1128 * top one and initial precursors
1129
1129
1130 $ testrevs 'desc("C-E") + desc("C-A")'
1130 $ testrevs 'desc("C-E") + desc("C-A")'
1131 ### Matched revisions###
1131 ### Matched revisions###
1132 2f20ff6509f0: C-E
1132 2f20ff6509f0: C-E
1133 9ac430e15fca: C-A
1133 9ac430e15fca: C-A
1134 ### Relevant markers ###
1134 ### Relevant markers ###
1135 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1135 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1136 27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1136 27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1137 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1137 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1138 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1138 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1139 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1139 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1140 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1140 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1141 a9b9da38ed96f8c6c14f429441f625a344eb4696 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1141 a9b9da38ed96f8c6c14f429441f625a344eb4696 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1142 b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1142 b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1143 c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1143 c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1144 # bundling: 2 changesets found
1144 # bundling: 2 changesets found
1145 ### Bundled markers ###
1145 ### Bundled markers ###
1146 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1146 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1147 27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1147 27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1148 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1148 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1149 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1149 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1150 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1150 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1151 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1151 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1152 a9b9da38ed96f8c6c14f429441f625a344eb4696 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1152 a9b9da38ed96f8c6c14f429441f625a344eb4696 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1153 b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1153 b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1154 c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1154 c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1155 ### diff <relevant> <bundled> ###
1155 ### diff <relevant> <bundled> ###
1156 #################################
1156 #################################
1157 ### Exclusive markers ###
1157 ### Exclusive markers ###
1158 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1158 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1159 27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1159 27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1160 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1160 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1161 a9b9da38ed96f8c6c14f429441f625a344eb4696 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1161 a9b9da38ed96f8c6c14f429441f625a344eb4696 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1162 b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1162 b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1163 c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1163 c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1164 # stripping: saved backup bundle to $TESTTMP/split-fold/.hg/strip-backup/9ac430e15fca-36b6476a-backup.hg
1164 # stripping: saved backup bundle to $TESTTMP/split-fold/.hg/strip-backup/9ac430e15fca-36b6476a-backup.hg
1165 3 new content-divergent changesets
1165 3 new content-divergent changesets
1166 ### Backup markers ###
1166 ### Backup markers ###
1167 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1167 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1168 27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1168 27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1169 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1169 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1170 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1170 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1171 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1171 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1172 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1172 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1173 a9b9da38ed96f8c6c14f429441f625a344eb4696 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1173 a9b9da38ed96f8c6c14f429441f625a344eb4696 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1174 b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1174 b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1175 c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1175 c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1176 ### diff <relevant> <backed-up> ###
1176 ### diff <relevant> <backed-up> ###
1177 #################################
1177 #################################
1178 ### Stripped markers ###
1178 ### Stripped markers ###
1179 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1179 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1180 27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1180 27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1181 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1181 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1182 a9b9da38ed96f8c6c14f429441f625a344eb4696 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1182 a9b9da38ed96f8c6c14f429441f625a344eb4696 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1183 b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1183 b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1184 c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1184 c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1185 ### diff <exclusive> <stripped> ###
1185 ### diff <exclusive> <stripped> ###
1186 #################################
1186 #################################
1187 # unbundling: adding changesets
1187 # unbundling: adding changesets
1188 # unbundling: adding manifests
1188 # unbundling: adding manifests
1189 # unbundling: adding file changes
1189 # unbundling: adding file changes
1190 # unbundling: added 2 changesets with 2 changes to 2 files (+2 heads)
1190 # unbundling: added 2 changesets with 2 changes to 2 files (+2 heads)
1191 # unbundling: 6 new obsolescence markers
1191 # unbundling: 6 new obsolescence markers
1192 # unbundling: obsoleted 3 changesets
1192 # unbundling: obsoleted 3 changesets
1193 # unbundling: new changesets 2f20ff6509f0 (1 drafts)
1193 # unbundling: new changesets 2f20ff6509f0 (1 drafts)
1194 # unbundling: (1 other changesets obsolete on arrival)
1194 # unbundling: (1 other changesets obsolete on arrival)
1195 # unbundling: (run 'hg heads' to see heads)
1195 # unbundling: (run 'hg heads' to see heads)
1196
1196
1197 * top one and one of the split
1197 * top one and one of the split
1198
1198
1199 $ testrevs 'desc("C-E") + desc("C-C")'
1199 $ testrevs 'desc("C-E") + desc("C-C")'
1200 ### Matched revisions###
1200 ### Matched revisions###
1201 27ec657ca21d: C-C
1201 27ec657ca21d: C-C
1202 2f20ff6509f0: C-E
1202 2f20ff6509f0: C-E
1203 ### Relevant markers ###
1203 ### Relevant markers ###
1204 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1204 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1205 27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1205 27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1206 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1206 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1207 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1207 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1208 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1208 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1209 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1209 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1210 a9b9da38ed96f8c6c14f429441f625a344eb4696 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1210 a9b9da38ed96f8c6c14f429441f625a344eb4696 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1211 b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1211 b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1212 c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1212 c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1213 # bundling: 2 changesets found
1213 # bundling: 2 changesets found
1214 ### Bundled markers ###
1214 ### Bundled markers ###
1215 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1215 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1216 27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1216 27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1217 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1217 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1218 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1218 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1219 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1219 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1220 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1220 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1221 a9b9da38ed96f8c6c14f429441f625a344eb4696 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1221 a9b9da38ed96f8c6c14f429441f625a344eb4696 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1222 b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1222 b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1223 c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1223 c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1224 ### diff <relevant> <bundled> ###
1224 ### diff <relevant> <bundled> ###
1225 #################################
1225 #################################
1226 ### Exclusive markers ###
1226 ### Exclusive markers ###
1227 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1227 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1228 27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1228 27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1229 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1229 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1230 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1230 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1231 a9b9da38ed96f8c6c14f429441f625a344eb4696 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1231 a9b9da38ed96f8c6c14f429441f625a344eb4696 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1232 b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1232 b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1233 c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1233 c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1234 # stripping: saved backup bundle to $TESTTMP/split-fold/.hg/strip-backup/2f20ff6509f0-5fdfcd7d-backup.hg
1234 # stripping: saved backup bundle to $TESTTMP/split-fold/.hg/strip-backup/2f20ff6509f0-5fdfcd7d-backup.hg
1235 ### Backup markers ###
1235 ### Backup markers ###
1236 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1236 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1237 27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1237 27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1238 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1238 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1239 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1239 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1240 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1240 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1241 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1241 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1242 a9b9da38ed96f8c6c14f429441f625a344eb4696 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1242 a9b9da38ed96f8c6c14f429441f625a344eb4696 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1243 b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1243 b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1244 c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1244 c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1245 ### diff <relevant> <backed-up> ###
1245 ### diff <relevant> <backed-up> ###
1246 #################################
1246 #################################
1247 ### Stripped markers ###
1247 ### Stripped markers ###
1248 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1248 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1249 27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1249 27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1250 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1250 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1251 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1251 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1252 a9b9da38ed96f8c6c14f429441f625a344eb4696 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1252 a9b9da38ed96f8c6c14f429441f625a344eb4696 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1253 b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1253 b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1254 c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1254 c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1255 ### diff <exclusive> <stripped> ###
1255 ### diff <exclusive> <stripped> ###
1256 #################################
1256 #################################
1257 # unbundling: adding changesets
1257 # unbundling: adding changesets
1258 # unbundling: adding manifests
1258 # unbundling: adding manifests
1259 # unbundling: adding file changes
1259 # unbundling: adding file changes
1260 # unbundling: added 2 changesets with 2 changes to 2 files (+2 heads)
1260 # unbundling: added 2 changesets with 2 changes to 2 files (+2 heads)
1261 # unbundling: 7 new obsolescence markers
1261 # unbundling: 7 new obsolescence markers
1262 # unbundling: obsoleted 2 changesets
1262 # unbundling: obsoleted 2 changesets
1263 # unbundling: new changesets 2f20ff6509f0 (1 drafts)
1263 # unbundling: new changesets 2f20ff6509f0 (1 drafts)
1264 # unbundling: (1 other changesets obsolete on arrival)
1264 # unbundling: (1 other changesets obsolete on arrival)
1265 # unbundling: (run 'hg heads' to see heads)
1265 # unbundling: (run 'hg heads' to see heads)
1266
1266
1267 * all
1267 * all
1268
1268
1269 $ testrevs 'desc("C-")'
1269 $ testrevs 'desc("C-")'
1270 ### Matched revisions###
1270 ### Matched revisions###
1271 06dc9da25ef0: C-D
1271 06dc9da25ef0: C-D
1272 27ec657ca21d: C-C
1272 27ec657ca21d: C-C
1273 2f20ff6509f0: C-E
1273 2f20ff6509f0: C-E
1274 9ac430e15fca: C-A
1274 9ac430e15fca: C-A
1275 a9b9da38ed96: C-B
1275 a9b9da38ed96: C-B
1276 ### Relevant markers ###
1276 ### Relevant markers ###
1277 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1277 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1278 27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1278 27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1279 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1279 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1280 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1280 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1281 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1281 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1282 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1282 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1283 a9b9da38ed96f8c6c14f429441f625a344eb4696 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1283 a9b9da38ed96f8c6c14f429441f625a344eb4696 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1284 b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1284 b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1285 c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1285 c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1286 # bundling: 5 changesets found
1286 # bundling: 5 changesets found
1287 ### Bundled markers ###
1287 ### Bundled markers ###
1288 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1288 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1289 27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1289 27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1290 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1290 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1291 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1291 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1292 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1292 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1293 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1293 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1294 a9b9da38ed96f8c6c14f429441f625a344eb4696 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1294 a9b9da38ed96f8c6c14f429441f625a344eb4696 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1295 b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1295 b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1296 c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1296 c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1297 ### diff <relevant> <bundled> ###
1297 ### diff <relevant> <bundled> ###
1298 #################################
1298 #################################
1299 ### Exclusive markers ###
1299 ### Exclusive markers ###
1300 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1300 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1301 27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1301 27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1302 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1302 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1303 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1303 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1304 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1304 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1305 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1305 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1306 a9b9da38ed96f8c6c14f429441f625a344eb4696 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1306 a9b9da38ed96f8c6c14f429441f625a344eb4696 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1307 b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1307 b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1308 c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1308 c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1309 # stripping: saved backup bundle to $TESTTMP/split-fold/.hg/strip-backup/a9b9da38ed96-eeb4258f-backup.hg
1309 # stripping: saved backup bundle to $TESTTMP/split-fold/.hg/strip-backup/a9b9da38ed96-eeb4258f-backup.hg
1310 ### Backup markers ###
1310 ### Backup markers ###
1311 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1311 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1312 27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1312 27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1313 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1313 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1314 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1314 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1315 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1315 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1316 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1316 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1317 a9b9da38ed96f8c6c14f429441f625a344eb4696 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1317 a9b9da38ed96f8c6c14f429441f625a344eb4696 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1318 b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1318 b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1319 c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1319 c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1320 ### diff <relevant> <backed-up> ###
1320 ### diff <relevant> <backed-up> ###
1321 #################################
1321 #################################
1322 ### Stripped markers ###
1322 ### Stripped markers ###
1323 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1323 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1324 27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1324 27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1325 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1325 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1326 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1326 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c a9b9da38ed96f8c6c14f429441f625a344eb4696 27ec657ca21dd27c36c99fa75586f72ff0d442f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1327 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1327 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1328 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1328 a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 9ac430e15fca923b0ba027ca85d4d75c5c9cb73c 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1329 a9b9da38ed96f8c6c14f429441f625a344eb4696 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1329 a9b9da38ed96f8c6c14f429441f625a344eb4696 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1330 b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1330 b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1331 c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1331 c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1332 ### diff <exclusive> <stripped> ###
1332 ### diff <exclusive> <stripped> ###
1333 #################################
1333 #################################
1334 # unbundling: adding changesets
1334 # unbundling: adding changesets
1335 # unbundling: adding manifests
1335 # unbundling: adding manifests
1336 # unbundling: adding file changes
1336 # unbundling: adding file changes
1337 # unbundling: added 5 changesets with 5 changes to 5 files (+4 heads)
1337 # unbundling: added 5 changesets with 5 changes to 5 files (+4 heads)
1338 # unbundling: 9 new obsolescence markers
1338 # unbundling: 9 new obsolescence markers
1339 # unbundling: new changesets 2f20ff6509f0 (1 drafts)
1339 # unbundling: new changesets 2f20ff6509f0 (1 drafts)
1340 # unbundling: (4 other changesets obsolete on arrival)
1340 # unbundling: (4 other changesets obsolete on arrival)
1341 # unbundling: (run 'hg heads' to see heads)
1341 # unbundling: (run 'hg heads' to see heads)
1342
1342
1343 changeset pruned on its own
1343 changeset pruned on its own
1344 ===========================
1344 ===========================
1345
1345
1346 . βŠ— B
1346 . βŠ— B
1347 . |
1347 . |
1348 . β—• A
1348 . β—• A
1349 . |
1349 . |
1350 . ●
1350 . ●
1351
1351
1352 setup
1352 setup
1353 -----
1353 -----
1354
1354
1355 $ mktestrepo lonely-prune
1355 $ mktestrepo lonely-prune
1356 $ hg up 'desc("ROOT")'
1356 $ hg up 'desc("ROOT")'
1357 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1357 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1358 $ mkcommit 'C-A'
1358 $ mkcommit 'C-A'
1359 $ mkcommit 'C-B'
1359 $ mkcommit 'C-B'
1360 $ hg debugobsolete --record-parent `getid 'desc("C-B")'`
1360 $ hg debugobsolete --record-parent `getid 'desc("C-B")'`
1361 1 new obsolescence markers
1361 1 new obsolescence markers
1362 obsoleted 1 changesets
1362 obsoleted 1 changesets
1363
1363
1364 $ hg up 'desc("ROOT")'
1364 $ hg up 'desc("ROOT")'
1365 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
1365 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
1366 $ hg log --hidden -G
1366 $ hg log --hidden -G
1367 x cefb651fc2fd: C-B
1367 x cefb651fc2fd: C-B
1368 |
1368 |
1369 o 9ac430e15fca: C-A
1369 o 9ac430e15fca: C-A
1370 |
1370 |
1371 @ ea207398892e: ROOT
1371 @ ea207398892e: ROOT
1372
1372
1373 $ hg debugobsolete
1373 $ hg debugobsolete
1374 cefb651fc2fdc7bb75e588781de5e432c134e8a5 0 {9ac430e15fca923b0ba027ca85d4d75c5c9cb73c} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1374 cefb651fc2fdc7bb75e588781de5e432c134e8a5 0 {9ac430e15fca923b0ba027ca85d4d75c5c9cb73c} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1375
1375
1376 Actual testing
1376 Actual testing
1377 --------------
1377 --------------
1378 $ testrevs 'desc("C-A")'
1378 $ testrevs 'desc("C-A")'
1379 ### Matched revisions###
1379 ### Matched revisions###
1380 9ac430e15fca: C-A
1380 9ac430e15fca: C-A
1381 ### Relevant markers ###
1381 ### Relevant markers ###
1382 cefb651fc2fdc7bb75e588781de5e432c134e8a5 0 {9ac430e15fca923b0ba027ca85d4d75c5c9cb73c} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1382 cefb651fc2fdc7bb75e588781de5e432c134e8a5 0 {9ac430e15fca923b0ba027ca85d4d75c5c9cb73c} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1383 # bundling: 1 changesets found
1383 # bundling: 1 changesets found
1384 ### Bundled markers ###
1384 ### Bundled markers ###
1385 cefb651fc2fdc7bb75e588781de5e432c134e8a5 0 {9ac430e15fca923b0ba027ca85d4d75c5c9cb73c} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1385 cefb651fc2fdc7bb75e588781de5e432c134e8a5 0 {9ac430e15fca923b0ba027ca85d4d75c5c9cb73c} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1386 ### diff <relevant> <bundled> ###
1386 ### diff <relevant> <bundled> ###
1387 #################################
1387 #################################
1388 ### Exclusive markers ###
1388 ### Exclusive markers ###
1389 $ testrevs 'desc("C-B")'
1389 $ testrevs 'desc("C-B")'
1390 ### Matched revisions###
1390 ### Matched revisions###
1391 cefb651fc2fd: C-B
1391 cefb651fc2fd: C-B
1392 ### Relevant markers ###
1392 ### Relevant markers ###
1393 cefb651fc2fdc7bb75e588781de5e432c134e8a5 0 {9ac430e15fca923b0ba027ca85d4d75c5c9cb73c} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1393 cefb651fc2fdc7bb75e588781de5e432c134e8a5 0 {9ac430e15fca923b0ba027ca85d4d75c5c9cb73c} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1394 # bundling: 1 changesets found
1394 # bundling: 1 changesets found
1395 ### Bundled markers ###
1395 ### Bundled markers ###
1396 cefb651fc2fdc7bb75e588781de5e432c134e8a5 0 {9ac430e15fca923b0ba027ca85d4d75c5c9cb73c} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1396 cefb651fc2fdc7bb75e588781de5e432c134e8a5 0 {9ac430e15fca923b0ba027ca85d4d75c5c9cb73c} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1397 ### diff <relevant> <bundled> ###
1397 ### diff <relevant> <bundled> ###
1398 #################################
1398 #################################
1399 ### Exclusive markers ###
1399 ### Exclusive markers ###
1400 cefb651fc2fdc7bb75e588781de5e432c134e8a5 0 {9ac430e15fca923b0ba027ca85d4d75c5c9cb73c} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1400 cefb651fc2fdc7bb75e588781de5e432c134e8a5 0 {9ac430e15fca923b0ba027ca85d4d75c5c9cb73c} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1401 # stripping: saved backup bundle to $TESTTMP/lonely-prune/.hg/strip-backup/cefb651fc2fd-345c8dfa-backup.hg
1401 # stripping: saved backup bundle to $TESTTMP/lonely-prune/.hg/strip-backup/cefb651fc2fd-345c8dfa-backup.hg
1402 ### Backup markers ###
1402 ### Backup markers ###
1403 cefb651fc2fdc7bb75e588781de5e432c134e8a5 0 {9ac430e15fca923b0ba027ca85d4d75c5c9cb73c} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1403 cefb651fc2fdc7bb75e588781de5e432c134e8a5 0 {9ac430e15fca923b0ba027ca85d4d75c5c9cb73c} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1404 ### diff <relevant> <backed-up> ###
1404 ### diff <relevant> <backed-up> ###
1405 #################################
1405 #################################
1406 ### Stripped markers ###
1406 ### Stripped markers ###
1407 cefb651fc2fdc7bb75e588781de5e432c134e8a5 0 {9ac430e15fca923b0ba027ca85d4d75c5c9cb73c} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1407 cefb651fc2fdc7bb75e588781de5e432c134e8a5 0 {9ac430e15fca923b0ba027ca85d4d75c5c9cb73c} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1408 ### diff <exclusive> <stripped> ###
1408 ### diff <exclusive> <stripped> ###
1409 #################################
1409 #################################
1410 # unbundling: adding changesets
1410 # unbundling: adding changesets
1411 # unbundling: adding manifests
1411 # unbundling: adding manifests
1412 # unbundling: adding file changes
1412 # unbundling: adding file changes
1413 # unbundling: added 1 changesets with 1 changes to 1 files
1413 # unbundling: added 1 changesets with 1 changes to 1 files
1414 # unbundling: 1 new obsolescence markers
1414 # unbundling: 1 new obsolescence markers
1415 # unbundling: (1 other changesets obsolete on arrival)
1415 # unbundling: (1 other changesets obsolete on arrival)
1416 # unbundling: (run 'hg update' to get a working copy)
1416 # unbundling: (run 'hg update' to get a working copy)
1417 $ testrevs 'desc("C-")'
1417 $ testrevs 'desc("C-")'
1418 ### Matched revisions###
1418 ### Matched revisions###
1419 9ac430e15fca: C-A
1419 9ac430e15fca: C-A
1420 cefb651fc2fd: C-B
1420 cefb651fc2fd: C-B
1421 ### Relevant markers ###
1421 ### Relevant markers ###
1422 cefb651fc2fdc7bb75e588781de5e432c134e8a5 0 {9ac430e15fca923b0ba027ca85d4d75c5c9cb73c} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1422 cefb651fc2fdc7bb75e588781de5e432c134e8a5 0 {9ac430e15fca923b0ba027ca85d4d75c5c9cb73c} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1423 # bundling: 2 changesets found
1423 # bundling: 2 changesets found
1424 ### Bundled markers ###
1424 ### Bundled markers ###
1425 cefb651fc2fdc7bb75e588781de5e432c134e8a5 0 {9ac430e15fca923b0ba027ca85d4d75c5c9cb73c} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1425 cefb651fc2fdc7bb75e588781de5e432c134e8a5 0 {9ac430e15fca923b0ba027ca85d4d75c5c9cb73c} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1426 ### diff <relevant> <bundled> ###
1426 ### diff <relevant> <bundled> ###
1427 #################################
1427 #################################
1428 ### Exclusive markers ###
1428 ### Exclusive markers ###
1429 cefb651fc2fdc7bb75e588781de5e432c134e8a5 0 {9ac430e15fca923b0ba027ca85d4d75c5c9cb73c} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1429 cefb651fc2fdc7bb75e588781de5e432c134e8a5 0 {9ac430e15fca923b0ba027ca85d4d75c5c9cb73c} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1430 # stripping: saved backup bundle to $TESTTMP/lonely-prune/.hg/strip-backup/9ac430e15fca-b9855b02-backup.hg
1430 # stripping: saved backup bundle to $TESTTMP/lonely-prune/.hg/strip-backup/9ac430e15fca-b9855b02-backup.hg
1431 ### Backup markers ###
1431 ### Backup markers ###
1432 cefb651fc2fdc7bb75e588781de5e432c134e8a5 0 {9ac430e15fca923b0ba027ca85d4d75c5c9cb73c} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1432 cefb651fc2fdc7bb75e588781de5e432c134e8a5 0 {9ac430e15fca923b0ba027ca85d4d75c5c9cb73c} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1433 ### diff <relevant> <backed-up> ###
1433 ### diff <relevant> <backed-up> ###
1434 #################################
1434 #################################
1435 ### Stripped markers ###
1435 ### Stripped markers ###
1436 cefb651fc2fdc7bb75e588781de5e432c134e8a5 0 {9ac430e15fca923b0ba027ca85d4d75c5c9cb73c} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1436 cefb651fc2fdc7bb75e588781de5e432c134e8a5 0 {9ac430e15fca923b0ba027ca85d4d75c5c9cb73c} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1437 ### diff <exclusive> <stripped> ###
1437 ### diff <exclusive> <stripped> ###
1438 #################################
1438 #################################
1439 # unbundling: adding changesets
1439 # unbundling: adding changesets
1440 # unbundling: adding manifests
1440 # unbundling: adding manifests
1441 # unbundling: adding file changes
1441 # unbundling: adding file changes
1442 # unbundling: added 2 changesets with 2 changes to 2 files
1442 # unbundling: added 2 changesets with 2 changes to 2 files
1443 # unbundling: 1 new obsolescence markers
1443 # unbundling: 1 new obsolescence markers
1444 # unbundling: new changesets 9ac430e15fca (1 drafts)
1444 # unbundling: new changesets 9ac430e15fca (1 drafts)
1445 # unbundling: (1 other changesets obsolete on arrival)
1445 # unbundling: (1 other changesets obsolete on arrival)
1446 # unbundling: (run 'hg update' to get a working copy)
1446 # unbundling: (run 'hg update' to get a working copy)
1447
1447
1448 Test that advisory obsolescence markers in bundles are ignored if unsupported
1448 Test that advisory obsolescence markers in bundles are ignored if unsupported
1449 -----------------------------------------------------------------------------
1449 -----------------------------------------------------------------------------
1450
1450
1451 $ hg init repo-with-obs
1451 $ hg init repo-with-obs
1452 $ cd repo-with-obs
1452 $ cd repo-with-obs
1453 $ hg debugbuilddag +1
1453 $ hg debugbuilddag +1
1454 $ hg debugobsolete `getid 0`
1454 $ hg debugobsolete `getid 0`
1455 1 new obsolescence markers
1455 1 new obsolescence markers
1456 obsoleted 1 changesets
1456 obsoleted 1 changesets
1457 $ hg bundle --config experimental.evolution.bundle-obsmarker=true --config experimental.evolution.bundle-obsmarker:mandatory=false --all --hidden bundle-with-obs
1457 $ hg bundle --config experimental.evolution.bundle-obsmarker=true --config experimental.evolution.bundle-obsmarker:mandatory=false --all --hidden bundle-with-obs
1458 1 changesets found
1458 1 changesets found
1459 $ cd ..
1459 $ cd ..
1460 $ hg init repo-without-obs
1460 $ hg init repo-without-obs
1461 $ cd repo-without-obs
1461 $ cd repo-without-obs
1462 $ hg --config experimental.evolution=False unbundle ../repo-with-obs/bundle-with-obs --debug
1462 $ hg --config experimental.evolution=False unbundle ../repo-with-obs/bundle-with-obs --debug
1463 bundle2-input-bundle: 1 params with-transaction
1463 bundle2-input-bundle: 1 params with-transaction
1464 bundle2-input-part: "changegroup" (params: 1 mandatory 1 advisory) supported
1464 bundle2-input-part: "changegroup" (params: 1 mandatory 1 advisory) supported
1465 adding changesets
1465 adding changesets
1466 add changeset 1ea73414a91b
1466 add changeset 1ea73414a91b
1467 adding manifests
1467 adding manifests
1468 adding file changes
1468 adding file changes
1469 bundle2-input-part: total payload size 190
1469 bundle2-input-part: total payload size 190
1470 bundle2-input-part: "cache:rev-branch-cache" (advisory) supported
1470 bundle2-input-part: "cache:rev-branch-cache" (advisory) supported
1471 bundle2-input-part: total payload size 39
1471 bundle2-input-part: total payload size 39
1472 bundle2-input-part: "obsmarkers" (advisory) supported
1472 bundle2-input-part: "obsmarkers" (advisory) supported
1473 bundle2-input-part: total payload size 50
1473 bundle2-input-part: total payload size 50
1474 ignoring obsolescence markers, feature not enabled
1474 ignoring obsolescence markers, feature not enabled
1475 bundle2-input-bundle: 3 parts total
1475 bundle2-input-bundle: 3 parts total
1476 updating the branch cache
1476 updating the branch cache
1477 added 1 changesets with 0 changes to 0 files
1477 added 1 changesets with 0 changes to 0 files
1478 new changesets 1ea73414a91b (1 drafts)
1478 new changesets 1ea73414a91b (1 drafts)
1479 (run 'hg update' to get a working copy)
1479 (run 'hg update' to get a working copy)
1480 $ cd ..
1480 $ cd ..
1481
1481
1482 Test bundlespec overwrite default
1482 Test bundlespec overwrite default
1483 ---------------------------------
1483 ---------------------------------
1484
1484
1485 # move back to the default
1485 # move back to the default
1486
1486
1487 $ grep -v evolution.bundle-obsmarker $HGRCPATH > a
1487 $ grep -v evolution.bundle-obsmarker $HGRCPATH > a
1488 $ mv a $HGRCPATH
1488 $ mv a $HGRCPATH
1489
1489
1490 $ hg bundle -R repo-with-obs --type 'v2;obsolescence=yes' --all --hidden bundle-type-with-obs
1490 $ hg bundle -R repo-with-obs --type 'v2;obsolescence=yes' --all --hidden bundle-type-with-obs
1491 1 changesets found
1491 1 changesets found
1492 $ hg debugbundle --spec bundle-type-with-obs
1493 bzip2-v2;obsolescence=yes
1492 $ hg debugbundle bundle-type-with-obs --part-type obsmarkers
1494 $ hg debugbundle bundle-type-with-obs --part-type obsmarkers
1493 Stream params: {Compression: BZ}
1495 Stream params: {Compression: BZ}
1494 obsmarkers -- {} (mandatory: True)
1496 obsmarkers -- {} (mandatory: True)
1495 version: 1 (50 bytes)
1497 version: 1 (50 bytes)
1496 1ea73414a91b0920940797d8fc6a11e447f8ea1e 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1498 1ea73414a91b0920940797d8fc6a11e447f8ea1e 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1497
1499
1498 $ hg bundle -R repo-with-obs --type 'v2;obsolescence=yes;obsolescence-mandatory=no' --all --hidden bundle-type-with-obs-adv
1500 $ hg bundle -R repo-with-obs --type 'v2;obsolescence=yes;obsolescence-mandatory=no' --all --hidden bundle-type-with-obs-adv
1499 1 changesets found
1501 1 changesets found
1502 $ hg debugbundle --spec bundle-type-with-obs-adv
1503 bzip2-v2;obsolescence=yes;obsolescence-mandatory=no
1500 $ hg debugbundle bundle-type-with-obs-adv --part-type obsmarkers
1504 $ hg debugbundle bundle-type-with-obs-adv --part-type obsmarkers
1501 Stream params: {Compression: BZ}
1505 Stream params: {Compression: BZ}
1502 obsmarkers -- {} (mandatory: False)
1506 obsmarkers -- {} (mandatory: False)
1503 version: 1 (50 bytes)
1507 version: 1 (50 bytes)
1504 1ea73414a91b0920940797d8fc6a11e447f8ea1e 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1508 1ea73414a91b0920940797d8fc6a11e447f8ea1e 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1505 $ hg bundle -R repo-with-obs --type 'v2;obsolescence=no' --all --hidden bundle-type-without-obs
1509 $ hg bundle -R repo-with-obs --type 'v2;obsolescence=no' --all --hidden bundle-type-without-obs
1506 1 changesets found
1510 1 changesets found
1511 $ hg debugbundle --spec bundle-type-without-obs
1512 bzip2-v2
1507 $ hg debugbundle bundle-type-without-obs --part-type obsmarkers
1513 $ hg debugbundle bundle-type-without-obs --part-type obsmarkers
1508 Stream params: {Compression: BZ}
1514 Stream params: {Compression: BZ}
1509
1515
1510 Test bundlespec overwrite local config
1516 Test bundlespec overwrite local config
1511 --------------------------------------
1517 --------------------------------------
1512
1518
1513 $ hg bundle -R repo-with-obs --config experimental.evolution.bundle-obsmarker=false --type 'v2;obsolescence=yes' --all --hidden bundle-type-with-obs2
1519 $ hg bundle -R repo-with-obs --config experimental.evolution.bundle-obsmarker=false --type 'v2;obsolescence=yes' --all --hidden bundle-type-with-obs2
1514 1 changesets found
1520 1 changesets found
1521 $ hg debugbundle --spec bundle-type-with-obs2
1522 bzip2-v2;obsolescence=yes
1515 $ hg debugbundle bundle-type-with-obs2 --part-type obsmarkers
1523 $ hg debugbundle bundle-type-with-obs2 --part-type obsmarkers
1516 Stream params: {Compression: BZ}
1524 Stream params: {Compression: BZ}
1517 obsmarkers -- {} (mandatory: True)
1525 obsmarkers -- {} (mandatory: True)
1518 version: 1 (50 bytes)
1526 version: 1 (50 bytes)
1519 1ea73414a91b0920940797d8fc6a11e447f8ea1e 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1527 1ea73414a91b0920940797d8fc6a11e447f8ea1e 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1520 $ hg bundle -R repo-with-obs --config experimental.evolution.bundle-obsmarker=true --type 'v2;obsolescence=no' --all --hidden bundle-type-without-obs2
1528 $ hg bundle -R repo-with-obs --config experimental.evolution.bundle-obsmarker=true --type 'v2;obsolescence=no' --all --hidden bundle-type-without-obs2
1521 1 changesets found
1529 1 changesets found
1530 $ hg debugbundle --spec bundle-type-without-obs2
1531 bzip2-v2
1522 $ hg debugbundle bundle-type-without-obs2 --part-type obsmarkers
1532 $ hg debugbundle bundle-type-without-obs2 --part-type obsmarkers
1523 Stream params: {Compression: BZ}
1533 Stream params: {Compression: BZ}
General Comments 0
You need to be logged in to leave comments. Login now