Mercurial > evolve
changeset 5731:7daa67934798
branching: merge with stable
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 26 Jan 2021 17:14:29 +0100 |
parents | a119432bafc1 (diff) 0257716d1f22 (current diff) |
children | 2fce79f5ac71 |
files | CHANGELOG hgext3rd/topic/__init__.py |
diffstat | 21 files changed, 647 insertions(+), 503 deletions(-) [+] |
line wrap: on
line diff
--- a/CHANGELOG Wed Dec 30 11:01:37 2020 -0800 +++ b/CHANGELOG Tue Jan 26 17:14:29 2021 +0100 @@ -11,6 +11,13 @@ * rebase: prevent in-memory rebase to silently drop topic (by disable the feature) +10.2.0 - in progress +-------------------- + + * strip: remove experimental.prunestrip option + * evolve: improve resolution of some case of parent divergence + * performance: speed up various operations using an in-memory cache for topic + 10.1.0 -- 2020-10-31 --------------------
--- a/hgext3rd/evolve/__init__.py Wed Dec 30 11:01:37 2020 -0800 +++ b/hgext3rd/evolve/__init__.py Tue Jan 26 17:14:29 2021 +0100 @@ -266,11 +266,9 @@ help, hg, lock as lockmod, - logcmdutil, - node, + node as nodemod, pycompat, revset, - scmutil, ) from mercurial.i18n import _ @@ -350,7 +348,6 @@ # Configuration eh.configitem(b'experimental', b'evolutioncommands', []) eh.configitem(b'experimental', b'evolution.allnewcommands', None) -eh.configitem(b'experimental', b'prunestrip', False) ##################################################################### ### Option configuration ### @@ -434,7 +431,7 @@ @eh.command(b'pstatus', pstatusopts, **compat.helpcategorykwargs('CATEGORY_WORKING_DIRECTORY')) def pstatus(ui, repo, *args, **kwargs): - """show status combining committed and uncommited changes + """show status combining committed and uncommitted changes This show the combined status of the current working copy parent commit and the uncommitted change in the working copy itself. The status displayed @@ -450,7 +447,7 @@ @eh.command(b'pdiff', pdiffopts, **compat.helpcategorykwargs('CATEGORY_WORKING_DIRECTORY')) def pdiff(ui, repo, *args, **kwargs): - """show diff combining committed and uncommited changes + """show diff combining committed and uncommitted changes This show the combined diff of the current working copy parent commit and the uncommitted change in the working copy itself. The diff displayed @@ -655,7 +652,7 @@ if rev.node() == prevnode and wasobs: return msg = _(b"working directory parent is obsolete! (%s)\n") - shortnode = node.short(rev.node()) + shortnode = nodemod.short(rev.node()) ui.warn(msg % shortnode) @@ -758,7 +755,7 @@ def _getnodefrompatch(patch, dest): patchnode = patch.get(b'nodeid') if patchnode is not None: - dest[b'node'] = node.bin(patchnode) + dest[b'node'] = nodemod.bin(patchnode) @eh.wrapfunction(mercurial.cmdutil, 'tryimportone') def tryimportone(orig, ui, repo, hunk, parents, opts, *args, **kwargs): @@ -831,7 +828,7 @@ def _getcurrenttopic(repo): return getattr(repo, 'currenttopic', b'') -def _prevupdate(repo, displayer, target, bookmark, dryrun, mergeopt): +def _prevupdate(repo, display, target, bookmark, dryrun, mergeopt): if dryrun: repo.ui.write(_(b'hg update %s;\n') % target) if bookmark is not None: @@ -865,9 +862,9 @@ lockmod.release(tr, lock) if not repo.ui.quiet: - displayer.show(target) + display(target) -def _findprevtarget(repo, displayer, movebookmark=False, topic=True): +def _findprevtarget(repo, display, movebookmark=False, topic=True): target = bookmark = None wkctx = repo[None] p1 = wkctx.p1() @@ -881,7 +878,7 @@ parents = [ctx for ctx in parents if ctx.topic() == currenttopic] # issue message for the various case - if p1.node() == node.nullid: + if p1.node() == nullid: repo.ui.warn(_(b'already at repository root\n')) elif not parents and currenttopic: repo.ui.warn(_(b'no parent in topic "%s"\n') % currenttopic) @@ -897,7 +894,7 @@ choosedrev = utility.revselectionprompt(repo.ui, repo, prevs, header) if choosedrev is None: for p in parents: - displayer.show(p) + display(p) repo.ui.warn(_(b'multiple parents, explicitly update to one\n')) else: target = repo[choosedrev] @@ -942,10 +939,10 @@ if topic and hastopic: template = utility.stacktemplate - displayer = logcmdutil.changesetdisplayer(ui, repo, - {b'template': template}) + display = compat.format_changeset_summary_fn(ui, repo, b'previous', + template) - target, bookmark = _findprevtarget(repo, displayer, + target, bookmark = _findprevtarget(repo, display, opts.get('move_bookmark'), topic) if target is not None: configoverride = util.nullcontextmanager() @@ -954,7 +951,7 @@ (b'_internal', b'keep-topic'): b'yes' }, source=b'topic-extension') with configoverride: - _prevupdate(repo, displayer, target, bookmark, dryrunopt, + _prevupdate(repo, display, target, bookmark, dryrunopt, mergeopt) return 0 else: @@ -1001,8 +998,8 @@ children = [ctx for ctx in children if ctx not in filtered] template = utility.stacktemplate opts['stacktemplate'] = True - displayer = logcmdutil.changesetdisplayer(ui, repo, - {b'template': template}) + display = compat.format_changeset_summary_fn(ui, repo, b'next', + template) # check if we need to evolve while updating to the next child revision needevolve = False @@ -1038,7 +1035,7 @@ if len(children) == 1: c = children[0] - return _updatetonext(ui, repo, c, displayer, opts) + return _updatetonext(ui, repo, c, display, opts) elif children: cheader = _(b"ambiguous next changeset, choose one to update:") crevs = [c.rev() for c in children] @@ -1046,11 +1043,11 @@ if choosedrev is None: ui.warn(_(b"ambiguous next changeset:\n")) for c in children: - displayer.show(c) + display(c) ui.warn(_(b"explicitly update to one of them\n")) return 1 else: - return _updatetonext(ui, repo, repo[choosedrev], displayer, opts) + return _updatetonext(ui, repo, repo[choosedrev], display, opts) else: if not opts['evolve'] or not aspchildren: if filtered: @@ -1071,7 +1068,7 @@ if choosedrev is None: ui.warn(_(b"ambiguous next (unstable) changeset:\n")) for c in aspchildren: - displayer.show(repo[c]) + display(repo[c]) ui.warn(_(b"(run 'hg evolve --rev REV' on one of them)\n")) return 1 else: @@ -1102,7 +1099,7 @@ % ui.label(bytes(repo[b'.']), b'evolve.node')) return 0 -def _updatetonext(ui, repo, child, displayer, opts): +def _updatetonext(ui, repo, child, display, opts): """ logic for `hg next` command to update to children and move bookmarks if required """ bm = repo._activebookmark @@ -1139,7 +1136,7 @@ finally: lockmod.release(tr, lock) if not ui.quiet: - displayer.show(child) + display(child) return 0 @eh.wrapcommand(b'commit') @@ -1179,41 +1176,6 @@ finally: lockmod.release(tr, lock, wlock) -try: - from mercurial import strip - strip - stripcmd = b'debugstrip' - stripext = None -except ImportError: - # hg <= 5.6 (d7a508a75d72) - stripcmd = b'strip' - stripext = b'strip' - -@eh.wrapcommand(stripcmd, extension=stripext, opts=[ - (b'', b'bundle', None, _(b"delete the commit entirely and move it to a " - b"backup bundle")), - ]) -def stripwrapper(orig, ui, repo, *revs, **kwargs): - if (not ui.configbool(b'experimental', b'prunestrip') - or kwargs.get('bundle', False)): - return orig(ui, repo, *revs, **kwargs) - - if kwargs.get('force'): - ui.warn(_(b"warning: --force has no effect during strip with evolve " - b"enabled\n")) - if kwargs.get('no_backup', False): - ui.warn(_(b"warning: --no-backup has no effect during strips with " - b"evolve enabled\n")) - - revs = list(revs) + kwargs.pop('rev', []) - revs = set(scmutil.revrange(repo, revs)) - revs = repo.revs(b"(%ld)::", revs) - kwargs['rev'] = [] - kwargs['new'] = [] - kwargs['successor'] = [] - kwargs['biject'] = False - return cmdrewrite.cmdprune(ui, repo, *revs, **kwargs) - @eh.extsetup def oldevolveextsetup(ui): entry = cmdutil.findcmd(b'commit', commands.table)[1] @@ -1230,7 +1192,7 @@ if r'debugobsconvert' in sys.argv: return for mark in markers: - if node.nullid in mark[1]: + if nullid in mark[1]: msg = _(b'bad obsolescence marker detected: invalid successors nullid') hint = _(b'You should run `hg debugobsconvert`') raise error.Abort(msg, hint=hint)
--- a/hgext3rd/evolve/cmdrewrite.py Wed Dec 30 11:01:37 2020 -0800 +++ b/hgext3rd/evolve/cmdrewrite.py Tue Jan 26 17:14:29 2021 +0100 @@ -22,7 +22,6 @@ error, hg, lock as lockmod, - logcmdutil, merge, node, obsolete, @@ -1334,9 +1333,9 @@ with ui.configoverride(overrides, b'touch'): rewriteutil.precheck(repo, revs, b'touch') tmpl = utility.shorttemplate - displayer = logcmdutil.changesetdisplayer(ui, repo, {b'template': tmpl}) + display = compat.format_changeset_summary_fn(ui, repo, b'touch', tmpl) with repo.wlock(), repo.lock(), repo.transaction(b'touch'): - touchnodes(ui, repo, revs, displayer, **opts) + touchnodes(ui, repo, revs, display, **opts) def touchnodes(ui, repo, revs, displayer, **opts): duplicate = opts['duplicate'] @@ -1355,7 +1354,7 @@ if not (duplicate or allowdivergence): if precheck_contentdiv(repo, ctx): - displayer.show(ctx) + displayer(ctx) index = ui.promptchoice( _(b"reviving this changeset will create divergence" b" unless you make a duplicate.\n(a)llow divergence or"
--- a/hgext3rd/evolve/compat.py Wed Dec 30 11:01:37 2020 -0800 +++ b/hgext3rd/evolve/compat.py Tue Jan 26 17:14:29 2021 +0100 @@ -10,9 +10,11 @@ import contextlib from mercurial import ( + cmdutil, context, copies, hg, + logcmdutil, merge as mergemod, obsolete, pycompat, @@ -426,3 +428,16 @@ scmutil.cleanupnodes(repo, replacements=fixedreplacements, operation=operation, moves=moves, metadata=metadata) + +if util.safehasattr(cmdutil, 'format_changeset_summary'): + def format_changeset_summary_fn(ui, repo, command, default_spec): + def show(ctx): + text = cmdutil.format_changeset_summary(ui, ctx, command=command, + default_spec=default_spec) + ui.write(b'%s\n' % text) + return show +else: + # hg <= 5.6 (96fcc37a9c80) + def format_changeset_summary_fn(ui, repo, command, default_spec): + logcmdutil.changesetdisplayer(ui, repo, + {b'template': default_spec}).show
--- a/hgext3rd/evolve/evolvecmd.py Wed Dec 30 11:01:37 2020 -0800 +++ b/hgext3rd/evolve/evolvecmd.py Tue Jan 26 17:14:29 2021 +0100 @@ -19,7 +19,6 @@ encoding, error, hg, - logcmdutil, merge, mergeutil, node as nodemod, @@ -67,27 +66,26 @@ """ tr = repo.currenttransaction() assert tr is not None - displayer = None template = shorttemplate if stacktmplt: template = stacktemplate - displayer = logcmdutil.changesetdisplayer(ui, repo, - {b'template': template}) + display = compat.format_changeset_summary_fn(ui, repo, b'evolve', + template) if b'orphan' == category: - result = _solveorphan(ui, repo, ctx, evolvestate, displayer, + result = _solveorphan(ui, repo, ctx, evolvestate, display, dryrun, confirm, progresscb) elif b'phasedivergent' == category: result = _solvephasedivergence(ui, repo, ctx, evolvestate, - displayer, dryrun, confirm, + display, dryrun, confirm, progresscb) elif b'contentdivergent' == category: - result = _solvedivergent(ui, repo, ctx, evolvestate, displayer, + result = _solvedivergent(ui, repo, ctx, evolvestate, display, dryrun, confirm, progresscb) else: assert False, b"unknown trouble category: %s" % (category) return result -def _solveorphan(ui, repo, orig, evolvestate, displayer, dryrun=False, +def _solveorphan(ui, repo, orig, evolvestate, display, dryrun=False, confirm=False, progresscb=None): """ Tries to stabilize the changeset orig which is orphan. @@ -145,13 +143,13 @@ target = repo[newer] if not ui.quiet or confirm: repo.ui.write(_(b'move:'), label=b'evolve.operation') - displayer.show(orig) + display(orig) # lastsolved: keep track of successor of last troubled cset we evolved # to confirm that if atop msg should be suppressed to remove redundancy lastsolved = evolvestate.get(b'lastsolved') if lastsolved is None or target != repo[lastsolved]: repo.ui.write(_(b'atop:')) - displayer.show(target) + display(target) if confirm and ui.prompt(b'perform evolve? [Ny]', b'n') != b'y': raise error.Abort(_(b'evolve aborted by user')) todo = b'hg rebase -r %s -d %s\n' % (orig, target) @@ -169,7 +167,7 @@ keepbranch, b'orphan') return (True, newid) -def _solvephasedivergence(ui, repo, bumped, evolvestate, displayer, +def _solvephasedivergence(ui, repo, bumped, evolvestate, display, dryrun=False, confirm=False, progresscb=None): """Stabilize a phase divergent changeset @@ -196,9 +194,9 @@ if not ui.quiet or confirm: repo.ui.write(_(b'recreate:'), label=b'evolve.operation') - displayer.show(bumped) + display(bumped) repo.ui.write(_(b'atop:')) - displayer.show(prec) + display(prec) if confirm and ui.prompt(_(b'perform evolve? [Ny]'), b'n') != b'y': raise error.Abort(_(b'evolve aborted by user')) if dryrun: @@ -286,9 +284,9 @@ repo.dirstate.setparents(newid, nodemod.nullid) return (True, replacementnode) -def _pickresolutionparent(ui, repo, divergent, other, evolvestate): - """ if relocation required, decide which divergent cset will be relocated - to the other side""" +def _pickresolutionparent(ui, repo, divergent, other, base, evolvestate): + """When the divergent changeset are not based on the same parent, we need + to find out where the divergence resolution will be based.""" # we don't handle merge content-divergent changesets yet if len(other.parents()) > 1: @@ -312,12 +310,13 @@ # Otherwise, we are going to rebase the "behind" branch up to the new # brancmap level. publicdiv = divergent if other.mutable() else other - resolutionparent = publicdiv.p1().node() + resolutionparent = publicdiv.p1().rev() evolvestate[b'public-divergent'] = publicdiv.node() return (True, resolutionparent) otherp1 = succsotherp1 = other.p1().rev() divp1 = succsdivp1 = divergent.p1().rev() + basep1 = base.p1().rev() # finding single successors of divp1 and otherp1 try: @@ -334,19 +333,16 @@ b"%s\n") % (divergent, other) ui.write_err(msg) return (False, b".") + try: + utility._singlesuccessor(repo, base.p1()) + except utility.MultipleSuccessorsError: + msg = (b"ambiguous orphan resolution parent for " + b"%s (base)\n") % base + ui.debug(msg) # the changeset on which resolution changeset will be based on - resolutionparent = repo[succsdivp1].node() + resolutionparent = succsdivp1 - # the nullrev has to be handled specially because -1 is overloaded to both - # mean nullrev (this meaning is used for the result of changectx.rev(), as - # called above) and the tipmost revision (this meaning is used for the %d - # format specifier, as used below) - if nodemod.nullrev in (succsotherp1, succsdivp1): - # nullrev is the only possible ancestor if succsotherp1 or succsdivp1 is nullrev - gca = [nodemod.nullrev] - else: - gca = repo.revs(b"ancestor(%d, %d)" % (succsotherp1, succsdivp1)) # divonly: non-obsolete csets which are topological ancestor of "divergent" # but not "other" divonly = repo.revs(b"only(%d, %d) - obsolete()" % (divergent.rev(), @@ -378,39 +374,55 @@ elif divergent == other.p1(): # both are in parent-child relation pass - elif succsotherp1 in gca and succsdivp1 in gca: - # both are not on the same parent but have same parents's succs. - if otheronly and divonly: - # case: we have visible csets on both side diverging from - # tca of "divergent" and "other". We still need to decide what - # to do in this case - pass - if otheronly: - resolutionparent = repo[succsotherp1].node() - elif divonly: - pass + elif basep1 in (divp1, otherp1): + # only one side moved, set parent of moved one as resolution parent + if basep1 == divp1: + resolutionparent = succsotherp1 else: - # no extra cset on either side pass - elif succsotherp1 in gca and succsdivp1 not in gca: - pass - elif succsdivp1 in gca and succsotherp1 not in gca: - resolutionparent = repo[succsotherp1].node() else: - msg = _(b"skipping %s: have a different parent than %s " - b"(not handled yet)\n") % (divergent, other) - hint = _(b"| %(d)s, %(o)s are not based on the same changeset.\n" - b"| With the current state of its implementation,\n" - b"| evolve does not work in that case.\n" - b"| rebase one of them next to the other and run\n" - b"| this command again.\n" - b"| - either: hg rebase --dest 'p1(%(d)s)' -r %(o)s\n" - b"| - or: hg rebase --dest 'p1(%(o)s)' -r %(d)s\n" - ) % {b'd': divergent, b'o': other} - ui.write_err(msg) - ui.write_err(hint) - return (False, b".") + # the nullrev has to be handled specially because -1 is overloaded to both + # mean nullrev (this meaning is used for the result of changectx.rev(), as + # called above) and the tipmost revision (this meaning is used for the %d + # format specifier, as used below) + if nodemod.nullrev in (succsotherp1, succsdivp1): + # nullrev is the only possible ancestor if succsotherp1 or succsdivp1 is nullrev + gca = [nodemod.nullrev] + else: + gca = repo.revs(b"ancestor(%d, %d)" % (succsotherp1, succsdivp1)) + if succsotherp1 in gca and succsdivp1 in gca: + # both are not on the same parent but have same parents's succs. + if otheronly and divonly: + # case: we have visible csets on both side diverging from + # tca of "divergent" and "other". We still need to decide what + # to do in this case + pass + if otheronly: + resolutionparent = succsotherp1 + elif divonly: + pass + else: + # no extra cset on either side + pass + elif succsotherp1 in gca and succsdivp1 not in gca: + pass + elif succsdivp1 in gca and succsotherp1 not in gca: + resolutionparent = succsotherp1 + else: + msg = _(b"skipping %s: have a different parent than %s " + b"(not handled yet)\n") % (divergent, other) + hint = _(b"| %(d)s, %(o)s are not based on the same changeset.\n" + b"| With the current state of its implementation,\n" + b"| evolve does not work in that case.\n" + b"| rebase one of them next to the other and run\n" + b"| this command again.\n" + b"| - either: hg rebase --dest 'p1(%(d)s)' -r %(o)s\n" + b"| - or: hg rebase --dest 'p1(%(o)s)' -r %(d)s\n" + ) % {b'd': divergent, b'o': other} + ui.write_err(msg) + ui.write_err(hint) + return (False, b".") return (True, resolutionparent) def _relocatedivergent(repo, orig, dest, evolvestate): @@ -421,7 +433,7 @@ with state.saver(evolvestate, {b'current': orig.node()}), configoverride: return _relocate(repo, orig, dest, evolvestate, keepbranch=True) -def _solvedivergent(ui, repo, divergent, evolvestate, displayer, dryrun=False, +def _solvedivergent(ui, repo, divergent, evolvestate, display, dryrun=False, confirm=False, progresscb=None): """tries to solve content-divergence of a changeset @@ -474,8 +486,9 @@ evolvestate[b'old-divergent'] = None # setup everything before merging two content-divergent csets - picked, resolutionparent = _pickresolutionparent(ui, repo, divergent, - other, evolvestate) + picked, resolutionparent = _pickresolutionparent(ui, repo, divergent, other, + base, evolvestate) + resolutionparent = repo[resolutionparent].node() if not picked: return (False, b".") evolvestate[b'resolutionparent'] = resolutionparent @@ -487,11 +500,11 @@ if not ui.quiet or confirm: ui.write(_(b'merge:'), label=b'evolve.operation') - displayer.show(divergent) + display(divergent) ui.write(_(b'with: ')) - displayer.show(other) + display(other) ui.write(_(b'base: ')) - displayer.show(base) + display(base) if confirm and ui.prompt(_(b'perform evolve? [Ny]'), b'n') != b'y': raise error.Abort(_(b'evolve aborted by user')) if dryrun: @@ -958,8 +971,6 @@ raise error.InterventionRequired(_(b"unresolved merge conflicts"), hint=hint) - if commitmsg is None: - commitmsg = orig.description() extra = dict(orig.extra()) if b'branch' in extra: del extra[b'branch'] @@ -1714,8 +1725,8 @@ oldid = repo[b'.'].node() startctx = repo[b'.'] dryrunopt = opts.get('dry_run', False) - displayer = logcmdutil.changesetdisplayer(ui, repo, - {b'template': shorttemplate}) + display = compat.format_changeset_summary_fn(ui, repo, b'evolve', + shorttemplate) try: ctx = repo[utility._singlesuccessor(repo, repo[b'.'])] except utility.MultipleSuccessorsError as exc: @@ -1723,12 +1734,12 @@ b' successors:\n')) for ln in exc.successorssets: for n in ln: - displayer.show(repo[n]) + display(repo[n]) return 2 ui.status(_(b'update:')) if not ui.quiet: - displayer.show(ctx) + display(ctx) if dryrunopt: return 0
--- a/hgext3rd/evolve/headchecking.py Wed Dec 30 11:01:37 2020 -0800 +++ b/hgext3rd/evolve/headchecking.py Tue Jan 26 17:14:29 2021 +0100 @@ -140,12 +140,14 @@ while old_heads: rh = old_heads.pop() ctx = repo[rh] - current_name = _get_branch_name(ctx) + # run this check early to skip the evaluation of the whole branch if not ctx.obsolete(): new_heads.append(rh) continue + current_name = _get_branch_name(ctx) + # Get all revs/nodes on the branch exclusive to this head # (already filtered heads are "ignored")) sections_revs = repo.revs(
--- a/hgext3rd/evolve/metadata.py Wed Dec 30 11:01:37 2020 -0800 +++ b/hgext3rd/evolve/metadata.py Tue Jan 26 17:14:29 2021 +0100 @@ -5,7 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. -__version__ = b'10.1.1.dev' +__version__ = b'10.2.0.dev' testedwith = b'4.6.2 4.7 4.8 4.9 5.0 5.1 5.2 5.3 5.4 5.5 5.6' minimumhgversion = b'4.6' buglink = b'https://bz.mercurial-scm.org/'
--- a/hgext3rd/topic/__init__.py Wed Dec 30 11:01:37 2020 -0800 +++ b/hgext3rd/topic/__init__.py Tue Jan 26 17:14:29 2021 +0100 @@ -232,7 +232,7 @@ b'topic.active': b'green', } -__version__ = b'0.20.1.dev' +__version__ = b'0.21.0.dev' testedwith = b'4.6.2 4.7 4.8 4.9 5.0 5.1 5.2 5.3 5.4 5.5 5.6' minimumhgversion = b'4.6' @@ -294,7 +294,16 @@ def _contexttopic(self, force=False): if not (force or self.mutable()): return b'' - return self.extra().get(constants.extrakey, b'') + cache = getattr(self._repo, '_topiccache', None) + # topic loaded, but not enabled (eg: multiple repo in the same process) + if cache is None: + return b'' + topic = cache.get(self.rev()) + if topic is None: + topic = self.extra().get(constants.extrakey, b'') + self._repo._topiccache[self.rev()] = topic + return topic + context.basectx.topic = _contexttopic def _contexttopicidx(self): @@ -362,6 +371,10 @@ return [t] return [] +def wrap_summary(orig, ui, repo, *args, **kwargs): + with discovery.override_context_branch(repo) as repo: + return orig(ui, repo, *args, **kwargs) + def uisetup(ui): destination.modsetup(ui) discovery.modsetup(ui) @@ -397,6 +410,8 @@ # plug into logic for this into mergemod.update(). extensions.wrapcommand(commands.table, b'update', checkt0) + extensions.wrapcommand(commands.table, b'summary', wrap_summary) + try: evolve = extensions.find(b'evolve') extensions.wrapfunction(evolve.rewriteutil, "presplitupdate", @@ -487,6 +502,10 @@ del ctx.extra()[constants.extrakey] return super(topicrepo, self).commitctx(ctx, *args, **kwargs) + @util.propertycache + def _topiccache(self): + return {} + @property def topics(self): if self._topics is not None: @@ -516,8 +535,8 @@ def branchheads(self, branch=None, start=None, closed=False): if branch is None: branch = self[None].branch() - if self.currenttopic: - branch = b"%s:%s" % (branch, self.currenttopic) + if self.currenttopic: + branch = b"%s:%s" % (branch, self.currenttopic) return super(topicrepo, self).branchheads(branch=branch, start=start, closed=closed)
--- a/hgext3rd/topic/discovery.py Wed Dec 30 11:01:37 2020 -0800 +++ b/hgext3rd/topic/discovery.py Tue Jan 26 17:14:29 2021 +0100 @@ -1,6 +1,7 @@ from __future__ import absolute_import import collections +import contextlib import weakref from mercurial.i18n import _ @@ -20,6 +21,80 @@ from mercurial import wireprotov1server +@contextlib.contextmanager +def override_context_branch(repo, publishedset=()): + unfi = repo.unfiltered() + + class repocls(unfi.__class__): + # awful hack to see branch as "branch:topic" + def __getitem__(self, key): + ctx = super(repocls, self).__getitem__(key) + oldbranch = ctx.branch + oldparents = ctx.parents + rev = ctx.rev() + + def branch(): + branch = oldbranch() + if rev in publishedset: + return branch + topic = ctx.topic() + if topic: + branch = b"%s:%s" % (branch, topic) + return branch + + def parents(): + parents = oldparents() + for p in parents: + if getattr(p, '_topic_ext_branch_hack', False): + continue + pbranch = p.branch + + def branch(): + branch = pbranch() + if p.rev() in publishedset: + return branch + topic = p.topic() + if topic: + branch = b"%s:%s" % (branch, topic) + return branch + p.branch = branch + p._topic_ext_branch_hack = True + return parents + + ctx.branch = branch + ctx.parents = parents + return ctx + + def revbranchcache(self): + rbc = super(repocls, self).revbranchcache() + localchangelog = self.changelog + + def branchinfo(rev, changelog=None): + if changelog is None: + changelog = localchangelog + branch, close = changelog.branchinfo(rev) + if rev in publishedset: + return branch, close + topic = unfi[rev].topic() + if topic: + branch = b"%s:%s" % (branch, topic) + return branch, close + + rbc.branchinfo = branchinfo + return rbc + + oldrepocls = unfi.__class__ + try: + unfi.__class__ = repocls + if repo.filtername is not None: + repo = unfi.filtered(repo.filtername) + else: + repo = unfi + yield repo + finally: + unfi.__class__ = oldrepocls + + def _headssummary(orig, pushop, *args, **kwargs): repo = pushop.repo.unfiltered() remote = pushop.remote @@ -61,63 +136,24 @@ heads.sort() return result - class repocls(repo.__class__): - # awful hack to see branch as "branch:topic" - def __getitem__(self, key): - ctx = super(repocls, self).__getitem__(key) - oldbranch = ctx.branch - rev = ctx.rev() - - def branch(): - branch = oldbranch() - if rev in publishedset: - return branch - topic = ctx.topic() - if topic: - branch = b"%s:%s" % (branch, topic) - return branch - - ctx.branch = branch - return ctx - - def revbranchcache(self): - rbc = super(repocls, self).revbranchcache() - localchangelog = self.changelog - - def branchinfo(rev, changelog=None): - if changelog is None: - changelog = localchangelog - branch, close = changelog.branchinfo(rev) - if rev in publishedset: - return branch, close - topic = repo[rev].topic() - if topic: - branch = b"%s:%s" % (branch, topic) - return branch, close - - rbc.branchinfo = branchinfo - return rbc - - oldrepocls = repo.__class__ - try: - repo.__class__ = repocls - if remotebranchmap is not None: - remote.branchmap = remotebranchmap - unxx = repo.filtered(b'unfiltered-topic') - repo.unfiltered = lambda: unxx - pushop.repo = repo - summary = orig(pushop) - for key, value in summary.items(): - if b':' in key: # This is a topic - if value[0] is None and value[1]: - summary[key] = ([value[1][0]], ) + value[1:] - return summary - finally: - if r'unfiltered' in vars(repo): - del repo.unfiltered - repo.__class__ = oldrepocls - if remotebranchmap is not None: - remote.branchmap = origremotebranchmap + with override_context_branch(repo, publishedset=publishedset): + try: + if remotebranchmap is not None: + remote.branchmap = remotebranchmap + unxx = repo.filtered(b'unfiltered-topic') + repo.unfiltered = lambda: unxx + pushop.repo = repo + summary = orig(pushop) + for key, value in summary.items(): + if b':' in key: # This is a topic + if value[0] is None and value[1]: + summary[key] = ([value[1][0]], ) + value[1:] + return summary + finally: + if r'unfiltered' in vars(repo): + del repo.unfiltered + if remotebranchmap is not None: + remote.branchmap = origremotebranchmap def wireprotobranchmap(orig, repo, proto): if not common.hastopicext(repo):
--- a/hgext3rd/topic/evolvebits.py Wed Dec 30 11:01:37 2020 -0800 +++ b/hgext3rd/topic/evolvebits.py Tue Jan 26 17:14:29 2021 +0100 @@ -6,41 +6,6 @@ # Copied from evolve 081605c2e9b6 -def _orderrevs(repo, revs): - """Compute an ordering to solve instability for the given revs - - revs is a list of unstable revisions. - - Returns the same revisions ordered to solve their instability from the - bottom to the top of the stack that the stabilization process will produce - eventually. - - This ensures the minimal number of stabilizations, as we can stabilize each - revision on its final stabilized destination. - """ - # Step 1: Build the dependency graph - dependencies, rdependencies = builddependencies(repo, revs) - # Step 2: Build the ordering - # Remove the revisions with no dependency(A) and add them to the ordering. - # Removing these revisions leads to new revisions with no dependency (the - # one depending on A) that we can remove from the dependency graph and add - # to the ordering. We progress in a similar fashion until the ordering is - # built - solvablerevs = [r for r in sorted(dependencies.keys()) - if not dependencies[r]] - ordering = [] - while solvablerevs: - rev = solvablerevs.pop() - for dependent in rdependencies[rev]: - dependencies[dependent].remove(rev) - if not dependencies[dependent]: - solvablerevs.append(dependent) - del dependencies[rev] - ordering.append(rev) - - ordering.extend(sorted(dependencies)) - return ordering - def builddependencies(repo, revs): """returns dependency graphs giving an order to solve instability of revs (see _orderrevs for more information on usage)"""
--- a/tests/test-evolve-content-divergent-corner-cases.t Wed Dec 30 11:01:37 2020 -0800 +++ b/tests/test-evolve-content-divergent-corner-cases.t Tue Jan 26 17:14:29 2021 +0100 @@ -344,22 +344,53 @@ o 0:9092f1db7931 added a () [default] draft +In this case, we have two divergent changeset: +- one did not changed parent +- the other did changed parent + +So we can do a 3 way merges merges. on one side we have changes (the parent +change) and on the other one we don't, we should apply the change. + + $ hg evolve --list --rev 'contentdivergent()' + ff6f7cd76a7c: updated e + orphan: 9150fe93bec6 (obsolete parent) + content-divergent: de4ea3103326 (draft) (precursor 8d71eadcc9df) + + de4ea3103326: updated e + content-divergent: ff6f7cd76a7c (draft) (precursor 8d71eadcc9df) + + + $ hg glog --hidden --rev '::(ff6f7cd76a7c+de4ea3103326+8d71eadcc9df)' + @ 6:de4ea3103326 updated e + | () [default] draft + | * 5:ff6f7cd76a7c updated e + | | () [default] draft + | | x 4:8d71eadcc9df added e + | |/ () [default] draft + | x 3:9150fe93bec6 added d + | | () [default] draft + | o 2:155349b645be added c + |/ () [default] draft + o 1:5f6d8a4bf34a added b + | () [default] draft + o 0:9092f1db7931 added a + () [default] draft + $ hg evolve --content-divergent --any --update --config ui.interactive=true <<EOF > c > EOF merge:[5] updated e with: [6] updated e base: [4] added e - rebasing "divergent" content-divergent changeset ff6f7cd76a7c on 155349b645be - rebasing "other" content-divergent changeset de4ea3103326 on 155349b645be + rebasing "divergent" content-divergent changeset ff6f7cd76a7c on 5f6d8a4bf34a file 'd' was deleted in local but was modified in other. You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved. What do you want to do? c 0 files updated, 1 files merged, 0 files removed, 0 files unresolved - working directory is now at 51ee71efed61 + working directory is now at 050a5d9ba60d $ hg glog -l1 - @ 9:51ee71efed61 updated e + @ 8:050a5d9ba60d updated e | () [default] draft ~ @@ -367,21 +398,17 @@ 8d71eadcc9dfb21a924e75a5796c2f011bdc55a4 ff6f7cd76a7c97d938e8fe87f0fc816b66929435 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '9', 'operation': 'amend', 'user': 'test'} 8d71eadcc9dfb21a924e75a5796c2f011bdc55a4 de4ea3103326293994c634101e780724346ee89f 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'operation': 'prune', 'user': 'test'} 9150fe93bec603cd88d05cda9f6ff13420cb53e9 0 {155349b645beebee15325a9a22dd0c9ef8fbbbd3} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'prune', 'user': 'test'} - ff6f7cd76a7c97d938e8fe87f0fc816b66929435 0ceb21ca2557a61433f097e4d64024e37cae2c10 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'} - de4ea3103326293994c634101e780724346ee89f a2465d1d56d1aee8ed90d2292978456d2be6f7b9 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'} - 0ceb21ca2557a61433f097e4d64024e37cae2c10 51ee71efed6170064a7155a9a35e56af0292a203 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'evolve', 'user': 'test'} - a2465d1d56d1aee8ed90d2292978456d2be6f7b9 51ee71efed6170064a7155a9a35e56af0292a203 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'evolve', 'user': 'test'} + ff6f7cd76a7c97d938e8fe87f0fc816b66929435 8883bfaa2d02c8c54b6278551324187019862599 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'} + 8883bfaa2d02c8c54b6278551324187019862599 050a5d9ba60d423b4401803509457515297edcf4 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'evolve', 'user': 'test'} + de4ea3103326293994c634101e780724346ee89f 050a5d9ba60d423b4401803509457515297edcf4 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'evolve', 'user': 'test'} $ hg obslog --all - @ 51ee71efed61 (9) updated e - |\ amended(content) from 0ceb21ca2557 using evolve by test (Thu Jan 01 00:00:00 1970 +0000) - | | rewritten from a2465d1d56d1 using evolve by test (Thu Jan 01 00:00:00 1970 +0000) + @ 050a5d9ba60d (8) updated e + |\ amended(content) from 8883bfaa2d02 using evolve by test (Thu Jan 01 00:00:00 1970 +0000) + | | rewritten from de4ea3103326 using evolve by test (Thu Jan 01 00:00:00 1970 +0000) | | - x | 0ceb21ca2557 (7) updated e + x | 8883bfaa2d02 (7) updated e | | rebased(parent) from ff6f7cd76a7c using evolve by test (Thu Jan 01 00:00:00 1970 +0000) | | - | x a2465d1d56d1 (8) updated e - | | rebased(parent) from de4ea3103326 using evolve by test (Thu Jan 01 00:00:00 1970 +0000) - | | | x de4ea3103326 (6) updated e | | rewritten(description, parent, content) from 8d71eadcc9df using prune by test (Thu Jan 01 00:00:00 1970 +0000) | |
--- a/tests/test-evolve-content-divergent-interrupted.t Wed Dec 30 11:01:37 2020 -0800 +++ b/tests/test-evolve-content-divergent-interrupted.t Tue Jan 26 17:14:29 2021 +0100 @@ -279,7 +279,7 @@ $ hg add c $ hg amend - $ hg up --hidden c41c793e0ef1 + $ hg up --hidden 'min(desc("added d"))' 2 files updated, 0 files merged, 0 files removed, 0 files unresolved updated to hidden changeset c41c793e0ef1 (hidden revision 'c41c793e0ef1' was rewritten as: 69bdd23a9b0d) @@ -307,9 +307,11 @@ merge:[6] added d with: [7] added d base: [4] added d - rebasing "divergent" content-divergent changeset 69bdd23a9b0d on ca1b80f7960a - merging c - warning: conflicts while merging c! (edit, then use 'hg resolve --mark') + rebasing "other" content-divergent changeset e49523854bc8 on c7586e2a9264 + file 'c' was deleted in other but was modified in local. + You can use (c)hanged version, (d)elete, or leave (u)nresolved. + What do you want to do? u + 1 files updated, 0 files merged, 0 files removed, 1 files unresolved unresolved merge conflicts (see 'hg help evolve.interrupted') [240] @@ -336,7 +338,7 @@ is parent of one of the divergents and merging divergent leads to conflicts --------------------------------------------------------------------------------- - $ hg up 69bdd23a9b0d + $ hg up 'min(desc("added d"))' 2 files updated, 0 files merged, 1 files removed, 0 files unresolved $ hg rm c $ echo wat > d @@ -360,7 +362,7 @@ merge:[7] added d with: [8] added d base: [4] added d - rebasing "other" content-divergent changeset 33e4442acf98 on ca1b80f7960a + rebasing "divergent" content-divergent changeset e49523854bc8 on c7586e2a9264 merging d warning: conflicts while merging d! (edit, then use 'hg resolve --mark') 0 files updated, 0 files merged, 0 files removed, 1 files unresolved @@ -423,7 +425,7 @@ $ echo bar > d $ hg amend - $ hg up c41c793e0ef1 --hidden + $ hg up 'min(desc("added d"))' --hidden 1 files updated, 0 files merged, 0 files removed, 0 files unresolved updated to hidden changeset c41c793e0ef1 (hidden revision 'c41c793e0ef1' was rewritten as: e49523854bc8) @@ -505,7 +507,7 @@ merge:[5] added d with: [7] added d base: [4] added d - rebasing "other" content-divergent changeset 517d4375cb72 on ca1b80f7960a + rebasing "divergent" content-divergent changeset e49523854bc8 on c7586e2a9264 merging d warning: conflicts while merging d! (edit, then use 'hg resolve --mark') 0 files updated, 0 files merged, 0 files removed, 1 files unresolved @@ -515,12 +517,12 @@ $ hg evolve --stop stopped the interrupted evolve - working directory is now at 517d4375cb72 + working directory is now at e49523854bc8 $ hg glog - @ 7:517d4375cb72 added d + * 7:517d4375cb72 added d | () draft - | * 5:e49523854bc8 added d + | @ 5:e49523854bc8 added d | | () draft | o 3:ca1b80f7960a added c | | () draft @@ -537,15 +539,16 @@ $ echo babar > c $ hg add c + c already tracked! $ hg amend $ hg glog - @ 8:8fd1c4bd144c added d + @ 8:2d664a4ab749 added d | () draft - | * 5:e49523854bc8 added d + | * 7:517d4375cb72 added d | | () draft - | o 3:ca1b80f7960a added c + o | 3:ca1b80f7960a added c | | () draft - | o 2:b1661037fa25 added b + o | 2:b1661037fa25 added b |/ () draft o 1:c7586e2a9264 added a | () draft @@ -553,45 +556,49 @@ () draft $ hg evolve --content-divergent - merge:[5] added d + merge:[7] added d with: [8] added d base: [4] added d - rebasing "other" content-divergent changeset 8fd1c4bd144c on ca1b80f7960a - merging c - warning: conflicts while merging c! (edit, then use 'hg resolve --mark') + rebasing "other" content-divergent changeset 2d664a4ab749 on c7586e2a9264 + file 'c' was deleted in local but was modified in other. + You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved. + What do you want to do? u + merging d + warning: conflicts while merging d! (edit, then use 'hg resolve --mark') + 0 files updated, 0 files merged, 0 files removed, 2 files unresolved unresolved merge conflicts (see 'hg help evolve.interrupted') [240] $ hg diff - diff -r ca1b80f7960a c - --- a/c Thu Jan 01 00:00:00 1970 +0000 + diff -r 517d4375cb72 c + --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/c Thu Jan 01 00:00:00 1970 +0000 + @@ -0,0 +1,1 @@ + +babar + diff -r 517d4375cb72 d + --- a/d Thu Jan 01 00:00:00 1970 +0000 + +++ b/d Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +1,5 @@ - +<<<<<<< destination: ca1b80f7960a - test: added c - foo + +<<<<<<< local: 517d4375cb72 - test: added d + foobar +======= - +babar - +>>>>>>> evolving: 8fd1c4bd144c - test: added d - diff -r ca1b80f7960a d - --- /dev/null Thu Jan 01 00:00:00 1970 +0000 - +++ b/d Thu Jan 01 00:00:00 1970 +0000 - @@ -0,0 +1,1 @@ - +foobar + +bar + +>>>>>>> other: e315463d94bd - test: added d $ hg evolve --stop stopped the interrupted evolve - working directory is now at ca1b80f7960a + working directory is now at 2d664a4ab749 XXX: we should have preserved the wdir to be at rev 8 $ hg glog - * 8:8fd1c4bd144c added d + @ 8:2d664a4ab749 added d | () draft - | * 5:e49523854bc8 added d + | * 7:517d4375cb72 added d | | () draft - | @ 3:ca1b80f7960a added c + o | 3:ca1b80f7960a added c | | () draft - | o 2:b1661037fa25 added b + o | 2:b1661037fa25 added b |/ () draft o 1:c7586e2a9264 added a | () draft
--- a/tests/test-evolve-content-divergent-relocation.t Wed Dec 30 11:01:37 2020 -0800 +++ b/tests/test-evolve-content-divergent-relocation.t Tue Jan 26 17:14:29 2021 +0100 @@ -64,25 +64,52 @@ o 0:8fa14d15e168 added hgignore () [default] draft +In this case, we have two divergent changeset: +- one did not changed parent +- the other did changed parent + +So we can do a 3 way merges merges. on one side we have changes (the parent +change) and on the other one we don't, we should apply the change. + + $ hg evolve --list --rev 'contentdivergent()' + 7ed0642d644b: added b + content-divergent: da4b96f4a8d6 (draft) (precursor b1661037fa25) + + da4b96f4a8d6: added b + content-divergent: 7ed0642d644b (draft) (precursor b1661037fa25) + + + $ hg glog --hidden --rev '::(7ed0642d644b+da4b96f4a8d6+b1661037fa25)' + * 6:da4b96f4a8d6 added b + | () [default] draft + | @ 5:7ed0642d644b added b + | | () [default] draft + | | x 2:b1661037fa25 added b + | |/ () [default] draft + | o 1:c7586e2a9264 added a + |/ () [default] draft + o 0:8fa14d15e168 added hgignore + () [default] draft + $ hg evolve --content-divergent merge:[5] added b with: [6] added b base: [2] added b - rebasing "other" content-divergent changeset da4b96f4a8d6 on c7586e2a9264 + rebasing "divergent" content-divergent changeset 7ed0642d644b on 8fa14d15e168 0 files updated, 0 files merged, 0 files removed, 0 files unresolved - working directory is now at e7fdc662d630 + working directory is now at c5862ade0278 $ hg glog - @ 8:e7fdc662d630 added b + @ 8:c5862ade0278 added b | () [default] draft | * 4:c41c793e0ef1 added d | | () [default] draft | * 3:ca1b80f7960a added c | | () [default] draft | x 2:b1661037fa25 added b + | | () [default] draft + | o 1:c7586e2a9264 added a |/ () [default] draft - o 1:c7586e2a9264 added a - | () [default] draft o 0:8fa14d15e168 added hgignore () [default] draft @@ -91,11 +118,11 @@ # User test # Date 0 0 # Thu Jan 01 00:00:00 1970 +0000 - # Node ID e7fdc662d6305fee2908c3f1630e0b20d6f4689a - # Parent c7586e2a92645e473645847a7b69a6dc52be4276 + # Node ID c5862ade02783a99f46082f4f0483c449fc4c3f2 + # Parent 8fa14d15e1684a9720b1b065aba9d5ea51024cb2 added b - diff -r c7586e2a9264 -r e7fdc662d630 b + diff -r 8fa14d15e168 -r c5862ade0278 b --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/b Thu Jan 01 00:00:00 1970 +0000 @@ -0,0 +1,1 @@ @@ -104,22 +131,22 @@ $ hg debugobsolete b1661037fa25511d0b7ccddf405e336f9d7d3424 7ed0642d644bb9ad93d252dd9ffe7b4729febe48 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'} b1661037fa25511d0b7ccddf405e336f9d7d3424 da4b96f4a8d610a85b225583138f681d67e275dd 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} - da4b96f4a8d610a85b225583138f681d67e275dd 11f849d7159fa30a63dbbc1a6d251a8d996baeb5 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'} - 7ed0642d644bb9ad93d252dd9ffe7b4729febe48 e7fdc662d6305fee2908c3f1630e0b20d6f4689a 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'evolve', 'user': 'test'} - 11f849d7159fa30a63dbbc1a6d251a8d996baeb5 e7fdc662d6305fee2908c3f1630e0b20d6f4689a 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'evolve', 'user': 'test'} + 7ed0642d644bb9ad93d252dd9ffe7b4729febe48 2ec52f302b0f0ef30979124e92f1d9f2a26cedf8 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'} + 2ec52f302b0f0ef30979124e92f1d9f2a26cedf8 c5862ade02783a99f46082f4f0483c449fc4c3f2 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'evolve', 'user': 'test'} + da4b96f4a8d610a85b225583138f681d67e275dd c5862ade02783a99f46082f4f0483c449fc4c3f2 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'evolve', 'user': 'test'} $ hg obslog --all - @ e7fdc662d630 (8) added b - |\ amended(content) from 11f849d7159f using evolve by test (Thu Jan 01 00:00:00 1970 +0000) - | | rewritten from 7ed0642d644b using evolve by test (Thu Jan 01 00:00:00 1970 +0000) + @ c5862ade0278 (8) added b + |\ rewritten from 2ec52f302b0f using evolve by test (Thu Jan 01 00:00:00 1970 +0000) + | | amended(content) from da4b96f4a8d6 using evolve by test (Thu Jan 01 00:00:00 1970 +0000) | | - x | 11f849d7159f (7) added b - | | rebased(parent) from da4b96f4a8d6 using evolve by test (Thu Jan 01 00:00:00 1970 +0000) + x | 2ec52f302b0f (7) added b + | | rebased(parent) from 7ed0642d644b using evolve by test (Thu Jan 01 00:00:00 1970 +0000) | | - | x 7ed0642d644b (5) added b - | | amended(content) from b1661037fa25 using amend by test (Thu Jan 01 00:00:00 1970 +0000) + | x da4b96f4a8d6 (6) added b + | | rebased(parent) from b1661037fa25 using rebase by test (Thu Jan 01 00:00:00 1970 +0000) | | - x | da4b96f4a8d6 (6) added b - |/ rebased(parent) from b1661037fa25 using rebase by test (Thu Jan 01 00:00:00 1970 +0000) + x | 7ed0642d644b (5) added b + |/ amended(content) from b1661037fa25 using amend by test (Thu Jan 01 00:00:00 1970 +0000) | x b1661037fa25 (2) added b @@ -131,14 +158,14 @@ atop:[8] added b move:[4] added d $ hg glog - o 10:be5a8b9faa8a added d + o 10:25cb1649b463 added d | () [default] draft - o 9:e2ce33033e42 added c + o 9:81ead2f9fc61 added c | () [default] draft - @ 8:e7fdc662d630 added b + @ 8:c5862ade0278 added b | () [default] draft - o 1:c7586e2a9264 added a - | () [default] draft + | o 1:c7586e2a9264 added a + |/ () [default] draft o 0:8fa14d15e168 added hgignore () [default] draft @@ -147,7 +174,7 @@ $ echo x > x $ hg ci -Aqm "added x" $ hg glog -r . - @ 11:801b5920c7ea added x + @ 11:f220d694b3a6 added x | () [default] draft ~ @@ -159,27 +186,27 @@ $ hg up 'predecessors(.)' --hidden 1 files updated, 0 files merged, 0 files removed, 0 files unresolved - updated to hidden changeset 801b5920c7ea - (hidden revision '801b5920c7ea' was rewritten as: 5cf74a13db18) - working directory parent is obsolete! (801b5920c7ea) - (use 'hg evolve' to update to its successor: 5cf74a13db18) + updated to hidden changeset f220d694b3a6 + (hidden revision 'f220d694b3a6' was rewritten as: 91939f44a1fe) + working directory parent is obsolete! (f220d694b3a6) + (use 'hg evolve' to update to its successor: 91939f44a1fe) $ hg rebase -r . -d 'desc("added d")' --config experimental.evolution.allowdivergence=True - rebasing 11:801b5920c7ea "added x" + rebasing 11:f220d694b3a6 "added x" 2 new content-divergent changesets $ hg glog - @ 13:45e15d6e88f5 added x + @ 13:7af6be6736c0 added x | () [default] draft - | * 12:5cf74a13db18 added foo to x + | * 12:91939f44a1fe added foo to x | | () [bar] draft - o | 10:be5a8b9faa8a added d + o | 10:25cb1649b463 added d | | () [default] draft - o | 9:e2ce33033e42 added c + o | 9:81ead2f9fc61 added c |/ () [default] draft - o 8:e7fdc662d630 added b + o 8:c5862ade0278 added b | () [default] draft - o 1:c7586e2a9264 added a - | () [default] draft + | o 1:c7586e2a9264 added a + |/ () [default] draft o 0:8fa14d15e168 added hgignore () [default] draft @@ -187,9 +214,9 @@ merge:[12] added foo to x with: [13] added x base: [11] added x - rebasing "divergent" content-divergent changeset 5cf74a13db18 on be5a8b9faa8a + rebasing "divergent" content-divergent changeset 91939f44a1fe on 25cb1649b463 0 files updated, 0 files merged, 0 files removed, 0 files unresolved - working directory is now at 618f8bd245a8 + working directory is now at 3c4c7420a968 $ hg exp # HG changeset patch @@ -197,11 +224,11 @@ # Date 0 0 # Thu Jan 01 00:00:00 1970 +0000 # Branch bar - # Node ID 618f8bd245a8d1892954eb49a88a6ec5e500a5b5 - # Parent be5a8b9faa8af54f115aa168a2c8564acb40c37d + # Node ID 3c4c7420a968a3f76d61fa16c3af9abe115f07b6 + # Parent 25cb1649b46389f8e6e77c3796f01b37996b8fcd added foo to x - diff -r be5a8b9faa8a -r 618f8bd245a8 x + diff -r 25cb1649b463 -r 3c4c7420a968 x --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/x Thu Jan 01 00:00:00 1970 +0000 @@ -0,0 +1,1 @@ @@ -210,47 +237,47 @@ The above `hg exp` and the following log call demonstrates that message, content and branch change is preserved in case of relocation $ hg glog - @ 15:618f8bd245a8 added foo to x + @ 15:3c4c7420a968 added foo to x | () [bar] draft - o 10:be5a8b9faa8a added d + o 10:25cb1649b463 added d | () [default] draft - o 9:e2ce33033e42 added c + o 9:81ead2f9fc61 added c | () [default] draft - o 8:e7fdc662d630 added b + o 8:c5862ade0278 added b | () [default] draft - o 1:c7586e2a9264 added a - | () [default] draft + | o 1:c7586e2a9264 added a + |/ () [default] draft o 0:8fa14d15e168 added hgignore () [default] draft $ hg debugobsolete b1661037fa25511d0b7ccddf405e336f9d7d3424 7ed0642d644bb9ad93d252dd9ffe7b4729febe48 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'} b1661037fa25511d0b7ccddf405e336f9d7d3424 da4b96f4a8d610a85b225583138f681d67e275dd 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} - da4b96f4a8d610a85b225583138f681d67e275dd 11f849d7159fa30a63dbbc1a6d251a8d996baeb5 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'} - 7ed0642d644bb9ad93d252dd9ffe7b4729febe48 e7fdc662d6305fee2908c3f1630e0b20d6f4689a 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'evolve', 'user': 'test'} - 11f849d7159fa30a63dbbc1a6d251a8d996baeb5 e7fdc662d6305fee2908c3f1630e0b20d6f4689a 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'evolve', 'user': 'test'} - ca1b80f7960aae2306287bab52b4090c59af8c29 e2ce33033e42db2e61a5f71c6dfb52a33efeaf6a 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'} - c41c793e0ef1ddb463e85ea9491e377d01127ba2 be5a8b9faa8af54f115aa168a2c8564acb40c37d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'} - 801b5920c7ea8d4ebdbc9cfc1e79e665dea2f211 5cf74a13db180e33dc2df8cd2aa70b21252a2a64 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '73', 'operation': 'amend', 'user': 'test'} - 801b5920c7ea8d4ebdbc9cfc1e79e665dea2f211 45e15d6e88f5bd23ba360dff0c7591eca2d99f43 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} - 5cf74a13db180e33dc2df8cd2aa70b21252a2a64 911c21adca136894a2b35f0a58fae7ee94fa5e61 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'} - 911c21adca136894a2b35f0a58fae7ee94fa5e61 618f8bd245a8d1892954eb49a88a6ec5e500a5b5 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'evolve', 'user': 'test'} - 45e15d6e88f5bd23ba360dff0c7591eca2d99f43 618f8bd245a8d1892954eb49a88a6ec5e500a5b5 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '73', 'operation': 'evolve', 'user': 'test'} + 7ed0642d644bb9ad93d252dd9ffe7b4729febe48 2ec52f302b0f0ef30979124e92f1d9f2a26cedf8 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'} + 2ec52f302b0f0ef30979124e92f1d9f2a26cedf8 c5862ade02783a99f46082f4f0483c449fc4c3f2 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'evolve', 'user': 'test'} + da4b96f4a8d610a85b225583138f681d67e275dd c5862ade02783a99f46082f4f0483c449fc4c3f2 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'evolve', 'user': 'test'} + ca1b80f7960aae2306287bab52b4090c59af8c29 81ead2f9fc6156de69d12b7b5df71c34ab8b9c10 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'} + c41c793e0ef1ddb463e85ea9491e377d01127ba2 25cb1649b46389f8e6e77c3796f01b37996b8fcd 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'} + f220d694b3a605e236b4b34ef97d3cc6959efb89 91939f44a1fe6d865ec791122014971dfff75129 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '73', 'operation': 'amend', 'user': 'test'} + f220d694b3a605e236b4b34ef97d3cc6959efb89 7af6be6736c0aebd226820373190e636fe9f16e9 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} + 91939f44a1fe6d865ec791122014971dfff75129 c38f731f5ae01e417ceeea09f046febf4536d356 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'} + c38f731f5ae01e417ceeea09f046febf4536d356 3c4c7420a968a3f76d61fa16c3af9abe115f07b6 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'evolve', 'user': 'test'} + 7af6be6736c0aebd226820373190e636fe9f16e9 3c4c7420a968a3f76d61fa16c3af9abe115f07b6 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '73', 'operation': 'evolve', 'user': 'test'} $ hg obslog --all - @ 618f8bd245a8 (15) added foo to x - |\ rewritten(description, branch, content) from 45e15d6e88f5 using evolve by test (Thu Jan 01 00:00:00 1970 +0000) - | | rewritten from 911c21adca13 using evolve by test (Thu Jan 01 00:00:00 1970 +0000) + @ 3c4c7420a968 (15) added foo to x + |\ rewritten(description, branch, content) from 7af6be6736c0 using evolve by test (Thu Jan 01 00:00:00 1970 +0000) + | | rewritten from c38f731f5ae0 using evolve by test (Thu Jan 01 00:00:00 1970 +0000) | | - x | 45e15d6e88f5 (13) added x - | | rebased(parent) from 801b5920c7ea using rebase by test (Thu Jan 01 00:00:00 1970 +0000) + x | 7af6be6736c0 (13) added x + | | rebased(parent) from f220d694b3a6 using rebase by test (Thu Jan 01 00:00:00 1970 +0000) | | - | x 911c21adca13 (14) added foo to x - | | rebased(parent) from 5cf74a13db18 using evolve by test (Thu Jan 01 00:00:00 1970 +0000) + | x c38f731f5ae0 (14) added foo to x + | | rebased(parent) from 91939f44a1fe using evolve by test (Thu Jan 01 00:00:00 1970 +0000) | | - | x 5cf74a13db18 (12) added foo to x - |/ rewritten(description, branch, content) from 801b5920c7ea using amend by test (Thu Jan 01 00:00:00 1970 +0000) + | x 91939f44a1fe (12) added foo to x + |/ rewritten(description, branch, content) from f220d694b3a6 using amend by test (Thu Jan 01 00:00:00 1970 +0000) | - x 801b5920c7ea (11) added x + x f220d694b3a6 (11) added x Testing when both the content-divergence are on different parents and resolution @@ -263,7 +290,7 @@ $ echo y > y $ hg ci -Aqm "added y" $ hg glog -r . - @ 16:ecf1d3992eb4 added y + @ 16:d84c9e99d55b added y | () [default] draft ~ @@ -272,31 +299,31 @@ $ hg up 'predecessors(.)' --hidden 1 files updated, 0 files merged, 0 files removed, 0 files unresolved - updated to hidden changeset ecf1d3992eb4 - (hidden revision 'ecf1d3992eb4' was rewritten as: 9c32d35206fb) - working directory parent is obsolete! (ecf1d3992eb4) - (use 'hg evolve' to update to its successor: 9c32d35206fb) + updated to hidden changeset d84c9e99d55b + (hidden revision 'd84c9e99d55b' was rewritten as: 98cd38d20303) + working directory parent is obsolete! (d84c9e99d55b) + (use 'hg evolve' to update to its successor: 98cd38d20303) $ hg rebase -r . -d 'desc("added foo to x")' --config experimental.evolution.allowdivergence=True - rebasing 16:ecf1d3992eb4 "added y" + rebasing 16:d84c9e99d55b "added y" 2 new content-divergent changesets $ echo wat > y $ hg amend $ hg glog - @ 19:bfe170c9c964 added y + @ 19:ec9ec45c397e added y | () [bar] draft - | * 17:9c32d35206fb added y + | * 17:98cd38d20303 added y | | () [default] draft - o | 15:618f8bd245a8 added foo to x + o | 15:3c4c7420a968 added foo to x | | () [bar] draft - o | 10:be5a8b9faa8a added d + o | 10:25cb1649b463 added d | | () [default] draft - o | 9:e2ce33033e42 added c + o | 9:81ead2f9fc61 added c |/ () [default] draft - o 8:e7fdc662d630 added b + o 8:c5862ade0278 added b | () [default] draft - o 1:c7586e2a9264 added a - | () [default] draft + | o 1:c7586e2a9264 added a + |/ () [default] draft o 0:8fa14d15e168 added hgignore () [default] draft @@ -304,7 +331,7 @@ merge:[17] added y with: [19] added y base: [16] added y - rebasing "divergent" content-divergent changeset 9c32d35206fb on 618f8bd245a8 + rebasing "divergent" content-divergent changeset 98cd38d20303 on 3c4c7420a968 merging y warning: conflicts while merging y! (edit, then use 'hg resolve --mark') 0 files updated, 0 files merged, 0 files removed, 1 files unresolved @@ -317,61 +344,61 @@ (no more unresolved files) continue: hg evolve --continue $ hg evolve --continue - working directory is now at 7411ed2cf7cf + working directory is now at 26dd4974d99f $ hg glog - @ 21:7411ed2cf7cf added y + @ 21:26dd4974d99f added y | () [bar] draft - o 15:618f8bd245a8 added foo to x + o 15:3c4c7420a968 added foo to x | () [bar] draft - o 10:be5a8b9faa8a added d + o 10:25cb1649b463 added d | () [default] draft - o 9:e2ce33033e42 added c + o 9:81ead2f9fc61 added c | () [default] draft - o 8:e7fdc662d630 added b + o 8:c5862ade0278 added b | () [default] draft - o 1:c7586e2a9264 added a - | () [default] draft + | o 1:c7586e2a9264 added a + |/ () [default] draft o 0:8fa14d15e168 added hgignore () [default] draft $ hg debugobsolete b1661037fa25511d0b7ccddf405e336f9d7d3424 7ed0642d644bb9ad93d252dd9ffe7b4729febe48 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'} b1661037fa25511d0b7ccddf405e336f9d7d3424 da4b96f4a8d610a85b225583138f681d67e275dd 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} - da4b96f4a8d610a85b225583138f681d67e275dd 11f849d7159fa30a63dbbc1a6d251a8d996baeb5 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'} - 7ed0642d644bb9ad93d252dd9ffe7b4729febe48 e7fdc662d6305fee2908c3f1630e0b20d6f4689a 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'evolve', 'user': 'test'} - 11f849d7159fa30a63dbbc1a6d251a8d996baeb5 e7fdc662d6305fee2908c3f1630e0b20d6f4689a 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'evolve', 'user': 'test'} - ca1b80f7960aae2306287bab52b4090c59af8c29 e2ce33033e42db2e61a5f71c6dfb52a33efeaf6a 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'} - c41c793e0ef1ddb463e85ea9491e377d01127ba2 be5a8b9faa8af54f115aa168a2c8564acb40c37d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'} - 801b5920c7ea8d4ebdbc9cfc1e79e665dea2f211 5cf74a13db180e33dc2df8cd2aa70b21252a2a64 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '73', 'operation': 'amend', 'user': 'test'} - 801b5920c7ea8d4ebdbc9cfc1e79e665dea2f211 45e15d6e88f5bd23ba360dff0c7591eca2d99f43 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} - 5cf74a13db180e33dc2df8cd2aa70b21252a2a64 911c21adca136894a2b35f0a58fae7ee94fa5e61 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'} - 911c21adca136894a2b35f0a58fae7ee94fa5e61 618f8bd245a8d1892954eb49a88a6ec5e500a5b5 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'evolve', 'user': 'test'} - 45e15d6e88f5bd23ba360dff0c7591eca2d99f43 618f8bd245a8d1892954eb49a88a6ec5e500a5b5 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '73', 'operation': 'evolve', 'user': 'test'} - ecf1d3992eb4d9700d441013fc4e89014692b461 9c32d35206fb5c3bf0ac814d410914d54a959a87 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'} - ecf1d3992eb4d9700d441013fc4e89014692b461 491e9c6e22a4f265fad54d2060b9c2fa45f4301d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '68', 'operation': 'rebase', 'user': 'test'} - 491e9c6e22a4f265fad54d2060b9c2fa45f4301d bfe170c9c96484157a071cd74e400426376c5e0e 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'} - 9c32d35206fb5c3bf0ac814d410914d54a959a87 7c47d5c3b6f5fb934723cdeb45c5819760988e1d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'} - 7c47d5c3b6f5fb934723cdeb45c5819760988e1d 7411ed2cf7cfbc23f17711a72570787569177d69 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '72', 'operation': 'evolve', 'user': 'test'} - bfe170c9c96484157a071cd74e400426376c5e0e 7411ed2cf7cfbc23f17711a72570787569177d69 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'evolve', 'user': 'test'} + 7ed0642d644bb9ad93d252dd9ffe7b4729febe48 2ec52f302b0f0ef30979124e92f1d9f2a26cedf8 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'} + 2ec52f302b0f0ef30979124e92f1d9f2a26cedf8 c5862ade02783a99f46082f4f0483c449fc4c3f2 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'evolve', 'user': 'test'} + da4b96f4a8d610a85b225583138f681d67e275dd c5862ade02783a99f46082f4f0483c449fc4c3f2 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'evolve', 'user': 'test'} + ca1b80f7960aae2306287bab52b4090c59af8c29 81ead2f9fc6156de69d12b7b5df71c34ab8b9c10 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'} + c41c793e0ef1ddb463e85ea9491e377d01127ba2 25cb1649b46389f8e6e77c3796f01b37996b8fcd 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'} + f220d694b3a605e236b4b34ef97d3cc6959efb89 91939f44a1fe6d865ec791122014971dfff75129 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '73', 'operation': 'amend', 'user': 'test'} + f220d694b3a605e236b4b34ef97d3cc6959efb89 7af6be6736c0aebd226820373190e636fe9f16e9 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} + 91939f44a1fe6d865ec791122014971dfff75129 c38f731f5ae01e417ceeea09f046febf4536d356 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'} + c38f731f5ae01e417ceeea09f046febf4536d356 3c4c7420a968a3f76d61fa16c3af9abe115f07b6 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'evolve', 'user': 'test'} + 7af6be6736c0aebd226820373190e636fe9f16e9 3c4c7420a968a3f76d61fa16c3af9abe115f07b6 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '73', 'operation': 'evolve', 'user': 'test'} + d84c9e99d55bfa499ab77dabd1fb3035e8f14ba9 98cd38d203030c04c89650c7280a6a71ae2f748c 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'} + d84c9e99d55bfa499ab77dabd1fb3035e8f14ba9 6c3124aac43f4c0e64155b93ea60e0e10abd6ba1 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '68', 'operation': 'rebase', 'user': 'test'} + 6c3124aac43f4c0e64155b93ea60e0e10abd6ba1 ec9ec45c397e15dfd9f25a91b6ffa1e17f9b9471 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'} + 98cd38d203030c04c89650c7280a6a71ae2f748c 5ddc0bec0e2650fb56e3b5d24f7c7c3a61401fbe 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'} + 5ddc0bec0e2650fb56e3b5d24f7c7c3a61401fbe 26dd4974d99f30b9c9b259e22254b29474155d45 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '72', 'operation': 'evolve', 'user': 'test'} + ec9ec45c397e15dfd9f25a91b6ffa1e17f9b9471 26dd4974d99f30b9c9b259e22254b29474155d45 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'evolve', 'user': 'test'} $ hg obslog -r . --all - @ 7411ed2cf7cf (21) added y - |\ rewritten(branch, content) from 7c47d5c3b6f5 using evolve by test (Thu Jan 01 00:00:00 1970 +0000) - | | amended(content) from bfe170c9c964 using evolve by test (Thu Jan 01 00:00:00 1970 +0000) + @ 26dd4974d99f (21) added y + |\ rewritten(branch, content) from 5ddc0bec0e26 using evolve by test (Thu Jan 01 00:00:00 1970 +0000) + | | amended(content) from ec9ec45c397e using evolve by test (Thu Jan 01 00:00:00 1970 +0000) | | - x | 7c47d5c3b6f5 (20) added y - | | rebased(parent) from 9c32d35206fb using evolve by test (Thu Jan 01 00:00:00 1970 +0000) + x | 5ddc0bec0e26 (20) added y + | | rebased(parent) from 98cd38d20303 using evolve by test (Thu Jan 01 00:00:00 1970 +0000) | | - | x bfe170c9c964 (19) added y - | | amended(content) from 491e9c6e22a4 using amend by test (Thu Jan 01 00:00:00 1970 +0000) + | x ec9ec45c397e (19) added y + | | amended(content) from 6c3124aac43f using amend by test (Thu Jan 01 00:00:00 1970 +0000) | | - | x 491e9c6e22a4 (18) added y - | | rewritten(branch, parent) from ecf1d3992eb4 using rebase by test (Thu Jan 01 00:00:00 1970 +0000) + | x 6c3124aac43f (18) added y + | | rewritten(branch, parent) from d84c9e99d55b using rebase by test (Thu Jan 01 00:00:00 1970 +0000) | | - x | 9c32d35206fb (17) added y - |/ amended(content) from ecf1d3992eb4 using amend by test (Thu Jan 01 00:00:00 1970 +0000) + x | 98cd38d20303 (17) added y + |/ amended(content) from d84c9e99d55b using amend by test (Thu Jan 01 00:00:00 1970 +0000) | - x ecf1d3992eb4 (16) added y + x d84c9e99d55b (16) added y checking that relocated commit is there @@ -380,11 +407,11 @@ # User test # Date 0 0 # Thu Jan 01 00:00:00 1970 +0000 - # Node ID 7c47d5c3b6f5fb934723cdeb45c5819760988e1d - # Parent 618f8bd245a8d1892954eb49a88a6ec5e500a5b5 + # Node ID 5ddc0bec0e2650fb56e3b5d24f7c7c3a61401fbe + # Parent 3c4c7420a968a3f76d61fa16c3af9abe115f07b6 added y - diff -r 618f8bd245a8 -r 7c47d5c3b6f5 y + diff -r 3c4c7420a968 -r 5ddc0bec0e26 y --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/y Thu Jan 01 00:00:00 1970 +0000 @@ -0,0 +1,1 @@ @@ -394,18 +421,18 @@ ---------------------------------------------------------------------- $ hg glog - @ 21:7411ed2cf7cf added y + @ 21:26dd4974d99f added y | () [bar] draft - o 15:618f8bd245a8 added foo to x + o 15:3c4c7420a968 added foo to x | () [bar] draft - o 10:be5a8b9faa8a added d + o 10:25cb1649b463 added d | () [default] draft - o 9:e2ce33033e42 added c + o 9:81ead2f9fc61 added c | () [default] draft - o 8:e7fdc662d630 added b + o 8:c5862ade0278 added b | () [default] draft - o 1:c7586e2a9264 added a - | () [default] draft + | o 1:c7586e2a9264 added a + |/ () [default] draft o 0:8fa14d15e168 added hgignore () [default] draft @@ -415,7 +442,7 @@ $ echo z > z $ hg ci -Aqm "added z" $ hg glog -r . - @ 22:2048a66e8834 added z + @ 22:136e58088ce2 added z | () [default] draft ~ @@ -425,33 +452,33 @@ $ hg up 'predecessors(.)' --hidden 0 files updated, 0 files merged, 1 files removed, 0 files unresolved - updated to hidden changeset 2048a66e8834 - (hidden revision '2048a66e8834' was rewritten as: 9bc2ace42175) - working directory parent is obsolete! (2048a66e8834) - (use 'hg evolve' to update to its successor: 9bc2ace42175) + updated to hidden changeset 136e58088ce2 + (hidden revision '136e58088ce2' was rewritten as: f4c3594c72e7) + working directory parent is obsolete! (136e58088ce2) + (use 'hg evolve' to update to its successor: f4c3594c72e7) $ hg rebase -r . -d 'desc("added y")' --config experimental.evolution.allowdivergence=True - rebasing 22:2048a66e8834 "added z" + rebasing 22:136e58088ce2 "added z" 2 new content-divergent changesets $ echo bar > z $ hg amend $ hg glog - @ 25:40a21b3496bc added z + @ 25:7e87b40e3aa8 added z | () [bar] draft - | * 23:9bc2ace42175 added z + | * 23:f4c3594c72e7 added z | | () [default] draft - o | 21:7411ed2cf7cf added y + o | 21:26dd4974d99f added y | | () [bar] draft - o | 15:618f8bd245a8 added foo to x + o | 15:3c4c7420a968 added foo to x | | () [bar] draft - o | 10:be5a8b9faa8a added d + o | 10:25cb1649b463 added d | | () [default] draft - o | 9:e2ce33033e42 added c + o | 9:81ead2f9fc61 added c |/ () [default] draft - o 8:e7fdc662d630 added b + o 8:c5862ade0278 added b | () [default] draft - o 1:c7586e2a9264 added a - | () [default] draft + | o 1:c7586e2a9264 added a + |/ () [default] draft o 0:8fa14d15e168 added hgignore () [default] draft @@ -459,7 +486,7 @@ merge:[23] added z with: [25] added z base: [22] added z - rebasing "divergent" content-divergent changeset 9bc2ace42175 on 7411ed2cf7cf + rebasing "divergent" content-divergent changeset f4c3594c72e7 on 26dd4974d99f merging y warning: conflicts while merging y! (edit, then use 'hg resolve --mark') unresolved merge conflicts @@ -467,16 +494,16 @@ [240] $ hg diff - diff -r 7411ed2cf7cf y + diff -r 26dd4974d99f y --- a/y Thu Jan 01 00:00:00 1970 +0000 +++ b/y Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +1,5 @@ - +<<<<<<< destination: 7411ed2cf7cf bar - test: added y + +<<<<<<< destination: 26dd4974d99f bar - test: added y watbar +======= +foo - +>>>>>>> evolving: 9bc2ace42175 - test: added z - diff -r 7411ed2cf7cf z + +>>>>>>> evolving: f4c3594c72e7 - test: added z + diff -r 26dd4974d99f z --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/z Thu Jan 01 00:00:00 1970 +0000 @@ -0,0 +1,1 @@ @@ -488,7 +515,7 @@ continue: hg evolve --continue $ hg evolve --continue - evolving 23:9bc2ace42175 "added z" + evolving 23:f4c3594c72e7 "added z" merging y warning: conflicts while merging y! (edit, then use 'hg resolve --mark') 1 files updated, 0 files merged, 0 files removed, 1 files unresolved @@ -497,16 +524,16 @@ [240] $ hg diff - diff -r 635c0edd2e45 y + diff -r 5049972c0e21 y --- a/y Thu Jan 01 00:00:00 1970 +0000 +++ b/y Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +1,5 @@ - +<<<<<<< local: 635c0edd2e45 - test: added z + +<<<<<<< local: 5049972c0e21 - test: added z foo +======= +watbar - +>>>>>>> other: 40a21b3496bc bar - test: added z - diff -r 635c0edd2e45 z + +>>>>>>> other: 7e87b40e3aa8 bar - test: added z + diff -r 5049972c0e21 z --- a/z Thu Jan 01 00:00:00 1970 +0000 +++ b/z Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +1,1 @@ @@ -518,23 +545,23 @@ (no more unresolved files) continue: hg evolve --continue $ hg evolve --continue - working directory is now at 664febd074c2 + working directory is now at 04eb6e8d253d $ hg glog - @ 27:664febd074c2 added z + @ 27:04eb6e8d253d added z | () [bar] draft - o 21:7411ed2cf7cf added y + o 21:26dd4974d99f added y | () [bar] draft - o 15:618f8bd245a8 added foo to x + o 15:3c4c7420a968 added foo to x | () [bar] draft - o 10:be5a8b9faa8a added d + o 10:25cb1649b463 added d | () [default] draft - o 9:e2ce33033e42 added c + o 9:81ead2f9fc61 added c | () [default] draft - o 8:e7fdc662d630 added b + o 8:c5862ade0278 added b | () [default] draft - o 1:c7586e2a9264 added a - | () [default] draft + | o 1:c7586e2a9264 added a + |/ () [default] draft o 0:8fa14d15e168 added hgignore () [default] draft @@ -544,17 +571,17 @@ # Date 0 0 # Thu Jan 01 00:00:00 1970 +0000 # Branch bar - # Node ID 664febd074c2f9c5c4e03045dd688e93360f297c - # Parent 7411ed2cf7cfbc23f17711a72570787569177d69 + # Node ID 04eb6e8d253d5f17e0d9b1518678e015c272704e + # Parent 26dd4974d99f30b9c9b259e22254b29474155d45 added z - diff -r 7411ed2cf7cf -r 664febd074c2 y + diff -r 26dd4974d99f -r 04eb6e8d253d y --- a/y Thu Jan 01 00:00:00 1970 +0000 +++ b/y Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +1,1 @@ -watbar +foo - diff -r 7411ed2cf7cf -r 664febd074c2 z + diff -r 26dd4974d99f -r 04eb6e8d253d z --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/z Thu Jan 01 00:00:00 1970 +0000 @@ -0,0 +1,1 @@ @@ -563,46 +590,46 @@ $ hg debugobsolete b1661037fa25511d0b7ccddf405e336f9d7d3424 7ed0642d644bb9ad93d252dd9ffe7b4729febe48 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'} b1661037fa25511d0b7ccddf405e336f9d7d3424 da4b96f4a8d610a85b225583138f681d67e275dd 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} - da4b96f4a8d610a85b225583138f681d67e275dd 11f849d7159fa30a63dbbc1a6d251a8d996baeb5 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'} - 7ed0642d644bb9ad93d252dd9ffe7b4729febe48 e7fdc662d6305fee2908c3f1630e0b20d6f4689a 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'evolve', 'user': 'test'} - 11f849d7159fa30a63dbbc1a6d251a8d996baeb5 e7fdc662d6305fee2908c3f1630e0b20d6f4689a 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'evolve', 'user': 'test'} - ca1b80f7960aae2306287bab52b4090c59af8c29 e2ce33033e42db2e61a5f71c6dfb52a33efeaf6a 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'} - c41c793e0ef1ddb463e85ea9491e377d01127ba2 be5a8b9faa8af54f115aa168a2c8564acb40c37d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'} - 801b5920c7ea8d4ebdbc9cfc1e79e665dea2f211 5cf74a13db180e33dc2df8cd2aa70b21252a2a64 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '73', 'operation': 'amend', 'user': 'test'} - 801b5920c7ea8d4ebdbc9cfc1e79e665dea2f211 45e15d6e88f5bd23ba360dff0c7591eca2d99f43 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} - 5cf74a13db180e33dc2df8cd2aa70b21252a2a64 911c21adca136894a2b35f0a58fae7ee94fa5e61 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'} - 911c21adca136894a2b35f0a58fae7ee94fa5e61 618f8bd245a8d1892954eb49a88a6ec5e500a5b5 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'evolve', 'user': 'test'} - 45e15d6e88f5bd23ba360dff0c7591eca2d99f43 618f8bd245a8d1892954eb49a88a6ec5e500a5b5 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '73', 'operation': 'evolve', 'user': 'test'} - ecf1d3992eb4d9700d441013fc4e89014692b461 9c32d35206fb5c3bf0ac814d410914d54a959a87 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'} - ecf1d3992eb4d9700d441013fc4e89014692b461 491e9c6e22a4f265fad54d2060b9c2fa45f4301d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '68', 'operation': 'rebase', 'user': 'test'} - 491e9c6e22a4f265fad54d2060b9c2fa45f4301d bfe170c9c96484157a071cd74e400426376c5e0e 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'} - 9c32d35206fb5c3bf0ac814d410914d54a959a87 7c47d5c3b6f5fb934723cdeb45c5819760988e1d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'} - 7c47d5c3b6f5fb934723cdeb45c5819760988e1d 7411ed2cf7cfbc23f17711a72570787569177d69 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '72', 'operation': 'evolve', 'user': 'test'} - bfe170c9c96484157a071cd74e400426376c5e0e 7411ed2cf7cfbc23f17711a72570787569177d69 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'evolve', 'user': 'test'} - 2048a66e8834bda866dcc8c479f091897816833e 9bc2ace42175da7380251fca97730f62ff5b9185 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'} - 2048a66e8834bda866dcc8c479f091897816833e 8bf0130be95ef72377e39232335531426c2abcf9 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '68', 'operation': 'rebase', 'user': 'test'} - 8bf0130be95ef72377e39232335531426c2abcf9 40a21b3496bc55fd0c0ac92d81b2930cfa4d4bef 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'} - 9bc2ace42175da7380251fca97730f62ff5b9185 635c0edd2e45de215b2061b30aae5168708238d3 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '12', 'operation': 'evolve', 'user': 'test'} - 635c0edd2e45de215b2061b30aae5168708238d3 664febd074c2f9c5c4e03045dd688e93360f297c 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '72', 'operation': 'evolve', 'user': 'test'} - 40a21b3496bc55fd0c0ac92d81b2930cfa4d4bef 664febd074c2f9c5c4e03045dd688e93360f297c 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'evolve', 'user': 'test'} + 7ed0642d644bb9ad93d252dd9ffe7b4729febe48 2ec52f302b0f0ef30979124e92f1d9f2a26cedf8 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'} + 2ec52f302b0f0ef30979124e92f1d9f2a26cedf8 c5862ade02783a99f46082f4f0483c449fc4c3f2 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'evolve', 'user': 'test'} + da4b96f4a8d610a85b225583138f681d67e275dd c5862ade02783a99f46082f4f0483c449fc4c3f2 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'evolve', 'user': 'test'} + ca1b80f7960aae2306287bab52b4090c59af8c29 81ead2f9fc6156de69d12b7b5df71c34ab8b9c10 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'} + c41c793e0ef1ddb463e85ea9491e377d01127ba2 25cb1649b46389f8e6e77c3796f01b37996b8fcd 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'} + f220d694b3a605e236b4b34ef97d3cc6959efb89 91939f44a1fe6d865ec791122014971dfff75129 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '73', 'operation': 'amend', 'user': 'test'} + f220d694b3a605e236b4b34ef97d3cc6959efb89 7af6be6736c0aebd226820373190e636fe9f16e9 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} + 91939f44a1fe6d865ec791122014971dfff75129 c38f731f5ae01e417ceeea09f046febf4536d356 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'} + c38f731f5ae01e417ceeea09f046febf4536d356 3c4c7420a968a3f76d61fa16c3af9abe115f07b6 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'evolve', 'user': 'test'} + 7af6be6736c0aebd226820373190e636fe9f16e9 3c4c7420a968a3f76d61fa16c3af9abe115f07b6 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '73', 'operation': 'evolve', 'user': 'test'} + d84c9e99d55bfa499ab77dabd1fb3035e8f14ba9 98cd38d203030c04c89650c7280a6a71ae2f748c 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'} + d84c9e99d55bfa499ab77dabd1fb3035e8f14ba9 6c3124aac43f4c0e64155b93ea60e0e10abd6ba1 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '68', 'operation': 'rebase', 'user': 'test'} + 6c3124aac43f4c0e64155b93ea60e0e10abd6ba1 ec9ec45c397e15dfd9f25a91b6ffa1e17f9b9471 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'} + 98cd38d203030c04c89650c7280a6a71ae2f748c 5ddc0bec0e2650fb56e3b5d24f7c7c3a61401fbe 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'} + 5ddc0bec0e2650fb56e3b5d24f7c7c3a61401fbe 26dd4974d99f30b9c9b259e22254b29474155d45 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '72', 'operation': 'evolve', 'user': 'test'} + ec9ec45c397e15dfd9f25a91b6ffa1e17f9b9471 26dd4974d99f30b9c9b259e22254b29474155d45 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'evolve', 'user': 'test'} + 136e58088ce2a46749c73256b02608ca9be0fe09 f4c3594c72e7140404222d25e8827292e5d1a728 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'} + 136e58088ce2a46749c73256b02608ca9be0fe09 da49edc1732932755e2c42d91b6883e6616ff40b 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '68', 'operation': 'rebase', 'user': 'test'} + da49edc1732932755e2c42d91b6883e6616ff40b 7e87b40e3aa8d28f0ba07c1cec4f562e57ba7c12 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'} + f4c3594c72e7140404222d25e8827292e5d1a728 5049972c0e212e0ad051e628b37d162097944b5f 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '12', 'operation': 'evolve', 'user': 'test'} + 5049972c0e212e0ad051e628b37d162097944b5f 04eb6e8d253d5f17e0d9b1518678e015c272704e 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '72', 'operation': 'evolve', 'user': 'test'} + 7e87b40e3aa8d28f0ba07c1cec4f562e57ba7c12 04eb6e8d253d5f17e0d9b1518678e015c272704e 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'evolve', 'user': 'test'} $ hg obslog --all - @ 664febd074c2 (27) added z - |\ amended(content) from 40a21b3496bc using evolve by test (Thu Jan 01 00:00:00 1970 +0000) - | | rewritten(branch, content) from 635c0edd2e45 using evolve by test (Thu Jan 01 00:00:00 1970 +0000) + @ 04eb6e8d253d (27) added z + |\ rewritten(branch, content) from 5049972c0e21 using evolve by test (Thu Jan 01 00:00:00 1970 +0000) + | | amended(content) from 7e87b40e3aa8 using evolve by test (Thu Jan 01 00:00:00 1970 +0000) | | - x | 40a21b3496bc (25) added z - | | amended(content) from 8bf0130be95e using amend by test (Thu Jan 01 00:00:00 1970 +0000) + x | 5049972c0e21 (26) added z + | | rewritten(parent, content) from f4c3594c72e7 using evolve by test (Thu Jan 01 00:00:00 1970 +0000) | | - | x 635c0edd2e45 (26) added z - | | rewritten(parent, content) from 9bc2ace42175 using evolve by test (Thu Jan 01 00:00:00 1970 +0000) + | x 7e87b40e3aa8 (25) added z + | | amended(content) from da49edc17329 using amend by test (Thu Jan 01 00:00:00 1970 +0000) | | - x | 8bf0130be95e (24) added z - | | rewritten(branch, parent) from 2048a66e8834 using rebase by test (Thu Jan 01 00:00:00 1970 +0000) + | x da49edc17329 (24) added z + | | rewritten(branch, parent) from 136e58088ce2 using rebase by test (Thu Jan 01 00:00:00 1970 +0000) | | - | x 9bc2ace42175 (23) added z - |/ amended(content) from 2048a66e8834 using amend by test (Thu Jan 01 00:00:00 1970 +0000) + x | f4c3594c72e7 (23) added z + |/ amended(content) from 136e58088ce2 using amend by test (Thu Jan 01 00:00:00 1970 +0000) | - x 2048a66e8834 (22) added z + x 136e58088ce2 (22) added z $ cd ..
--- a/tests/test-evolve.t Wed Dec 30 11:01:37 2020 -0800 +++ b/tests/test-evolve.t Tue Jan 26 17:14:29 2021 +0100 @@ -460,6 +460,23 @@ (/ninja) +command-templates.oneline-summary is respected when evolving orphan + + $ hg evolve -n --config 'command-templates.oneline-summary = custom {rev} {desc}' + move:custom 8 dansk 2! + atop:custom 10 dansk! + hg rebase -r 569625323d3e -d 9975c016fe7b + skipping 8163b3ed62c7, consider including orphan ancestors + +command-templates.oneline-summary is respected when evolving/updating working copy + + $ hg co -q 7 + working directory parent is obsolete! (aca219761afb) + $ hg evolve --no-all --config 'command-templates.oneline-summary = custom {rev} {desc}' + update:custom 10 dansk! + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + working directory is now at 9975c016fe7b + $ hg evolve --all --traceback move:[8] dansk 2! atop:[10] dansk!
--- a/tests/test-prune.t Wed Dec 30 11:01:37 2020 -0800 +++ b/tests/test-prune.t Tue Jan 26 17:14:29 2021 +0100 @@ -257,25 +257,12 @@ 14:21b6f2f1cece[] (obsolete/draft) add n2 12:6e8148413dd5[prune-pair-book] (draft) add nE -test hg strip replacement - +test hg prune --keep $ hg up 10 0 files updated, 0 files merged, 2 files removed, 0 files unresolved (leaving bookmark prune-pair-book) $ mkcommit n1 created new head - $ mkcommit n2 - $ hg --config extensions.strip= --config experimental.prunestrip=True strip -r . - 0 files updated, 0 files merged, 1 files removed, 0 files unresolved - working directory is now at c7e58696a948 - 1 changesets pruned - $ hg --config extensions.strip= --config experimental.prunestrip=True strip -r . --bundle - 0 files updated, 0 files merged, 1 files removed, 0 files unresolved - saved backup bundle to $TESTTMP/repo/.hg/strip-backup/c7e58696a948-69ca36d3-backup.hg (glob) - -test hg prune --keep - $ mkcommit n1 - created new head $ hg diff -r .^ diff -r aa96dc3f04c2 n1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
--- a/tests/test-split.t Wed Dec 30 11:01:37 2020 -0800 +++ b/tests/test-split.t Tue Jan 26 17:14:29 2021 +0100 @@ -442,7 +442,7 @@ $ hg summary parent: 18:26f72cfaf036 tip Works on mytopic - branch: new-branch + branch: new-branch:mytopic commit: 2 unknown (clean) update: (current) phases: 9 draft
--- a/tests/test-topic-fold.t Wed Dec 30 11:01:37 2020 -0800 +++ b/tests/test-topic-fold.t Tue Jan 26 17:14:29 2021 +0100 @@ -65,7 +65,7 @@ $ hg summary parent: 3:4fd43e5bdc44 tip folded - branch: default + branch: default:myfeature commit: (clean) update: (current) phases: 2 draft
--- a/tests/test-topic-stack-data.t Wed Dec 30 11:01:37 2020 -0800 +++ b/tests/test-topic-stack-data.t Tue Jan 26 17:14:29 2021 +0100 @@ -114,7 +114,7 @@ $ hg summary parent: 21:3e54b49a3113 tip add foo_b - branch: lake + branch: lake:foo commit: (clean) update: (current) phases: 22 draft
--- a/tests/test-topic-stack.t Wed Dec 30 11:01:37 2020 -0800 +++ b/tests/test-topic-stack.t Tue Jan 26 17:14:29 2021 +0100 @@ -313,7 +313,7 @@ $ hg summary parent: 3:e629654d7050 c_d - branch: default + branch: default:foo commit: (clean) update: 2 new changesets (update) phases: 4 draft
--- a/tests/test-topic-tutorial.t Wed Dec 30 11:01:37 2020 -0800 +++ b/tests/test-topic-tutorial.t Tue Jan 26 17:14:29 2021 +0100 @@ -108,8 +108,8 @@ $ hg summary parent: 0:38da43f0a2ea tip Shopping list - branch: default - commit: (clean) + branch: default:food + commit: (new branch) update: (current) topic: food
--- a/tests/test-topic.t Wed Dec 30 11:01:37 2020 -0800 +++ b/tests/test-topic.t Tue Jan 26 17:14:29 2021 +0100 @@ -1166,4 +1166,67 @@ tip 3:9efc5c3ac635 1.0 2:3bbb3fdb2546 +test that being on active topic does not change output of `hg heads` + + $ hg up 0 + 0 files updated, 0 files merged, 2 files removed, 0 files unresolved + $ echo c > c + $ hg ci -Am "added c" --config experimental.topic-mode=default + adding c + $ hg log -G -T '{rev} {branch}{if("{topic}", "/{topic}")}\n' --rev 'all()' + @ 4 default + | + | o 3 default/foo + | | + | o 2 default/foo + |/ + o 0 default + + $ hg heads + changeset: 4:29edef26570b + tag: tip + parent: 0:9092f1db7931 + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: added c + + changeset: 3:9efc5c3ac635 + topic: foo + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: Added tag 1.0 for changeset 3bbb3fdb2546 + + $ hg topic foo + marked working directory as topic: foo + $ hg heads + changeset: 4:29edef26570b + tag: tip + parent: 0:9092f1db7931 + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: added c + + changeset: 3:9efc5c3ac635 + topic: foo + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: Added tag 1.0 for changeset 3bbb3fdb2546 + + + $ hg up foo + 2 files updated, 0 files merged, 1 files removed, 0 files unresolved + $ hg heads + changeset: 4:29edef26570b + tag: tip + parent: 0:9092f1db7931 + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: added c + + changeset: 3:9efc5c3ac635 + topic: foo + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: Added tag 1.0 for changeset 3bbb3fdb2546 + $ cd ..