# HG changeset patch # User Anton Shestakov # Date 1612009958 -28800 # Node ID 552efcc2cc30ce1d47f1609660ebd4549cce10cf # Parent 25257b1be6c68eb58cbb52b5a6c4352ca72d010f# Parent 2fe3f20369eb6c65c7bcbe9444aa3ea7f3fb9ac5 test-compat: merge mercurial-5.6 into mercurial-5.5 # no-check-commit diff -r 2fe3f20369eb -r 552efcc2cc30 .gitlab-ci.yml --- a/.gitlab-ci.yml Sat Oct 31 18:11:27 2020 +0800 +++ b/.gitlab-ci.yml Sat Jan 30 20:32:38 2021 +0800 @@ -6,7 +6,7 @@ - echo testing with mercurial branch="$hg_branch", revision="$hg_rev" pytype: - image: octobus/ci-py3-hgext3rd + image: registry.heptapod.net/mercurial/ci-images/py3-hgext3rd script: - *prepare_hg - pytype --version @@ -21,7 +21,7 @@ TEST_HGMODULEPOLICY: "allow" .runtests_template: &runtests - image: octobus/ci-$PY-hgext3rd + image: registry.heptapod.net/mercurial/ci-images/$PY-hgext3rd before_script: - (cd tests; ls -1 test-check-*.t > /tmp/check-tests.txt) script: @@ -70,13 +70,15 @@ TEST_HGMODULEPOLICY: "py" doc: - image: octobus/ci-py2-evolve-doc + image: registry.heptapod.net/mercurial/ci-images/py3-evolve-doc script: - cd docs/ - make variables: - LANG: en_us.UTF-8 + LANG: en_US.UTF-8 + PYTHON: python3 PYTHONPATH: "/ci/repos/mercurial:$PYTHONPATH" + SPHINXBUILD: python3 -m sphinx -b html artifacts: paths: - html/* diff -r 2fe3f20369eb -r 552efcc2cc30 .hgtags --- a/.hgtags Sat Oct 31 18:11:27 2020 +0800 +++ b/.hgtags Sat Jan 30 20:32:38 2021 +0800 @@ -89,3 +89,4 @@ 27d57ca8686590867e62e3d42c96bad84a5f56ef 10.0.0 fb543438704b73b22023a493c9ef76fc8746b796 10.0.1 1cce884c944830a7b331a17fd18614b93cbac987 10.0.2 +782cbadb123fe4991e91a03d367e02d0b5ae969c 10.1.0 diff -r 2fe3f20369eb -r 552efcc2cc30 CHANGELOG --- a/CHANGELOG Sat Oct 31 18:11:27 2020 +0800 +++ b/CHANGELOG Sat Jan 30 20:32:38 2021 +0800 @@ -1,6 +1,39 @@ Changelog ========= +10.1.1 -- in progress +--------------------- + + * doc: update the MQ To Evolve guide and fix build warning for index.rst + + * evolve: remove spurious "working directory is now at ..." messages + * evolve: various documentation improvements + + * packaging: default to building docs on Python 3 + +topic: + + * rebase: prevent in-memory rebase from silently dropping topic (by disabling + the feature) + +10.2.0 - in progress +-------------------- + + * compatibility with Mercurial 5.7 + + * evolve: improve resolution of some case of parent divergence + * evolve: respect command-templates.oneline-summary if configured + + * strip: remove experimental.prunestrip option + +topic: + + * performance: speed up various operations using an in-memory cache for topic + + * topic: rework how ctx.branch() is wrapped + * topic: look for topic heads only when necessary, this fixes the output of + e.g. hg heads when topics are in play + 10.1.0 -- 2020-10-31 -------------------- diff -r 2fe3f20369eb -r 552efcc2cc30 debian/changelog --- a/debian/changelog Sat Oct 31 18:11:27 2020 +0800 +++ b/debian/changelog Sat Jan 30 20:32:38 2021 +0800 @@ -1,3 +1,9 @@ +mercurial-evolve (10.1.0-1) unstable; urgency=medium + + * new upstream release + + -- Pierre-Yves David Sat, 31 Oct 2020 18:42:05 +0100 + mercurial-evolve (10.0.2-1) unstable; urgency=medium * new upstream release diff -r 2fe3f20369eb -r 552efcc2cc30 docs/conf.py --- a/docs/conf.py Sat Oct 31 18:11:27 2020 +0800 +++ b/docs/conf.py Sat Jan 30 20:32:38 2021 +0800 @@ -2,12 +2,22 @@ # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. from mercurial import demandimport demandimport.disable() + +from os.path import ( + abspath, + dirname, + join, +) + from docutils import nodes from docutils.parsers.rst import Directive -from mercurial import ui -from mercurial import extensions as hgext -from mercurial import commands -import os + +from mercurial import ( + commands, + extensions as hgext, + pycompat, + ui as uimod, +) extensions = ["sphinx.ext.graphviz"] @@ -139,20 +149,17 @@ has_content = True def run(self): - u = ui.ui() - if not hasattr(u, 'disablepager'): + ui = uimod.ui() + if not hasattr(ui, 'disablepager'): return [] - u.disablepager() - u.setconfig( - 'extensions', 'evolve', - os.path.join( - os.path.abspath(os.path.dirname(__file__)), - os.pardir, 'hgext3rd', 'evolve')) - hgext.loadall(u) - u.pushbuffer() - commands.help_(u, self.content[0].encode('utf-8')) - return [ - nodes.literal_block(text=u.popbuffer().decode('utf-8'))] + ui.disablepager() + rootdir = abspath(dirname(dirname(__file__))) + evolvepath = join(rootdir, 'hgext3rd', 'evolve') + ui.setconfig(b'extensions', b'evolve', pycompat.bytestr(evolvepath)) + hgext.loadall(ui) + ui.pushbuffer() + commands.help_(ui, self.content[0].encode('utf-8')) + return [nodes.literal_block(text=ui.popbuffer().decode('utf-8'))] def setup(app): diff -r 2fe3f20369eb -r 552efcc2cc30 docs/from-mq.rst --- a/docs/from-mq.rst Sat Oct 31 18:11:27 2020 +0800 +++ b/docs/from-mq.rst Sat Jan 30 20:32:38 2021 +0800 @@ -15,15 +15,16 @@ qnew ``commit`` qrefresh ``amend`` qrefresh --exclude ``uncommit`` -qpop ``update`` or ``gdown`` -qpush ``update`` or ``gup`` sometimes ``evolve`` +qpop ``update`` or ``previous`` +qpush ``update`` or ``next`` sometimes ``evolve`` or ``pick`` qrm ``prune`` qfold ``fold`` -qdiff ``odiff`` +qdiff ``pdiff`` qrecord ``record`` +qimport ``import`` qfinish -- -qimport -- +qcommit -- ============================== ============================================ @@ -35,11 +36,14 @@ All your work in progress is now in real changesets all the time. -You can use the standard log command to display them. You can use the -phase revset to display unfinished work only, and use templates to have -the same kind of compact that the output of qseries has. +You can use the standard ``log`` command to display them. You can use the +``draft()`` (or ``secret()``) revset to display unfinished work only, and +use templates to have the same kind of compact that the output of +``qseries`` has. -This will result in something like:: +This will result in something like + +.. code-block:: ini [alias] wip = log -r 'not public()' --template='{rev}:{node|short} {desc|firstline}\n' @@ -49,31 +53,37 @@ With evolve you handle standard changesets without an additional overlay. -Standard changeset are created using hg commit as usual:: +Standard changeset are created using ``hg commit`` as usual + +.. code-block:: console $ hg commit If you want to keep the "WIP is not pushed" behavior, you want to -set your changeset in the secret phase using the phase command. +set your changeset in the secret phase using the ``phase`` command. Note that you only need it for the first commit you want to be secret. Later commits will inherit their parent's phase. If you always want your new commit to be in the secret phase, your should -consider updating your configuration: +consider updating your configuration + +.. code-block:: ini [phases] - new-commit=secret + new-commit = secret hg qref ``````` A new command from evolution will allow you to rewrite the changeset you are -currently on. Just call: +currently on. Just call + +.. code-block:: console $ hg amend -This command takes the same options as commit, plus the switch '-e' (--edit) +This command takes the same options as ``commit``, plus the switch ``-e`` (``--edit``) to edit the commit message in an editor. @@ -92,7 +102,9 @@ hg qref --exclude ````````````````` -To remove changes from your current commit use:: +To remove changes from your current commit use + +.. code-block:: console $ hg uncommit not-ready.txt @@ -100,70 +112,97 @@ hg qpop ``````` -The following command emulates the behavior of hg qpop: +To emulate the behavior of ``qpop`` use + +.. code-block:: console - $ hg gdown + $ hg previous -If you need to go back to an arbitrary commit you can use: +If you need to go back to an arbitrary commit you can use + +.. code-block:: console $ hg update -.. note:: gdown and update allow movement with working directory +.. note:: previous and update allow movement with working directory changes applied, and gracefully merge them. +.. note:: Previous versions of the documentation recommended + the deprecated gdown command + hg qpush ```````` +The following command emulates the behavior of ``hg qpush`` + +.. code-block:: console + + $ hg next + When you rewrite changesets, descendants of rewritten changesets are marked as "orphan". You need to rewrite them on top of the new version of their ancestor. -The evolution extension adds a command to rewrite "orphan" -changesets::: +The evolution extension adds a command to rewrite "orphan" changesets + +.. code-block:: console $ hg evolve -You can also decide to do it manually using:: +You can also reorder a changeset using - $ hg grab +.. code-block:: console + + $ hg pick OLD_VERSION -or:: +or + +.. code-block:: console - $ hg rebase -r -d . + $ hg rebase -r REVSET_FOR_OLD_VERSION -d . -note: using graft allows you to pick the changeset you want next as the --move -option of qpush do. +note: using ``pick`` allows you to choose the changeset you want next as the ``--move`` +option of ``qpush`` does. hg qrm `````` -evolution introduce a new command to mark a changeset as "not wanted anymore".:: +evolution introduces a new command to mark a changeset as "not wanted anymore". - $ hg prune +.. code-block:: console + + $ hg prune REVSET hg qfold ```````` +The following command emulates the behavior of ``qfold`` -:: +.. code-block:: console - $ hg fold first::last + $ hg fold FIRST::LAST hg qdiff ```````` -``pdiff`` is an alias for `hg diff -r .^` It works like qdiff, but outside MQ. - +``pdiff`` is an alias for ``hg diff -r .^`` It works like ``qdiff``, but outside MQ. -hg qfinish and hg qimport -````````````````````````` +hg qimport +`````````` + +To import a new patch, use + +.. code-block:: console -These are not necessary anymore. If you want to control the -mutability of changesets, see the phase feature. + $ hg import NEW_CHANGES.patch +hg qfinish +`````````` +This is not necessary anymore. If you want to control the +mutability of changesets, see the ``phase`` feature. hg qcommit `````````` diff -r 2fe3f20369eb -r 552efcc2cc30 docs/index.rst --- a/docs/index.rst Sat Oct 31 18:11:27 2020 +0800 +++ b/docs/index.rst Sat Jan 30 20:32:38 2021 +0800 @@ -49,7 +49,6 @@ .. toctree:: :maxdepth: 2 - index user-guide sharing concepts diff -r 2fe3f20369eb -r 552efcc2cc30 docs/makefile --- a/docs/makefile Sat Oct 31 18:11:27 2020 +0800 +++ b/docs/makefile Sat Jan 30 20:32:38 2021 +0800 @@ -1,14 +1,14 @@ -SPHINXBUILD ?= sphinx-build +SPHINXBUILD ?= python3 -m sphinx -b html .PHONY: all all: tutorials/tutorial.rst tutorials/topic-tutorial.rst static/logo-evolve.ico $(SPHINXBUILD) . ../html/ tutorials/tutorial.rst: tutorials/tutorial.t test2rst.py - python test2rst.py tutorials/ + python3 test2rst.py $< tutorials/topic-tutorial.rst: tutorials/topic-tutorial.t test2rst.py - python test2rst.py tutorials/ + python3 test2rst.py $< static/logo-evolve.ico: static/logo-evolve.svg convert -resize 36x36 $< $@ diff -r 2fe3f20369eb -r 552efcc2cc30 docs/test2rst.py --- a/docs/test2rst.py Sat Oct 31 18:11:27 2020 +0800 +++ b/docs/test2rst.py Sat Jan 30 20:32:38 2021 +0800 @@ -1,17 +1,9 @@ -#!/usr/bin/env python - -import re -import os -import os.path as op -import sys +#!/usr/bin/env python3 -INDEX = ''' -Mercurial tests -=============== +import argparse +import os +import re -.. toctree:: - :maxdepth: 1 -''' ignored_patterns = [ re.compile(r'^#if'), @@ -21,7 +13,8 @@ ] -def rstify(orig, name): +def rstify(orig): + """Take contents of a .t file and produce reStructuredText""" newlines = [] code_block_mode = False @@ -29,7 +22,7 @@ for line in orig.splitlines(): - # Emtpy lines doesn't change output + # Empty lines doesn't change output if not line: newlines.append(line) code_block_mode = False @@ -67,40 +60,19 @@ return "\n".join(newlines) -def main(base): - if os.path.isdir(base): - one_dir(base) - else: - one_file(base) +def main(): + ap = argparse.ArgumentParser() + ap.add_argument('testfile', help='.t file to transform') - -def one_dir(base): - index = INDEX - # doc = lambda x: op.join(op.dirname(__file__), 'docs', x) + opts = ap.parse_args() - for fn in sorted(os.listdir(base)): - if not fn.endswith('.t'): - continue - name = os.path.splitext(fn)[0] - content = one_file(op.join(base, fn)) - target = op.join(base, name + '.rst') - # with file(doc(name + '.rst'), 'w') as f: - with open(target, 'w') as f: - f.write(content) - - index += '\n ' + name - - # with file(doc('index.rst'), 'w') as f: - # f.write(index) - - -def one_file(path): - name = os.path.basename(path)[:-2] - return rstify(open(path).read(), name) + with open(opts.testfile) as f: + content = f.read() + rst = rstify(content) + target = os.path.splitext(opts.testfile)[0] + '.rst' + with open(target, 'w') as f: + f.write(rst) if __name__ == '__main__': - if len(sys.argv) != 2: - print('Please supply a path to tests dir as parameter') - sys.exit() - main(sys.argv[1]) + main() diff -r 2fe3f20369eb -r 552efcc2cc30 hgext3rd/evolve/__init__.py --- a/hgext3rd/evolve/__init__.py Sat Oct 31 18:11:27 2020 +0800 +++ b/hgext3rd/evolve/__init__.py Sat Jan 30 20:32:38 2021 +0800 @@ -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,31 +1176,6 @@ finally: lockmod.release(tr, lock, wlock) -@eh.wrapcommand(b'strip', extension=b'strip', 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] @@ -1220,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) diff -r 2fe3f20369eb -r 552efcc2cc30 hgext3rd/evolve/cmdrewrite.py --- a/hgext3rd/evolve/cmdrewrite.py Sat Oct 31 18:11:27 2020 +0800 +++ b/hgext3rd/evolve/cmdrewrite.py Sat Jan 30 20:32:38 2021 +0800 @@ -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" diff -r 2fe3f20369eb -r 552efcc2cc30 hgext3rd/evolve/compat.py --- a/hgext3rd/evolve/compat.py Sat Oct 31 18:11:27 2020 +0800 +++ b/hgext3rd/evolve/compat.py Sat Jan 30 20:32:38 2021 +0800 @@ -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): + return logcmdutil.changesetdisplayer(ui, repo, + {b'template': default_spec}).show diff -r 2fe3f20369eb -r 552efcc2cc30 hgext3rd/evolve/evolvecmd.py --- a/hgext3rd/evolve/evolvecmd.py Sat Oct 31 18:11:27 2020 +0800 +++ b/hgext3rd/evolve/evolvecmd.py Sat Jan 30 20:32:38 2021 +0800 @@ -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'] @@ -1592,7 +1603,7 @@ if evolvestate[b'command'] != b'evolve': evolvestate.delete() return - startnode = repo.unfiltered()[evolvestate[b'startnode']] + startnode = evolvestate[b'startnode'] if b'update' in evolvestate: shouldupdate = evolvestate[b'update'] evolvestate.delete() @@ -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 diff -r 2fe3f20369eb -r 552efcc2cc30 hgext3rd/evolve/headchecking.py --- a/hgext3rd/evolve/headchecking.py Sat Oct 31 18:11:27 2020 +0800 +++ b/hgext3rd/evolve/headchecking.py Sat Jan 30 20:32:38 2021 +0800 @@ -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( @@ -164,13 +166,17 @@ new_heads.sort() return new_heads -def enforcesinglehead(orig, repo, tr, desc, accountclosed=False): - """check that no named branch has multiple heads""" +def enforcesinglehead(orig, repo, tr, desc, accountclosed=False, filtername=b'visible'): + """check that no named branch has multiple heads + + COMPAT: this is the same as the upstream version as of c701f616d852, except + for the _filter_obsolete_heads call. + """ nodesummaries = scmutil.nodesummaries if desc in (b'strip', b'repair'): # skip the logic during strip return - visible = repo.filtered(b'visible') + visible = repo.filtered(filtername) # possible improvement: we could restrict the check to affected branch bm = visible.branchmap() cl = repo.changelog diff -r 2fe3f20369eb -r 552efcc2cc30 hgext3rd/evolve/metadata.py --- a/hgext3rd/evolve/metadata.py Sat Oct 31 18:11:27 2020 +0800 +++ b/hgext3rd/evolve/metadata.py Sat Jan 30 20:32:38 2021 +0800 @@ -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.0' +__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/' diff -r 2fe3f20369eb -r 552efcc2cc30 hgext3rd/evolve/obsdiscovery.py --- a/hgext3rd/evolve/obsdiscovery.py Sat Oct 31 18:11:27 2020 +0800 +++ b/hgext3rd/evolve/obsdiscovery.py Sat Jan 30 20:32:38 2021 +0800 @@ -449,7 +449,7 @@ self._data.pop(r, None) except (sqlite3.DatabaseError, sqlite3.OperationalError) as exc: repo.ui.log(b'evoext-cache', - b'error while updating obshashrange cache: %s' + b'error while updating obshashrange cache: %s\n' % forcebytestr(exc)) del self._updating return @@ -562,9 +562,9 @@ del self._con self._new.clear() repo.ui.log(b'evoext-cache', - b'error while saving new data: %s' + b'error while saving new data: %s\n' % forcebytestr(exc)) - repo.ui.debug(b'evoext-cache: error while saving new data: %s' + repo.ui.debug(b'evoext-cache: error while saving new data: %s\n' % forcebytestr(exc)) def _trysave(self, repo): @@ -576,7 +576,7 @@ con = self._db() if con is None: repo.ui.log(b'evoext-cache', b'unable to write obshashrange cache' - b' - cannot create database') + b' - cannot create database\n') return with con: for req in _sqliteschema: diff -r 2fe3f20369eb -r 552efcc2cc30 hgext3rd/evolve/obsexchange.py --- a/hgext3rd/evolve/obsexchange.py Sat Oct 31 18:11:27 2020 +0800 +++ b/hgext3rd/evolve/obsexchange.py Sat Jan 30 20:32:38 2021 +0800 @@ -59,7 +59,7 @@ | | Falling back to a less efficient fetching method. | -| More efficient fetching method is possible and will be used in the future. +| More efficient fetching method is possible and will be used in the future.\n """ @eh.wrapfunction(exchange, '_pullbundle2extraprepare') diff -r 2fe3f20369eb -r 552efcc2cc30 hgext3rd/evolve/stablerangecache.py --- a/hgext3rd/evolve/stablerangecache.py Sat Oct 31 18:11:27 2020 +0800 +++ b/hgext3rd/evolve/stablerangecache.py Sat Jan 30 20:32:38 2021 +0800 @@ -295,8 +295,8 @@ if r'_con' in vars(self): del self._con self._unsavedsubranges.clear() - repo.ui.log(b'evoext-cache', b'error while saving new data: %s' % forcebytestr(exc)) - repo.ui.debug(b'evoext-cache: error while saving new data: %s' % forcebytestr(exc)) + repo.ui.log(b'evoext-cache', b'error while saving new data: %s\n' % forcebytestr(exc)) + repo.ui.debug(b'evoext-cache: error while saving new data: %s\n' % forcebytestr(exc)) def _trysave(self, repo): repo = repo.unfiltered() diff -r 2fe3f20369eb -r 552efcc2cc30 hgext3rd/evolve/state.py --- a/hgext3rd/evolve/state.py Sat Oct 31 18:11:27 2020 +0800 +++ b/hgext3rd/evolve/state.py Sat Jan 30 20:32:38 2021 +0800 @@ -111,7 +111,7 @@ try: versionblob = f.read(4) if len(versionblob) < 4: - repo.ui.debug(b'ignoring corrupted evolvestate (file contains %i bits)' + repo.ui.debug(b'ignoring corrupted evolvestate (file contains %i bits)\n' % len(versionblob)) return None version = struct.unpack(b'>I', versionblob)[0] @@ -137,7 +137,7 @@ if rtype == b'C': state[b'current'] = rdata elif rtype.lower(): - repo.ui.debug(b'ignore evolve state record type %s' % rtype) + repo.ui.debug(b'ignore evolve state record type %s\n' % rtype) else: raise error.Abort(_(b"unknown evolvestate field type '%s'") % rtype, hint=_(b'upgrade your evolve')) diff -r 2fe3f20369eb -r 552efcc2cc30 hgext3rd/topic/__init__.py --- a/hgext3rd/topic/__init__.py Sat Oct 31 18:11:27 2020 +0800 +++ b/hgext3rd/topic/__init__.py Sat Jan 30 20:32:38 2021 +0800 @@ -232,7 +232,7 @@ b'topic.active': b'green', } -__version__ = b'0.20.0' +__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", @@ -435,6 +450,12 @@ repo.ui.setconfig(b'experimental', b'thg.displaynames', b'topics', source=b'topic-extension') + # BUG: inmemory rebase drops the topic, and fails to switch to the new + # topic. Disable inmemory rebase for now. + if repo.ui.configbool(b'rebase', b'experimental.inmemory'): + repo.ui.setconfig(b'rebase', b'experimental.inmemory', b'False', + source=b'topic-extension') + class topicrepo(repo.__class__): # attribute for other code to distinct between repo with topic and repo without @@ -481,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: @@ -510,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) @@ -1009,7 +1034,7 @@ return ui.status(_(b'changed topic to "%s" on %d revisions\n') % (bmark, rewrote)) - ui.debug(b'removing bookmark "%s" from "%d"' % (bmark, old)) + ui.debug(b'removing bookmark "%s" from "%d"\n' % (bmark, old)) bookmarks.delete(repo, tr, [bmark]) def _changecurrenttopic(repo, newtopic): diff -r 2fe3f20369eb -r 552efcc2cc30 hgext3rd/topic/compat.py --- a/hgext3rd/topic/compat.py Sat Oct 31 18:11:27 2020 +0800 +++ b/hgext3rd/topic/compat.py Sat Jan 30 20:32:38 2021 +0800 @@ -8,6 +8,8 @@ from __future__ import absolute_import from mercurial import ( + cmdutil, + extensions, pycompat, registrar, util, @@ -46,3 +48,14 @@ return set().union( *[roots for roots in repo._phasecache.phaseroots[1:] if roots] ) + +def overridecommitstatus(overridefn): + if r'tip' in cmdutil.commitstatus.__code__.co_varnames: + extensions.wrapfunction(cmdutil, 'commitstatus', overridefn) + else: + # hg <= 5.6 (976b26bdd0d8) + def _override(orig, repo, node, branch, bheads=None, opts=None): + def _orig(repo, node, branch, bheads=None, tip=None, opts=None): + return orig(repo, node, branch, bheads=bheads, opts=opts) + return overridefn(_orig, repo, node, branch, bheads=bheads, tip=None, opts=opts) + extensions.wrapfunction(cmdutil, 'commitstatus', _override) diff -r 2fe3f20369eb -r 552efcc2cc30 hgext3rd/topic/discovery.py --- a/hgext3rd/topic/discovery.py Sat Oct 31 18:11:27 2020 +0800 +++ b/hgext3rd/topic/discovery.py Sat Jan 30 20:32:38 2021 +0800 @@ -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): diff -r 2fe3f20369eb -r 552efcc2cc30 hgext3rd/topic/evolvebits.py --- a/hgext3rd/topic/evolvebits.py Sat Oct 31 18:11:27 2020 +0800 +++ b/hgext3rd/topic/evolvebits.py Sat Jan 30 20:32:38 2021 +0800 @@ -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)""" diff -r 2fe3f20369eb -r 552efcc2cc30 hgext3rd/topic/topicmap.py --- a/hgext3rd/topic/topicmap.py Sat Oct 31 18:11:27 2020 +0800 +++ b/hgext3rd/topic/topicmap.py Sat Jan 30 20:32:38 2021 +0800 @@ -6,7 +6,6 @@ from mercurial import ( branchmap, changegroup, - cmdutil, extensions, repoview, util, @@ -89,20 +88,20 @@ _setuptopicfilter(ui) _wrapbmcache(ui) extensions.wrapfunction(changegroup.cg1unpacker, 'apply', cgapply) - extensions.wrapfunction(cmdutil, 'commitstatus', commitstatus) + compat.overridecommitstatus(commitstatus) def cgapply(orig, self, repo, *args, **kwargs): """make sure a topicmap is used when applying a changegroup""" other = repo.filtered(topicfilter(repo.filtername)) return orig(self, other, *args, **kwargs) -def commitstatus(orig, repo, node, branch, bheads=None, opts=None): +def commitstatus(orig, repo, node, branch, bheads=None, tip=None, opts=None): # wrap commit status use the topic branch heads ctx = repo[node] if ctx.topic() and ctx.branch() == branch: bheads = repo.branchheads(b"%s:%s" % (branch, ctx.topic())) - ret = orig(repo, node, branch, bheads=bheads, opts=opts) + ret = orig(repo, node, branch, bheads=bheads, tip=tip, opts=opts) # logic copy-pasted from cmdutil.commitstatus() if opts is None: diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-amend-patch.t diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-check-commit.t --- a/tests/test-check-commit.t Sat Oct 31 18:11:27 2020 +0800 +++ b/tests/test-check-commit.t Sat Jan 30 20:32:38 2021 +0800 @@ -1,12 +1,12 @@ #require test-repo -Enable obsolescence to avoid the warning issue when obsmarker are found +Enable obsolescence to avoid the warning issue when obsmarkers are found $ cat << EOF >> $HGRCPATH + > [experimental] + > evolution = all > [diff] > git = yes - > [experimental] - > evolution=all > EOF Go back in the hg repo diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-check-debian.t --- a/tests/test-check-debian.t Sat Oct 31 18:11:27 2020 +0800 +++ b/tests/test-check-debian.t Sat Jan 30 20:32:38 2021 +0800 @@ -1,3 +1,5 @@ +#require test-repo + Enable obsolescence to avoid the warning issue when obsmarkers are found $ cat << EOF >> $HGRCPATH diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-check-flake8.t --- a/tests/test-check-flake8.t Sat Oct 31 18:11:27 2020 +0800 +++ b/tests/test-check-flake8.t Sat Jan 30 20:32:38 2021 +0800 @@ -4,7 +4,7 @@ $ cd "`dirname "$TESTDIR"`" -run flake8 if it exists; if it doesn't, then just skip +run flake8 on all tracked files ending in .py or with a python shebang $ hg files -0 'set:(**.py or grep("^#!.*python")) - removed()' \ > -X hgext3rd/evolve/thirdparty \ diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-check-pyflakes.t --- a/tests/test-check-pyflakes.t Sat Oct 31 18:11:27 2020 +0800 +++ b/tests/test-check-pyflakes.t Sat Jan 30 20:32:38 2021 +0800 @@ -4,8 +4,7 @@ $ cd "`dirname "$TESTDIR"`" -run pyflakes on all tracked files ending in .py or without a file ending -(skipping binary file random-seed) +run pyflakes on all tracked files ending in .py or with a python shebang $ hg files -0 'set:(**.py or grep("^#!.*python")) - removed()' \ > -X hgext3rd/evolve/thirdparty \ diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-check-setup-manifest.t --- a/tests/test-check-setup-manifest.t Sat Oct 31 18:11:27 2020 +0800 +++ b/tests/test-check-setup-manifest.t Sat Jan 30 20:32:38 2021 +0800 @@ -1,8 +1,10 @@ #require test-repo check-manifest +Enable obsolescence to avoid the warning issue when obsmarkers are found + $ cat << EOF >> $HGRCPATH > [experimental] - > evolution=all + > evolution = all > EOF Run check manifest: diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-check-tag.t --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-check-tag.t Sat Jan 30 20:32:38 2021 +0800 @@ -0,0 +1,41 @@ +#require test-repo + +Enable obsolescence to avoid the warning issue when obsmarkers are found + + $ cat << EOF >> $HGRCPATH + > [experimental] + > evolution = all + > EOF + + $ cd "$TESTDIR"/.. + +Checking all non-public tagged revisions up to the current commit, see our +release checklist for more ideas + + $ for node in `hg log --rev 'tag() and ::. and not public() and not desc("# no-check-commit")' --template '{node|short}\n'`; do + > tags=`hg log --rev $node --template '{tags}\n'` + > if echo "$tags" | grep -q ' '; then + > echo "Revision $node is tagged multiple times: $tags" + > fi + > branch=`hg log --rev $node --template '{branch}\n'` + > if [ "$branch" != "stable" ]; then + > echo "Revision $node is not on stable branch: $branch" + > fi + > # Here we skip: + > # - pullbundle because it usually has no changes (so no version bump) + > # - serverminitopic because it's not actively maintained + > if hg grep --rev $node '^__version__ = .*\.dev' hgext3rd/evolve/ hgext3rd/topic/; then + > echo "Versions should not end with .dev at tagged revision $node" + > fi + > entry=`hg cat --rev $node CHANGELOG | fgrep "$tags"` + > if [ -z "$entry" ]; then + > echo "Revision $node has no CHANGELOG entry for $tags" + > fi + > if echo "$entry" | egrep -vq ' -- [0-9]{4}-[0-9]{2}-[0-9]{2}'; then + > echo "CHANGELOG entry for $tags should have a date in YYYY-MM-DD format: $entry" + > fi + > entry=`hg cat --rev $node debian/changelog | fgrep "$tags"` + > if [ -z "$entry" ]; then + > echo "Revision $node has no debian/changelog entry for $tags" + > fi + > done diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-discovery-obshashrange.t --- a/tests/test-discovery-obshashrange.t Sat Oct 31 18:11:27 2020 +0800 +++ b/tests/test-discovery-obshashrange.t Sat Jan 30 20:32:38 2021 +0800 @@ -10,9 +10,8 @@ > [defaults] > blackbox = -l 100 > [blackbox] - > track = backupbundle, branchcache, cache, command, commandalias, - > commandfinish, debug, discovery, evoext-cache, evoext-obsdiscovery, - > incoming, tagscache + > track = backupbundle, cache, command, commandalias, commandfinish, debug, + > discovery, evoext-cache, evoext-obsdiscovery, incoming, tagscache > [experimental] > obshashrange=1 > verbose-obsolescence-exchange=1 @@ -40,8 +39,6 @@ * @0000000000000000000000000000000000000000 (*)> -R server serve --stdio exited 0 after *.?? seconds (glob) * @0000000000000000000000000000000000000000 (*)> debugbuilddag .+7 (glob) (no-windows !) * @0000000000000000000000000000000000000000 (*)> debugbuilddag ".+7" (glob) (windows !) - * @0000000000000000000000000000000000000000 (*)> updated branch cache (served) in *.???? seconds (glob) - * @0000000000000000000000000000000000000000 (*)> wrote branch cache (served) with 1 labels and 1 nodes (glob) * @0000000000000000000000000000000000000000 (*)> updated evo-ext-obscache in *.???? seconds (8r, 0o) (glob) * @0000000000000000000000000000000000000000 (*)> debugbuilddag .+7 exited 0 after *.?? seconds (glob) (no-windows !) * @0000000000000000000000000000000000000000 (*)> debugbuilddag ".+7" exited 0 after *.?? seconds (glob) (windows !) @@ -167,8 +164,6 @@ $ hg blackbox * @0000000000000000000000000000000000000000 (*)> clone *ssh://user@dummy/server* client exited 0 after *.?? seconds (glob) * @0000000000000000000000000000000000000000 (*)> pull --rev 4 (glob) - * @0000000000000000000000000000000000000000 (*)> updated branch cache (base) in *.???? seconds (glob) - * @0000000000000000000000000000000000000000 (*)> wrote branch cache (base) with 1 labels and 1 nodes (glob) * @0000000000000000000000000000000000000000 (*)> updated evo-ext-obscache in *.???? seconds (5r, 3o) (glob) * @0000000000000000000000000000000000000000 (*)> 5 incoming changes - new heads: bebd167eb94d (glob) * @0000000000000000000000000000000000000000 (*)> pull --rev 4 exited 0 after *.?? seconds (glob) @@ -253,8 +248,6 @@ * @0000000000000000000000000000000000000000 (*)> updated evo-ext-stablerange-mergepoint in *.???? seconds (1r) (glob) 1970/01/01 00:00:00 * @0000000000000000000000000000000000000000 (*)> updated evo-ext-obshashrange in *.???? seconds (1r, 1o) (glob) * @0000000000000000000000000000000000000000 (*)> obscache is out of date, falling back to slower obsstore version (glob) - * @0000000000000000000000000000000000000000 (*)> updated branch cache (served) in *.???? seconds (glob) - * @0000000000000000000000000000000000000000 (*)> wrote branch cache (served) with 1 labels and 2 nodes (glob) * @0000000000000000000000000000000000000000 (*)> updated evo-ext-obscache in *.???? seconds (1r, 1o) (glob) * @0000000000000000000000000000000000000000 (*)> 1 incoming changes - new heads: 45f8b879de92 (glob) * @0000000000000000000000000000000000000000 (*)> -R server serve --stdio exited 0 after *.?? seconds (glob) @@ -315,8 +308,6 @@ * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> add foo exited 0 after *.?? seconds (glob) * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> commit -m foo (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> obscache is out of date, falling back to slower obsstore version (glob) - * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated branch cache (served) in *.???? seconds (glob) - * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> wrote branch cache (served) with 1 labels and 1 nodes (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-obscache in *.???? seconds (1r, 0o) (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> commit -m foo exited 0 after *.?? seconds (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> debugobsolete ffffffffffffffffffffffffffffffffffffffff 45f8b879de922f6a6e620ba04205730335b6fc7e (glob) @@ -475,8 +466,6 @@ * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> log -G exited 0 after *.?? seconds (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> pull -r 6 (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> obsdiscovery, 2/6 mismatch - 1 obshashrange queries in *.???? seconds (glob) - * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated branch cache (served) in *.???? seconds (glob) - * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> wrote branch cache (served) with 1 labels and 2 nodes (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-obscache in *.???? seconds (2r, 3o) (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> 2 incoming changes - new heads: f69452c5b1af (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> pull -r 6 exited 0 after *.?? seconds (glob) @@ -918,14 +907,10 @@ * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> debugobshashrange --subranges --rev "heads(all())" exited 0 after *.?? seconds (glob) (windows !) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> pull (glob) 1970/01/01 00:00:00 * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> obsdiscovery, 0/8 mismatch - 1 obshashrange queries in *.???? seconds (glob) - * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated branch cache (served) in *.???? seconds (glob) - * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> wrote branch cache (served) with 1 labels and 2 nodes (glob) 1970/01/01 00:00:00 * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-obscache in *.???? seconds (1r, 1o) (glob) 1970/01/01 00:00:00 * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> 1 incoming changes - new heads: 4de32a90b66c (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> pull exited 0 after *.?? seconds (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> rollback (glob) - * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated branch cache (base) in *.???? seconds (glob) - * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> wrote branch cache (base) with 1 labels and 2 nodes (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> strip detected, evo-ext-obscache cache reset (glob) 1970/01/01 00:00:00 * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-obscache in *.???? seconds (8r, 15o) (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> rollback exited 0 after *.?? seconds (glob) @@ -1087,8 +1072,6 @@ * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> strip detected, evo-ext-obscache cache reset (glob) * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> updated evo-ext-obscache in *.???? seconds (5r, 11o) (glob) * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> updated evo-ext-obscache in *.???? seconds (3r, 0o) (glob) - * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> updated branch cache (base) in *.???? seconds (glob) - * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> wrote branch cache (base) with 1 labels and 1 nodes (glob) * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> 3 incoming changes - new heads: 4de32a90b66c (glob) * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> --config "extensions.strip=" strip -r "desc(\"foo\")" exited 0 after *.?? seconds (glob) (windows !) * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> --config 'extensions.strip=' strip -r 'desc("foo")' exited 0 after *.?? seconds (glob) (no-windows !) @@ -1107,8 +1090,6 @@ * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> strip detected, evo-ext-firstmerge cache reset (glob) * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> updated evo-ext-firstmerge in *.???? seconds (8r) (glob) * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> obsdiscovery, 1/8 mismatch - 1 obshashrange queries in *.???? seconds (glob) - 1970/01/01 00:00:00 * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> updated branch cache (base) in *.???? seconds (glob) - 1970/01/01 00:00:00 * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> wrote branch cache (base) with 1 labels and 2 nodes (glob) 1970/01/01 00:00:00 * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> updated evo-ext-obscache in *.???? seconds (1r, 5o) (glob) 1970/01/01 00:00:00 * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> 1 incoming changes - new heads: 45f8b879de92 (glob) * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> pull exited 0 after *.?? seconds (glob) diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-evolve-abort-orphan.t diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-evolve-abort-phasediv.t diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-evolve-content-divergent-basic.t diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-evolve-content-divergent-case-A3.t diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-evolve-content-divergent-case-A4.t diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-evolve-content-divergent-corner-cases.t --- a/tests/test-evolve-content-divergent-corner-cases.t Sat Oct 31 18:11:27 2020 +0800 +++ b/tests/test-evolve-content-divergent-corner-cases.t Sat Jan 30 20:32:38 2021 +0800 @@ -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 < 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) | | diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-evolve-content-divergent-interrupted.t --- a/tests/test-evolve-content-divergent-interrupted.t Sat Oct 31 18:11:27 2020 +0800 +++ b/tests/test-evolve-content-divergent-interrupted.t Sat Jan 30 20:32:38 2021 +0800 @@ -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') [1] @@ -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') [1] $ 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 diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-evolve-content-divergent-relocation.t --- a/tests/test-evolve-content-divergent-relocation.t Sat Oct 31 18:11:27 2020 +0800 +++ b/tests/test-evolve-content-divergent-relocation.t Sat Jan 30 20:32:38 2021 +0800 @@ -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 @@ [1] $ 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 @@ [1] $ 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 .. diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-evolve-content-divergent-stack.t --- a/tests/test-evolve-content-divergent-stack.t Sat Oct 31 18:11:27 2020 +0800 +++ b/tests/test-evolve-content-divergent-stack.t Sat Jan 30 20:32:38 2021 +0800 @@ -576,7 +576,6 @@ rebasing "divergent" content-divergent changeset c72d2885eb51 on 6c228f1e5409 rebasing "other" content-divergent changeset d45f050514c2 on 6c228f1e5409 0 files updated, 0 files merged, 0 files removed, 0 files unresolved - working directory is now at c758af982013 $ hg glog o 25:957008d45543 added d | () [default] draft diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-evolve-continue.t --- a/tests/test-evolve-continue.t Sat Oct 31 18:11:27 2020 +0800 +++ b/tests/test-evolve-continue.t Sat Jan 30 20:32:38 2021 +0800 @@ -69,7 +69,6 @@ $ hg evolve --continue evolving 4:c41c793e0ef1 "added d" - working directory is now at cb6a2ab625bb $ hg glog o 6:2a4e03d422e2 added d @@ -132,7 +131,6 @@ $ hg evolve --continue evolving 7:ad0a59d83efe "added e" evolution of 7:ad0a59d83efe created no changes to commit - working directory is now at 00a5c774cc37 $ hg glog @ 8:00a5c774cc37 added d diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-evolve-effectflags.t diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-evolve-issue5966.t --- a/tests/test-evolve-issue5966.t Sat Oct 31 18:11:27 2020 +0800 +++ b/tests/test-evolve-issue5966.t Sat Jan 30 20:32:38 2021 +0800 @@ -92,7 +92,6 @@ R a $ hg evolve --continue evolving 2:34a690fcf6ab "banana" - working directory is now at 581a2bb4704c $ hg resolve --list evolve the rest of the stack diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-evolve-issue5967.t --- a/tests/test-evolve-issue5967.t Sat Oct 31 18:11:27 2020 +0800 +++ b/tests/test-evolve-issue5967.t Sat Jan 30 20:32:38 2021 +0800 @@ -55,7 +55,6 @@ $ hg evolve --continue evolving 1:dd9b5dd30cd6 "banana" evolution of 1:dd9b5dd30cd6 created no changes to commit - working directory is now at 4d6fec23dcc4 $ hg glog @ 2: apricot diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-evolve-issue6097.t diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-evolve-obshistory-amend-then-fold.t diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-evolve-obshistory-amend.t diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-evolve-obshistory-content-divergent.t diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-evolve-obshistory-fold.t diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-evolve-obshistory-lots-of-splits.t diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-evolve-obshistory-prune.t diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-evolve-obshistory-split.t diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-evolve-orphan-merge.t diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-evolve-orphan-split.t diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-evolve-phase-divergence.t diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-evolve-phase.t --- a/tests/test-evolve-phase.t Sat Oct 31 18:11:27 2020 +0800 +++ b/tests/test-evolve-phase.t Sat Jan 30 20:32:38 2021 +0800 @@ -116,7 +116,6 @@ continue: hg evolve --continue $ hg evolve -c evolving 2:13833940840c "c" - working directory is now at 87495ea7c9ec $ hg glog o 4 - 3d2080c198e5 c (secret) diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-evolve-progress.t --- a/tests/test-evolve-progress.t Sat Oct 31 18:11:27 2020 +0800 +++ b/tests/test-evolve-progress.t Sat Jan 30 20:32:38 2021 +0800 @@ -188,6 +188,5 @@ a: remote is newer -> g getting a updating: a 2/2 files (100.00%) - working directory is now at f8d7d38c0a88 $ cd .. diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-evolve-public-content-divergent-corner-cases.t diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-evolve-public-content-divergent-discard.t --- a/tests/test-evolve-public-content-divergent-discard.t Sat Oct 31 18:11:27 2020 +0800 +++ b/tests/test-evolve-public-content-divergent-discard.t Sat Jan 30 20:32:38 2021 +0800 @@ -293,7 +293,6 @@ $ hg evolve --continue other divergent changeset 229da2719b19 has same content as local f7c1071f1e7c and differs by "description" only, discarding 229da2719b19 - working directory is now at f7c1071f1e7c $ hg evolve -l @@ -399,7 +398,6 @@ evolving 4:f89a8e2f86ac "added dh" 0 files updated, 0 files merged, 0 files removed, 0 files unresolved other divergent changeset bc309da55b88 has same content as local e800202333a4 and differs by "description" only, discarding bc309da55b88 - working directory is now at e800202333a4 $ hg evolve -l @@ -503,7 +501,6 @@ $ hg evolve --continue other divergent changeset a5bbf2042450 has same content as local e800202333a4 and differs by "description" only, discarding a5bbf2042450 - working directory is now at e800202333a4 $ hg evolve -l @@ -621,7 +618,6 @@ $ hg evolve --continue other divergent changeset 09054d1f3c97 has same content as local e800202333a4 and differs by "description" only, discarding 09054d1f3c97 - working directory is now at e800202333a4 $ hg evolve -l diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-evolve-public-content-divergent-main.t --- a/tests/test-evolve-public-content-divergent-main.t Sat Oct 31 18:11:27 2020 +0800 +++ b/tests/test-evolve-public-content-divergent-main.t Sat Jan 30 20:32:38 2021 +0800 @@ -501,7 +501,6 @@ $ hg evolve --continue committed as d87a8f56f14a - working directory is now at 93cd84bbdaca $ hg evolve -l $ cd .. @@ -629,7 +628,6 @@ $ hg evolve --continue committed as ba823b8ff683 - working directory is now at 93cd84bbdaca $ hg evolve -l $ cd .. diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-evolve-serveronly-legacy.t diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-evolve-stop-orphan.t --- a/tests/test-evolve-stop-orphan.t Sat Oct 31 18:11:27 2020 +0800 +++ b/tests/test-evolve-stop-orphan.t Sat Jan 30 20:32:38 2021 +0800 @@ -298,7 +298,6 @@ evolving 5:cb6a2ab625bb "added c" move:[6] added d atop:[10] added c - working directory is now at aec285328e90 $ hg glog o 11:cd0909a30222 added d | () draft diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-evolve-stop-phasediv.t diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-evolve-topic.t --- a/tests/test-evolve-topic.t Sat Oct 31 18:11:27 2020 +0800 +++ b/tests/test-evolve-topic.t Sat Jan 30 20:32:38 2021 +0800 @@ -438,7 +438,6 @@ move:[s4] add iii atop:[s3] add hhh move:[s5] add jjj - working directory is now at 2c295936ac04 Test to make sure that evolve don't crash with FilteredRepoLookupError when obsolete revs are in play: ------------------------------------------------------------------------------------------------------ diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-evolve.t diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-exchange-obsmarkers-case-A3.t diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-extension-isolation.t diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-fold.t diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-issue-5720.t --- a/tests/test-issue-5720.t Sat Oct 31 18:11:27 2020 +0800 +++ b/tests/test-issue-5720.t Sat Jan 30 20:32:38 2021 +0800 @@ -74,7 +74,6 @@ Continue the evolution $ hg evolve --continue evolving 2:13833940840c "c" - working directory is now at 87495ea7c9ec Tip should stay in secret phase $ hg log -G -T "{rev}: {phase}" diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-minitopic.t diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-obsolete.t diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-options.t diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-pick.t diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-prev-next.t --- a/tests/test-prev-next.t Sat Oct 31 18:11:27 2020 +0800 +++ b/tests/test-prev-next.t Sat Jan 30 20:32:38 2021 +0800 @@ -328,6 +328,10 @@ $ hg init repo $ cd repo + $ cat >> .hg/hgrc << EOF + > [ui] + > timeout.warn = 0 + > EOF $ HGEDITOR="sh ${TESTDIR}/fake-editor.sh" $ echo hi > foo $ hg ci -Am 'one' diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-prune.t --- a/tests/test-prune.t Sat Oct 31 18:11:27 2020 +0800 +++ b/tests/test-prune.t Sat Jan 30 20:32:38 2021 +0800 @@ -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 diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-push-checkheads-mixed-branch-topic-G3.t diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-push-checkheads-multi-topics-F3.t diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-push-checkheads-multibranches-E3.t diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-push-checkheads-partial-C1.t diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-push-checkheads-partial-C2.t diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-push-checkheads-partial-C3.t diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-push-checkheads-partial-C4.t diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-push-checkheads-unpushed-D1.t diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-push-checkheads-unpushed-D2.t diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-push-checkheads-unpushed-D3.t diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-push-checkheads-unpushed-D4.t diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-push-checkheads-unpushed-D5.t diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-push-checkheads-unpushed-D6.t diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-rewind.t diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-sharing.t diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-split.t --- a/tests/test-split.t Sat Oct 31 18:11:27 2020 +0800 +++ b/tests/test-split.t Sat Jan 30 20:32:38 2021 +0800 @@ -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 diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-stabilize-conflict.t diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-topic-change.t diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-topic-dest.t diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-topic-flow-publish-flag.t diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-topic-fold.t --- a/tests/test-topic-fold.t Sat Oct 31 18:11:27 2020 +0800 +++ b/tests/test-topic-fold.t Sat Jan 30 20:32:38 2021 +0800 @@ -65,7 +65,7 @@ $ hg summary parent: 3:4fd43e5bdc44 tip folded - branch: default + branch: default:myfeature commit: (clean) update: (current) phases: 2 draft diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-topic-push.t diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-topic-rebase.t --- a/tests/test-topic-rebase.t Sat Oct 31 18:11:27 2020 +0800 +++ b/tests/test-topic-rebase.t Sat Jan 30 20:32:38 2021 +0800 @@ -166,3 +166,30 @@ ### target: default (branch) s1@ myotherfeature1 (current) s0^ default3 (base) + +inmemory rebase currently drops the topic. + +BUG: inmemory rebase currently drops the topic. This is the correct output +because of there's a config override. + + $ echo x > a.txt + $ hg ci -Aqm x + $ hg rebase -r . -d 3 --config rebase.experimental.inmemory=1 + rebasing 8:1323571d782d "x" (tip myotherfeature) + switching to topic myfeature + switching to topic myotherfeature + $ logtopic + @ 9:42f2e003a46e77e1b33da4434c2689722b976b73 + | topics: myotherfeature + | o 7:6ccb9ec4913b64f3ad719ff1ba66495a70bf35a4 + | | topics: myotherfeature + | o 6:0b124ef641a7a6f4715d962650d3b367e8c800be + | | topics: + | o 4:0cd2e1a45ac4e3f9603a05ccfa6d1c70cd759bc5 + |/ topics: + o 3:fc6593661cf3256ba165cbccd6019ead17cc3726 + | topics: myfeature + o 2:be7622a7a0f43ba713e152f56441275f8e8711ef + | topics: + o 0:3e7df3b3b17c6deb4a1c70e790782fdf17af96a7 + topics: diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-topic-stack-complex.t diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-topic-stack-data.t --- a/tests/test-topic-stack-data.t Sat Oct 31 18:11:27 2020 +0800 +++ b/tests/test-topic-stack-data.t Sat Jan 30 20:32:38 2021 +0800 @@ -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 diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-topic-stack.t --- a/tests/test-topic-stack.t Sat Oct 31 18:11:27 2020 +0800 +++ b/tests/test-topic-stack.t Sat Jan 30 20:32:38 2021 +0800 @@ -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 diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-topic-tutorial.t --- a/tests/test-topic-tutorial.t Sat Oct 31 18:11:27 2020 +0800 +++ b/tests/test-topic-tutorial.t Sat Jan 30 20:32:38 2021 +0800 @@ -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 diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-topic.t --- a/tests/test-topic.t Sat Oct 31 18:11:27 2020 +0800 +++ b/tests/test-topic.t Sat Jan 30 20:32:38 2021 +0800 @@ -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 .. diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-uncommit-interactive.t diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-unstability-resolution-result.t diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-userguide.t diff -r 2fe3f20369eb -r 552efcc2cc30 tests/test-wireproto.t