Mercurial > evolve
changeset 3762:cd194eb336bd
branching: merge with stable
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 23 May 2018 01:24:02 +0200 |
parents | 777c29ac02bf (diff) a1a0cfbffd30 (current diff) |
children | 482195001997 |
files | |
diffstat | 19 files changed, 1070 insertions(+), 631 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext3rd/evolve/evolvecmd.py Tue May 15 22:17:27 2018 -0700 +++ b/hgext3rd/evolve/evolvecmd.py Wed May 23 01:24:02 2018 +0200 @@ -33,7 +33,6 @@ from mercurial.i18n import _ from . import ( - cmdrewrite, compat, exthelper, rewriteutil, @@ -245,6 +244,7 @@ tmpctx = repo[tmpid] obsolete.createmarkers(repo, [(bumped, (tmpctx,))], operation='evolve') + evolvestate['temprevs'].append(tmpid) except MergeFailure: evolvestate['current'] = bumped.hex() evolvestate['precursor'] = prec.hex() @@ -263,6 +263,7 @@ assert tr is not None bmupdate = _bookmarksupdater(repo, bumped.node(), tr) newid = None + replacementnode = None # function to update the bookmark from the rebased changeset to new resolved # changeset @@ -309,6 +310,7 @@ extra=bumped.extra()) newid = repo.commitctx(new) + replacementnode = newid if newid is None: obsolete.createmarkers(repo, [(tmpctx, ())], operation='evolve') newid = prec.node() @@ -324,7 +326,7 @@ # reroute the working copy parent to the new changeset with repo.dirstate.parentchange(): repo.dirstate.setparents(newid, node.nullid) - return (True, newid) + return (True, replacementnode) def _solvedivergent(ui, repo, divergent, evolvestate, dryrun=False, confirm=False, progresscb=None): @@ -338,7 +340,10 @@ """ repo = repo.unfiltered() divergent = repo[divergent.rev()] + evolvestate['divergent'] = divergent.node() base, others = divergentdata(divergent) + + # we don't handle split in content-divergence yet if len(others) > 1: othersstr = "[%s]" % (','.join([str(i) for i in others])) msg = _("skipping %d:%s with a changeset that got split" @@ -355,6 +360,9 @@ ui.write_err(msg) return (False, '') other = others[0] + evolvestate['other-divergent'] = other.node() + + # we don't handle merge content-divergent changesets yet if len(other.parents()) > 1: msg = _("skipping %s: %s changeset can't be " "a merge (yet)\n") % (divergent, TROUBLES['CONTENTDIVERGENT']) @@ -364,6 +372,8 @@ "| `hg prune` to kill older version.\n") ui.write_err(hint) return (False, '') + + # we don't handle content-divergent changesets with different parents yet if other.p1() not in divergent.parents(): msg = _("skipping %s: have a different parent than %s " "(not handled yet)\n") % (divergent, other) @@ -400,9 +410,12 @@ % divergent)) return (False, '') if divergent not in repo[None].parents(): - repo.ui.status(_('updating to "local" conflict\n')) - hg.update(repo, divergent.rev()) - repo.ui.note(_('merging %s changeset\n') % TROUBLES['CONTENTDIVERGENT']) + repo.ui.status(_("updating to \"local\" side of the conflict: %s\n") % + divergent.hex()[:12]) + hg.updaterepo(repo, divergent.node(), False) + # merging the two content-divergent changesets + repo.ui.status(_("merging \"other\" %s changeset '%s'\n") % + (TROUBLES['CONTENTDIVERGENT'], other.hex()[:12])) if progresscb: progresscb() stats = merge.update(repo, @@ -412,35 +425,44 @@ ancestor=base.node(), mergeancestor=True) hg._showstats(repo, stats) + + # conflicts while merging content-divergent changesets if compat.hasconflict(stats): - repo.ui.status(_("use 'hg resolve' to retry unresolved file merges " - "or 'hg update -C .' to abort\n")) - raise error.Abort('merge conflict between several amendments ' - '(this is not automated yet)', - hint="""/!\ You can try: -/!\ * manual merge + resolve => new cset X -/!\ * hg up to the parent of the amended changeset (which are named W and Z) -/!\ * hg revert --all -r X -/!\ * hg ci -m "same message as the amended changeset" => new cset Y -/!\ * hg prune -n Y W Z -""") + evolvestate.save() + raise error.Abort(_("fix conflicts and run 'hg evolve --continue' or" + " use 'hg update -C .' to abort")) + + return _completecontentdivergent(ui, repo, progresscb, divergent, other, + evolvestate) + +def _completecontentdivergent(ui, repo, progresscb, divergent, other, + evolvestate): + """completes the content-divergence resolution""" + # no conflicts were there in merging content divergent changesets, let's + # resume resolution if progresscb: progresscb() emtpycommitallowed = repo.ui.backupconfig('ui', 'allowemptycommit') tr = repo.currenttransaction() assert tr is not None try: - repo.ui.setconfig('ui', 'allowemptycommit', True, 'evolve') with repo.dirstate.parentchange(): - repo.dirstate.setparents(divergent.node(), node.nullid) - oldlen = len(repo) - cmdrewrite.amend(ui, repo, message='', logfile='') - if oldlen == len(repo): + repo.dirstate.setparents(divergent.p1().node(), node.nullid) + + newnode = repo.commit(text=divergent.description(), user=repo.ui.username()) + if newnode == divergent.node() or newnode is None: + # no changes new = divergent - # no changes + repo.ui.status(_("nothing changed\n")) + hg.updaterepo(repo, divergent.rev(), False) + obsolete.createmarkers(repo, [(other, (new,))], operation='evolve') else: - new = repo['.'] - obsolete.createmarkers(repo, [(other, (new,))], operation='evolve') + new = repo[newnode] + hg.updaterepo(repo, new.rev(), False) + obsolete.createmarkers(repo, [(other, (new,))], operation='evolve') + obsolete.createmarkers(repo, [(divergent, (new,))], operation='evolve') + + # creating markers and moving phases post-resolution phases.retractboundary(repo, tr, other.phase(), [new.node()]) return (True, new.node()) finally: @@ -1251,7 +1273,7 @@ 'revs': list(revs), 'confirm': confirmopt, 'startnode': startnode.node(), 'skippedrevs': [], 'command': 'evolve', 'orphanmerge': False, - 'bookmarkchanges': []} + 'bookmarkchanges': [], 'temprevs': []} evolvestate.addopts(stateopts) for rev in revs: curctx = repo[rev] @@ -1260,7 +1282,7 @@ progresscb, targetcat) seen += 1 if ret[0]: - evolvestate['replacements'][curctx.node()] = [ret[1]] + evolvestate['replacements'][curctx.node()] = ret[1] else: evolvestate['skippedrevs'].append(curctx.node()) @@ -1270,7 +1292,7 @@ ret = _solveone(ui, repo, repo[ret[1]], evolvestate, dryrunopt, confirmopt, progresscb, targetcat) if ret[0]: - evolvestate['replacements'][curctx.node()] = [ret[1]] + evolvestate['replacements'][curctx.node()] = ret[1] else: evolvestate['skippedrevs'].append(curctx.node()) @@ -1283,12 +1305,17 @@ """ logic for handling of `hg evolve --abort`""" with repo.wlock(), repo.lock(): + repo = repo.unfiltered() evolvedctx = [] # boolean value to say whether we should strip or not cleanup = True startnode = evolvestate['startnode'] for old, new in evolvestate['replacements'].iteritems(): - evolvedctx.append(repo[new[0]]) + if new: + evolvedctx.append(repo[new]) + for temp in evolvestate['temprevs']: + if temp: + evolvedctx.append(repo[temp]) evolvedrevs = [c.rev() for c in evolvedctx] # checking if phase changed of any of the evolved rev @@ -1349,6 +1376,21 @@ _completeorphan(ui, repo, evolvestate) elif evolvestate['category'] == 'phasedivergent': _completephasedivergent(ui, repo, evolvestate) + elif evolvestate['category'] == 'contentdivergent': + tr = None + try: + tr = repo.transaction('evolve') + divergent = evolvestate['divergent'] + other = evolvestate['other-divergent'] + repo = repo.unfiltered() + ret = _completecontentdivergent(ui, repo, progresscb, + repo[divergent], + repo[other], + evolvestate) + evolvestate['replacements'][divergent] = ret[1] + tr.close() + finally: + tr.release() else: repo.ui.status(_("continuing interrupted '%s' resolution is not yet" " supported\n") % evolvestate['category'])
--- a/hgext3rd/evolve/metadata.py Tue May 15 22:17:27 2018 -0700 +++ b/hgext3rd/evolve/metadata.py Wed May 23 01:24:02 2018 +0200 @@ -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__ = '8.0.1.dev' +__version__ = '8.1.0.dev' testedwith = '4.3.2 4.4.2 4.5.2 4.6' minimumhgversion = '4.3' buglink = 'https://bz.mercurial-scm.org/'
--- a/hgext3rd/evolve/obshistory.py Tue May 15 22:17:27 2018 -0700 +++ b/hgext3rd/evolve/obshistory.py Wed May 23 01:24:02 2018 +0200 @@ -101,15 +101,25 @@ We display the node, description (if available) and various information about obsolescence markers affecting it""" + def __init__(self, ui, repo, differ=None, diffopts=None, buffered=False): + super(obsmarker_printer, self).__init__(ui, repo, differ=differ, diffopts=diffopts, buffered=buffered) + + # Compat 4.6 + if not util.safehasattr(self, "_includediff"): + self._includediff = diffopts and diffopts.get('patch') + # print("PATCH", diffopts, self._includediff) + + self.template = diffopts and diffopts.get('template') + def show(self, ctx, copies=None, matchfn=None, **props): if self.buffered: self.ui.pushbuffer(labeled=True) changenode = ctx.node() - _props = self.diffopts.copy() - _props.update(props) + _props = {"template": self.template} fm = self.ui.formatter('debugobshistory', _props) + _debugobshistorydisplaynode(fm, self.repo, changenode) # Succs markers @@ -117,9 +127,11 @@ succs = sorted(succs) markerfm = fm.nested("markers") + for successor in succs: _debugobshistorydisplaymarker(markerfm, successor, - ctx.node(), self.repo, self.diffopts) + ctx.node(), self.repo, + self._includediff) markerfm.end() markerfm.plain('\n') @@ -373,7 +385,8 @@ markerfm = fm.nested("markers") for successor in sorted(succs): - _debugobshistorydisplaymarker(markerfm, successor, ctxnode, unfi, opts) + includediff = opts and opts.get("patch") + _debugobshistorydisplaymarker(markerfm, successor, ctxnode, unfi, includediff) markerfm.end() precs = precursors.get(ctxnode, ()) @@ -415,7 +428,7 @@ label="evolve.node evolve.missing_change_ctx") fm.plain('\n') -def _debugobshistorydisplaymarker(fm, marker, node, repo, opts): +def _debugobshistorydisplaymarker(fm, marker, node, repo, includediff=False): succnodes = marker[1] date = marker[4] metadata = dict(marker[3]) @@ -489,7 +502,7 @@ fm.write('note', "%s", metadata['note'], label="evolve.note") # Patch display - if opts.get('patch'): + if includediff is True: _patchavailable = patchavailable(node, repo, marker) if _patchavailable[0] is True:
--- a/hgext3rd/evolve/utility.py Tue May 15 22:17:27 2018 -0700 +++ b/hgext3rd/evolve/utility.py Wed May 23 01:24:02 2018 +0200 @@ -152,7 +152,7 @@ # ui.interactive is not set, fallback to default behavior and avoid showing # the prompt - if not ui.configbool('ui', 'interactive'): + if not ui.interactive(): return None promptmsg = customheader + "\n"
--- a/hgext3rd/topic/__init__.py Tue May 15 22:17:27 2018 -0700 +++ b/hgext3rd/topic/__init__.py Wed May 23 01:24:02 2018 +0200 @@ -176,7 +176,7 @@ 'topic.active': 'green', } -__version__ = '0.9.1.dev' +__version__ = '0.10.0.dev' testedwith = '4.3.3 4.4.2 4.5.2 4.6' minimumhgversion = '4.3'
--- a/tests/test-discovery-obshashrange.t Tue May 15 22:17:27 2018 -0700 +++ b/tests/test-discovery-obshashrange.t Wed May 23 01:24:02 2018 +0200 @@ -224,7 +224,6 @@ remote: adding manifests remote: adding file changes remote: added 1 changesets with 1 changes to 1 files (+1 heads) - remote: 1 new obsolescence markers bundle2-input-bundle: no-transaction bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported bundle2-input-part: "reply:obsmarkers" (params: 0 advisory) supported @@ -232,6 +231,7 @@ preparing listkeys for "phases" sending listkeys command received listkey for "phases": 58 bytes + remote: 1 new obsolescence markers $ hg -R ../server blackbox * @0000000000000000000000000000000000000000 (*)> -R server serve --stdio (glob) * @0000000000000000000000000000000000000000 (*)> strip detected, evo-ext-stablerange-mergepoint cache reset (glob)
--- a/tests/test-divergent.t Tue May 15 22:17:27 2018 -0700 +++ b/tests/test-divergent.t Wed May 23 01:24:02 2018 +0200 @@ -57,12 +57,12 @@ merge:[2] add bdivergent1 with: [3] add bdivergent2 base: [1] add _b - updating to "local" conflict - 1 files updated, 0 files merged, 1 files removed, 0 files unresolved + updating to "local" side of the conflict: c2f698071cba + merging "other" content-divergent changeset 'e708fd28d5cf' 1 files updated, 0 files merged, 0 files removed, 0 files unresolved - working directory is now at c26f1d3baed2 + working directory is now at c9708170cf11 $ hg log -G - @ 4:c26f1d3baed2@default(draft) add bdivergent1 [] + @ 4:c9708170cf11@default(draft) add bdivergent1 [] | o 0:135f39f4bd78@default(draft) add _a [] @@ -94,7 +94,7 @@ | | * 6:26c7705fee96@default(draft) add cdivergent1 [content-divergent] |/ - | o 4:c26f1d3baed2@default(draft) add bdivergent1 [] + | o 4:c9708170cf11@default(draft) add bdivergent1 [] |/ o 0:135f39f4bd78@default(draft) add _a [] @@ -102,8 +102,8 @@ merge:[6] add cdivergent1 with: [7] cdivergent2 base: [5] add _c - updating to "local" conflict - 0 files updated, 0 files merged, 0 files removed, 0 files unresolved + updating to "local" side of the conflict: 26c7705fee96 + merging "other" content-divergent changeset '0a768ef678d9' 0 files updated, 0 files merged, 0 files removed, 0 files unresolved nothing changed working directory is now at 26c7705fee96 @@ -152,8 +152,9 @@ merge:[3] add bdivergent2 with: [2] add bdivergent1 base: [1] add _b + merging "other" content-divergent changeset 'c2f698071cba' 1 files updated, 0 files merged, 0 files removed, 0 files unresolved - working directory is now at aa26817f6fbe + working directory is now at 1ed713bcebf6 $ cd ..
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-evolve-abort-orphan.t Wed May 23 01:24:02 2018 +0200 @@ -0,0 +1,504 @@ +Tests for the --abort flag for `hg evolve` command while orphan resolution +========================================================================== + +The `--abort` flag aborts the interrupted evolve by undoing all the work which +was done during resolution i.e. stripping new changesets created, moving +bookmarks back, moving working directory back. + +This test contains cases when `hg evolve` is doing orphan resolution. + +Setup +===== + + $ cat >> $HGRCPATH <<EOF + > [phases] + > publish = False + > [alias] + > glog = log -GT "{rev}:{node|short} {desc}\n ({bookmarks}) {phase}" + > [extensions] + > EOF + $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH + + $ hg init abortrepo + $ cd abortrepo + $ echo ".*\.orig" > .hgignore + $ hg add .hgignore + $ hg ci -m "added hgignore" + $ for ch in a b c d; do echo foo > $ch; hg add $ch; hg ci -qm "added "$ch; done; + + $ hg glog + @ 4:c41c793e0ef1 added d + | () draft + o 3:ca1b80f7960a added c + | () draft + o 2:b1661037fa25 added b + | () draft + o 1:c7586e2a9264 added a + | () draft + o 0:8fa14d15e168 added hgignore + () draft + +Testing --abort when no evolve is interrupted +============================================= + + $ hg evolve --abort + abort: no interrupted evolve to stop + [255] + +Testing with wrong combination of flags +======================================= + + $ hg evolve --abort --continue + abort: cannot specify both "--abort" and "--continue" + [255] + + $ hg evolve --abort --stop + abort: cannot specify both "--abort" and "--stop" + [255] + + $ hg evolve --abort --rev 3 + abort: cannot specify both "--rev" and "--abort" + [255] + + $ hg evolve --abort --any + abort: cannot specify both "--any" and "--abort" + [255] + + $ hg evolve --abort --all + abort: cannot specify both "--all" and "--abort" + [255] + +Normal testingw when no rev was evolved +======================================== + + $ hg prev + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + [3] added c + + $ echo babar > d + $ hg add d + $ hg amend + 1 new orphan changesets + + $ hg evolve --all + move:[4] added d + atop:[5] added c + merging d + warning: conflicts while merging d! (edit, then use 'hg resolve --mark') + evolve failed! + fix conflict and run 'hg evolve --continue' or use 'hg evolve --abort' to abort + abort: unresolved merge conflicts (see hg help resolve) + [255] + + $ hg evolve --abort + evolve aborted + working directory is now at e93a9161a274 + + $ hg glog + @ 5:e93a9161a274 added c + | () draft + | * 4:c41c793e0ef1 added d + | | () draft + | x 3:ca1b80f7960a added c + |/ () draft + o 2:b1661037fa25 added b + | () draft + o 1:c7586e2a9264 added a + | () draft + o 0:8fa14d15e168 added hgignore + () draft + + $ hg diff + + $ hg status + +cleaning up things for next testing + + $ hg evolve --all + move:[4] added d + atop:[5] added c + merging d + warning: conflicts while merging d! (edit, then use 'hg resolve --mark') + evolve failed! + fix conflict and run 'hg evolve --continue' or use 'hg evolve --abort' to abort + abort: unresolved merge conflicts (see hg help resolve) + [255] + $ echo foo > d + $ hg resolve -m + (no more unresolved files) + continue: hg evolve --continue + $ hg evolve --continue + evolving 4:c41c793e0ef1 "added d" + working directory is now at e83de241f751 + + $ hg up .^^^ + 0 files updated, 0 files merged, 3 files removed, 0 files unresolved + +When there are evolved revisions but on a single branch +======================================================= + + $ echo bar > c + $ hg add c + $ hg amend + 3 new orphan changesets + + $ hg evolve --all + move:[2] added b + atop:[7] added a + move:[5] added c + atop:[8] added b + merging c + warning: conflicts while merging c! (edit, then use 'hg resolve --mark') + evolve failed! + fix conflict and run 'hg evolve --continue' or use 'hg evolve --abort' to abort + abort: unresolved merge conflicts (see hg help resolve) + [255] + + $ hg glog + @ 8:0c41ec482070 added b + | () draft + o 7:125af0ed8cae added a + | () draft + | * 6:e83de241f751 added d + | | () draft + | * 5:e93a9161a274 added c + | | () draft + | x 2:b1661037fa25 added b + | | () draft + | x 1:c7586e2a9264 added a + |/ () draft + o 0:8fa14d15e168 added hgignore + () draft + + $ hg evolve --abort + 1 new orphan changesets + evolve aborted + working directory is now at 125af0ed8cae + + $ hg glog + @ 7:125af0ed8cae added a + | () draft + | * 6:e83de241f751 added d + | | () draft + | * 5:e93a9161a274 added c + | | () draft + | * 2:b1661037fa25 added b + | | () draft + | x 1:c7586e2a9264 added a + |/ () draft + o 0:8fa14d15e168 added hgignore + () draft + + $ cd .. + +Testing when evolved revs are on multiple branches +================================================== + + $ hg init repotwo + $ cd repotwo + $ echo ".*\.orig" > .hgignore + $ hg add .hgignore + $ hg ci -m "added hgignore" + $ echo a > a + $ hg ci -Aqm "added a" + $ for ch in b c; do echo $ch > $ch; hg add $ch; hg ci -m "added "$ch; done; + $ hg up .^^ + 0 files updated, 0 files merged, 2 files removed, 0 files unresolved + $ for ch in c d; do echo $ ch > $ch; hg add $ch; hg ci -m "added "$ch; done; + created new head + $ hg up .^^ + 0 files updated, 0 files merged, 2 files removed, 0 files unresolved + $ echo foo > a + $ hg ci -m "foo to a" + created new head + + $ hg glog + @ 6:8f20d4390c21 foo to a + | () draft + | o 5:bcb1c47f8520 added d + | | () draft + | o 4:86d2603075a3 added c + |/ () draft + | o 3:17509928e5bf added c + | | () draft + | o 2:9f0c80a55ddc added b + |/ () draft + o 1:2f913b0c9220 added a + | () draft + o 0:8fa14d15e168 added hgignore + () draft + + $ hg prev + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + [1] added a + $ echo aa > a + $ hg amend + 5 new orphan changesets + + $ hg evolve --all + move:[2] added b + atop:[7] added a + move:[4] added c + atop:[7] added a + move:[6] foo to a + atop:[7] added a + merging a + warning: conflicts while merging a! (edit, then use 'hg resolve --mark') + evolve failed! + fix conflict and run 'hg evolve --continue' or use 'hg evolve --abort' to abort + abort: unresolved merge conflicts (see hg help resolve) + [255] + + $ hg glog + o 9:7f8e8bd9f0b6 added c + | () draft + | o 8:db3b42ef4da7 added b + |/ () draft + @ 7:807e8e2ca559 added a + | () draft + | * 6:8f20d4390c21 foo to a + | | () draft + | | * 5:bcb1c47f8520 added d + | | | () draft + | | x 4:86d2603075a3 added c + | |/ () draft + | | * 3:17509928e5bf added c + | | | () draft + | | x 2:9f0c80a55ddc added b + | |/ () draft + | x 1:2f913b0c9220 added a + |/ () draft + o 0:8fa14d15e168 added hgignore + () draft + + $ hg evolve --abort + 2 new orphan changesets + evolve aborted + working directory is now at 807e8e2ca559 + + $ hg glog + @ 7:807e8e2ca559 added a + | () draft + | * 6:8f20d4390c21 foo to a + | | () draft + | | * 5:bcb1c47f8520 added d + | | | () draft + | | * 4:86d2603075a3 added c + | |/ () draft + | | * 3:17509928e5bf added c + | | | () draft + | | * 2:9f0c80a55ddc added b + | |/ () draft + | x 1:2f913b0c9220 added a + |/ () draft + o 0:8fa14d15e168 added hgignore + () draft + + $ hg status + + $ hg diff + +Testing when user created a new changesets on top of evolved revisions +====================================================================== + + $ hg evolve --all + move:[2] added b + atop:[7] added a + move:[4] added c + atop:[7] added a + move:[6] foo to a + atop:[7] added a + merging a + warning: conflicts while merging a! (edit, then use 'hg resolve --mark') + evolve failed! + fix conflict and run 'hg evolve --continue' or use 'hg evolve --abort' to abort + abort: unresolved merge conflicts (see hg help resolve) + [255] + $ hg glog + o 9:7f8e8bd9f0b6 added c + | () draft + | o 8:db3b42ef4da7 added b + |/ () draft + @ 7:807e8e2ca559 added a + | () draft + | * 6:8f20d4390c21 foo to a + | | () draft + | | * 5:bcb1c47f8520 added d + | | | () draft + | | x 4:86d2603075a3 added c + | |/ () draft + | | * 3:17509928e5bf added c + | | | () draft + | | x 2:9f0c80a55ddc added b + | |/ () draft + | x 1:2f913b0c9220 added a + |/ () draft + o 0:8fa14d15e168 added hgignore + () draft + + $ echo foo > a + $ hg resolve -m + (no more unresolved files) + continue: hg evolve --continue + + $ cd .. + $ hg init clonerepo + $ cd repotwo + $ hg push ../clonerepo --force + pushing to ../clonerepo + searching for changes + adding changesets + adding manifests + adding file changes + added 10 changesets with 8 changes to 5 files (+4 heads) + 3 new obsolescence markers + 3 new orphan changesets + $ cd ../clonerepo + $ hg up 7f8e8bd9f0b6 + 3 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ echo bar > bar + $ hg add bar + $ hg ci -m "made an new commit on evolved rev" + + $ hg push ../repotwo --force + pushing to ../repotwo + searching for changes + adding changesets + adding manifests + adding file changes + added 1 changesets with 1 changes to 1 files + $ cd ../repotwo + $ hg evolve --abort + warning: new changesets detected on destination branch + abort: unable to abort interrupted evolve, use 'hg evolve --stop' to stop evolve + [255] + + $ hg evolve --stop + stopped the interrupted evolve + working directory is now at 807e8e2ca559 + +Testing when the evolved revision turned public due to some other user actions +============================================================================== + + $ hg evolve --all + move:[3] added c + atop:[8] added b + move:[5] added d + atop:[9] added c + move:[6] foo to a + atop:[7] added a + merging a + warning: conflicts while merging a! (edit, then use 'hg resolve --mark') + evolve failed! + fix conflict and run 'hg evolve --continue' or use 'hg evolve --abort' to abort + abort: unresolved merge conflicts (see hg help resolve) + [255] + + $ hg glog + o 12:1c476940790a added d + | () draft + | o 11:c10a55eb0cc6 added c + | | () draft + +---o 10:48eca1ed5478 made an new commit on evolved rev + | | () draft + o | 9:7f8e8bd9f0b6 added c + | | () draft + | o 8:db3b42ef4da7 added b + |/ () draft + @ 7:807e8e2ca559 added a + | () draft + | * 6:8f20d4390c21 foo to a + | | () draft + | x 1:2f913b0c9220 added a + |/ () draft + o 0:8fa14d15e168 added hgignore + () draft + + $ hg phase -r 1c476940790a --public + + $ hg evolve --abort + cannot clean up public changesets: 1c476940790a + abort: unable to abort interrupted evolve, use 'hg evolve --stop' to stop evolve + [255] + + $ hg evolve --stop + stopped the interrupted evolve + working directory is now at 807e8e2ca559 + + $ cd .. + +Testing that bookmark should be moved back when doing `hg evolve --abort` +========================================================================= + + $ hg init repothree + $ cd repothree + $ echo ".*\.orig" > .hgignore + $ hg add .hgignore + $ hg ci -m "added hgignore" + $ for ch in a b c; do echo $ch > $ch; hg add $ch; hg ci -m "added "$ch; done; + + $ hg up .^ + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + $ hg bookmark bm1 + $ hg up .^ + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + (leaving bookmark bm1) + $ echo foo > c + $ hg add c + $ hg amend + 2 new orphan changesets + + $ hg glog + @ 4:a0086c17bfc7 added a + | () draft + | * 3:17509928e5bf added c + | | () draft + | * 2:9f0c80a55ddc added b + | | (bm1) draft + | x 1:2f913b0c9220 added a + |/ () draft + o 0:8fa14d15e168 added hgignore + () draft + + $ hg evolve --all + move:[2] added b + atop:[4] added a + move:[3] added c + atop:[5] added b + merging c + warning: conflicts while merging c! (edit, then use 'hg resolve --mark') + evolve failed! + fix conflict and run 'hg evolve --continue' or use 'hg evolve --abort' to abort + abort: unresolved merge conflicts (see hg help resolve) + [255] + + $ hg glog + @ 5:c1f4718020e3 added b + | (bm1) draft + o 4:a0086c17bfc7 added a + | () draft + | * 3:17509928e5bf added c + | | () draft + | x 2:9f0c80a55ddc added b + | | () draft + | x 1:2f913b0c9220 added a + |/ () draft + o 0:8fa14d15e168 added hgignore + () draft + + $ hg evolve --abort + 1 new orphan changesets + evolve aborted + working directory is now at a0086c17bfc7 + + $ hg glog + @ 4:a0086c17bfc7 added a + | () draft + | * 3:17509928e5bf added c + | | () draft + | * 2:9f0c80a55ddc added b + | | (bm1) draft + | x 1:2f913b0c9220 added a + |/ () draft + o 0:8fa14d15e168 added hgignore + () draft
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-evolve-abort-phasediv.t Wed May 23 01:24:02 2018 +0200 @@ -0,0 +1,216 @@ +Tests for the --abort flag for `hg evolve` command while phase-divergence resolution +==================================================================================== + +The `--abort` flag aborts the interuppted evolve by undoing all the work which +was done during resolution i.e. stripping new changesets created, moving +bookmarks back, moving working directory back. + +This test contains cases when `hg evolve` is doing phase-divergence resolution. + +Setup +===== + + $ cat >> $HGRCPATH <<EOF + > [phases] + > publish = False + > [alias] + > glog = log -GT "{rev}:{node|short} {desc}\n ({bookmarks}) {phase}" + > [extensions] + > EOF + $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH + + $ hg init abortrepo + $ cd abortrepo + $ echo ".*\.orig" > .hgignore + $ hg add .hgignore + $ hg ci -m "added hgignore" + $ for ch in a b c d; do echo foo > $ch; hg add $ch; hg ci -qm "added "$ch; done; + + $ hg glog + @ 4:c41c793e0ef1 added d + | () draft + o 3:ca1b80f7960a added c + | () draft + o 2:b1661037fa25 added b + | () draft + o 1:c7586e2a9264 added a + | () draft + o 0:8fa14d15e168 added hgignore + () draft + +Creating phase divergence, resolution of which will lead to conflicts +---------------------------------------------------------------------- + + $ hg up .^^^ + 0 files updated, 0 files merged, 3 files removed, 0 files unresolved + $ hg grab -r .~-3 + grabbing 4:c41c793e0ef1 "added d" + $ echo foobar > c + $ hg add c + $ hg amend + + $ hg glog --hidden + @ 6:ddba58020bc0 added d + | () draft + | x 5:cfe30edc6125 added d + |/ () draft + | x 4:c41c793e0ef1 added d + | | () draft + | o 3:ca1b80f7960a added c + | | () draft + | o 2:b1661037fa25 added b + |/ () draft + o 1:c7586e2a9264 added a + | () draft + o 0:8fa14d15e168 added hgignore + () draft + + $ hg phase -r c41c793e0ef1 --public --hidden + 1 new phase-divergent changesets + + $ hg glog + @ 6:ddba58020bc0 added d + | () draft + | o 4:c41c793e0ef1 added d + | | () public + | o 3:ca1b80f7960a added c + | | () public + | o 2:b1661037fa25 added b + |/ () public + o 1:c7586e2a9264 added a + | () public + o 0:8fa14d15e168 added hgignore + () public + $ hg evolve --phase-divergent + recreate:[6] added d + atop:[4] added d + rebasing to destination parent: ca1b80f7960a + merging c + warning: conflicts while merging c! (edit, then use 'hg resolve --mark') + evolution failed! + fix conflict then run 'hg evolve --continue' or use `hg evolve --abort` + abort: unresolved merge conflicts (see hg help resolve) + [255] + + $ hg evolve --abort + evolve aborted + working directory is now at ddba58020bc0 + + $ hg glog + @ 6:ddba58020bc0 added d + | () draft + | o 4:c41c793e0ef1 added d + | | () public + | o 3:ca1b80f7960a added c + | | () public + | o 2:b1661037fa25 added b + |/ () public + o 1:c7586e2a9264 added a + | () public + o 0:8fa14d15e168 added hgignore + () public + +When there are multiple phase-divergent changes, resolution of last one resulted +in conflicts +--------------------------------------------------------------------------------- + + $ echo foo > c + $ hg amend + $ hg phase -r ca1b80f --draft --force + $ hg prev + 0 files updated, 0 files merged, 2 files removed, 0 files unresolved + [1] added a + $ hg grab -r ca1b80f + grabbing 3:ca1b80f7960a "added c" + $ echo foobar > b + $ hg add b + $ hg amend + $ hg phase -r c41c793e0ef1 --public --hidden + 2 new phase-divergent changesets + + $ hg evolve --list + e44ebefe4f54: added d + phase-divergent: c41c793e0ef1 (immutable precursor) + + 28cd06b3f801: added c + phase-divergent: ca1b80f7960a (immutable precursor) + + + $ hg evolve --dry-run --all --phase-divergent + recreate:[7] added d + atop:[4] added d + hg rebase --rev e44ebefe4f54 --dest ca1b80f7960a; + hg update c41c793e0ef1; + hg revert --all --rev e44ebefe4f54; + hg commit --msg "phase-divergent update to e44ebefe4f54" + recreate:[9] added c + atop:[3] added c + hg rebase --rev 28cd06b3f801 --dest b1661037fa25; + hg update ca1b80f7960a; + hg revert --all --rev 28cd06b3f801; + hg commit --msg "phase-divergent update to 28cd06b3f801" + + $ hg glog --hidden + @ 9:28cd06b3f801 added c + | () draft + | x 8:9ff8adbe8a24 added c + |/ () draft + | * 7:e44ebefe4f54 added d + |/ () draft + | x 6:ddba58020bc0 added d + |/ () draft + | x 5:cfe30edc6125 added d + |/ () draft + | o 4:c41c793e0ef1 added d + | | () public + | o 3:ca1b80f7960a added c + | | () public + | o 2:b1661037fa25 added b + |/ () public + o 1:c7586e2a9264 added a + | () public + o 0:8fa14d15e168 added hgignore + () public + + $ hg evolve --phase-divergent --all + recreate:[7] added d + atop:[4] added d + rebasing to destination parent: ca1b80f7960a + computing new diff + committed as c41c793e0ef1 + recreate:[9] added c + atop:[3] added c + rebasing to destination parent: b1661037fa25 + merging b + warning: conflicts while merging b! (edit, then use 'hg resolve --mark') + evolution failed! + fix conflict then run 'hg evolve --continue' or use `hg evolve --abort` + abort: unresolved merge conflicts (see hg help resolve) + [255] + + $ hg evolve --abort + 1 new phase-divergent changesets + evolve aborted + working directory is now at 28cd06b3f801 + + $ hg glog --hidden + @ 9:28cd06b3f801 added c + | () draft + | x 8:9ff8adbe8a24 added c + |/ () draft + | * 7:e44ebefe4f54 added d + |/ () draft + | x 6:ddba58020bc0 added d + |/ () draft + | x 5:cfe30edc6125 added d + |/ () draft + | o 4:c41c793e0ef1 added d + | | () public + | o 3:ca1b80f7960a added c + | | () public + | o 2:b1661037fa25 added b + |/ () public + o 1:c7586e2a9264 added a + | () public + o 0:8fa14d15e168 added hgignore + () public
--- a/tests/test-evolve-abort.t Tue May 15 22:17:27 2018 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,498 +0,0 @@ -Tests for the --abort flag for `hg evolve` command -================================================== - -Setup -===== - - $ cat >> $HGRCPATH <<EOF - > [phases] - > publish = False - > [alias] - > glog = log -GT "{rev}:{node|short} {desc}\n ({bookmarks}) {phase}" - > [extensions] - > EOF - $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH - - $ hg init abortrepo - $ cd abortrepo - $ echo ".*\.orig" > .hgignore - $ hg add .hgignore - $ hg ci -m "added hgignore" - $ for ch in a b c d; do echo foo > $ch; hg add $ch; hg ci -qm "added "$ch; done; - - $ hg glog - @ 4:c41c793e0ef1 added d - | () draft - o 3:ca1b80f7960a added c - | () draft - o 2:b1661037fa25 added b - | () draft - o 1:c7586e2a9264 added a - | () draft - o 0:8fa14d15e168 added hgignore - () draft - -Testing --abort when no evolve is interrupted -============================================= - - $ hg evolve --abort - abort: no interrupted evolve to stop - [255] - -Testing with wrong combination of flags -======================================= - - $ hg evolve --abort --continue - abort: cannot specify both "--abort" and "--continue" - [255] - - $ hg evolve --abort --stop - abort: cannot specify both "--abort" and "--stop" - [255] - - $ hg evolve --abort --rev 3 - abort: cannot specify both "--rev" and "--abort" - [255] - - $ hg evolve --abort --any - abort: cannot specify both "--any" and "--abort" - [255] - - $ hg evolve --abort --all - abort: cannot specify both "--all" and "--abort" - [255] - -Normal testingw when no rev was evolved -======================================== - - $ hg prev - 0 files updated, 0 files merged, 1 files removed, 0 files unresolved - [3] added c - - $ echo babar > d - $ hg add d - $ hg amend - 1 new orphan changesets - - $ hg evolve --all - move:[4] added d - atop:[5] added c - merging d - warning: conflicts while merging d! (edit, then use 'hg resolve --mark') - evolve failed! - fix conflict and run 'hg evolve --continue' or use 'hg evolve --abort' to abort - abort: unresolved merge conflicts (see hg help resolve) - [255] - - $ hg evolve --abort - evolve aborted - working directory is now at e93a9161a274 - - $ hg glog - @ 5:e93a9161a274 added c - | () draft - | * 4:c41c793e0ef1 added d - | | () draft - | x 3:ca1b80f7960a added c - |/ () draft - o 2:b1661037fa25 added b - | () draft - o 1:c7586e2a9264 added a - | () draft - o 0:8fa14d15e168 added hgignore - () draft - - $ hg diff - - $ hg status - -cleaning up things for next testing - - $ hg evolve --all - move:[4] added d - atop:[5] added c - merging d - warning: conflicts while merging d! (edit, then use 'hg resolve --mark') - evolve failed! - fix conflict and run 'hg evolve --continue' or use 'hg evolve --abort' to abort - abort: unresolved merge conflicts (see hg help resolve) - [255] - $ echo foo > d - $ hg resolve -m - (no more unresolved files) - continue: hg evolve --continue - $ hg evolve --continue - evolving 4:c41c793e0ef1 "added d" - working directory is now at e83de241f751 - - $ hg up .^^^ - 0 files updated, 0 files merged, 3 files removed, 0 files unresolved - -When there are evolved revisions but on a single branch -======================================================= - - $ echo bar > c - $ hg add c - $ hg amend - 3 new orphan changesets - - $ hg evolve --all - move:[2] added b - atop:[7] added a - move:[5] added c - atop:[8] added b - merging c - warning: conflicts while merging c! (edit, then use 'hg resolve --mark') - evolve failed! - fix conflict and run 'hg evolve --continue' or use 'hg evolve --abort' to abort - abort: unresolved merge conflicts (see hg help resolve) - [255] - - $ hg glog - @ 8:0c41ec482070 added b - | () draft - o 7:125af0ed8cae added a - | () draft - | * 6:e83de241f751 added d - | | () draft - | * 5:e93a9161a274 added c - | | () draft - | x 2:b1661037fa25 added b - | | () draft - | x 1:c7586e2a9264 added a - |/ () draft - o 0:8fa14d15e168 added hgignore - () draft - - $ hg evolve --abort - 1 new orphan changesets - evolve aborted - working directory is now at 125af0ed8cae - - $ hg glog - @ 7:125af0ed8cae added a - | () draft - | * 6:e83de241f751 added d - | | () draft - | * 5:e93a9161a274 added c - | | () draft - | * 2:b1661037fa25 added b - | | () draft - | x 1:c7586e2a9264 added a - |/ () draft - o 0:8fa14d15e168 added hgignore - () draft - - $ cd .. - -Testing when evolved revs are on multiple branches -================================================== - - $ hg init repotwo - $ cd repotwo - $ echo ".*\.orig" > .hgignore - $ hg add .hgignore - $ hg ci -m "added hgignore" - $ echo a > a - $ hg ci -Aqm "added a" - $ for ch in b c; do echo $ch > $ch; hg add $ch; hg ci -m "added "$ch; done; - $ hg up .^^ - 0 files updated, 0 files merged, 2 files removed, 0 files unresolved - $ for ch in c d; do echo $ ch > $ch; hg add $ch; hg ci -m "added "$ch; done; - created new head - $ hg up .^^ - 0 files updated, 0 files merged, 2 files removed, 0 files unresolved - $ echo foo > a - $ hg ci -m "foo to a" - created new head - - $ hg glog - @ 6:8f20d4390c21 foo to a - | () draft - | o 5:bcb1c47f8520 added d - | | () draft - | o 4:86d2603075a3 added c - |/ () draft - | o 3:17509928e5bf added c - | | () draft - | o 2:9f0c80a55ddc added b - |/ () draft - o 1:2f913b0c9220 added a - | () draft - o 0:8fa14d15e168 added hgignore - () draft - - $ hg prev - 1 files updated, 0 files merged, 0 files removed, 0 files unresolved - [1] added a - $ echo aa > a - $ hg amend - 5 new orphan changesets - - $ hg evolve --all - move:[2] added b - atop:[7] added a - move:[4] added c - atop:[7] added a - move:[6] foo to a - atop:[7] added a - merging a - warning: conflicts while merging a! (edit, then use 'hg resolve --mark') - evolve failed! - fix conflict and run 'hg evolve --continue' or use 'hg evolve --abort' to abort - abort: unresolved merge conflicts (see hg help resolve) - [255] - - $ hg glog - o 9:7f8e8bd9f0b6 added c - | () draft - | o 8:db3b42ef4da7 added b - |/ () draft - @ 7:807e8e2ca559 added a - | () draft - | * 6:8f20d4390c21 foo to a - | | () draft - | | * 5:bcb1c47f8520 added d - | | | () draft - | | x 4:86d2603075a3 added c - | |/ () draft - | | * 3:17509928e5bf added c - | | | () draft - | | x 2:9f0c80a55ddc added b - | |/ () draft - | x 1:2f913b0c9220 added a - |/ () draft - o 0:8fa14d15e168 added hgignore - () draft - - $ hg evolve --abort - 2 new orphan changesets - evolve aborted - working directory is now at 807e8e2ca559 - - $ hg glog - @ 7:807e8e2ca559 added a - | () draft - | * 6:8f20d4390c21 foo to a - | | () draft - | | * 5:bcb1c47f8520 added d - | | | () draft - | | * 4:86d2603075a3 added c - | |/ () draft - | | * 3:17509928e5bf added c - | | | () draft - | | * 2:9f0c80a55ddc added b - | |/ () draft - | x 1:2f913b0c9220 added a - |/ () draft - o 0:8fa14d15e168 added hgignore - () draft - - $ hg status - - $ hg diff - -Testing when user created a new changesets on top of evolved revisions -====================================================================== - - $ hg evolve --all - move:[2] added b - atop:[7] added a - move:[4] added c - atop:[7] added a - move:[6] foo to a - atop:[7] added a - merging a - warning: conflicts while merging a! (edit, then use 'hg resolve --mark') - evolve failed! - fix conflict and run 'hg evolve --continue' or use 'hg evolve --abort' to abort - abort: unresolved merge conflicts (see hg help resolve) - [255] - $ hg glog - o 9:7f8e8bd9f0b6 added c - | () draft - | o 8:db3b42ef4da7 added b - |/ () draft - @ 7:807e8e2ca559 added a - | () draft - | * 6:8f20d4390c21 foo to a - | | () draft - | | * 5:bcb1c47f8520 added d - | | | () draft - | | x 4:86d2603075a3 added c - | |/ () draft - | | * 3:17509928e5bf added c - | | | () draft - | | x 2:9f0c80a55ddc added b - | |/ () draft - | x 1:2f913b0c9220 added a - |/ () draft - o 0:8fa14d15e168 added hgignore - () draft - - $ echo foo > a - $ hg resolve -m - (no more unresolved files) - continue: hg evolve --continue - - $ cd .. - $ hg init clonerepo - $ cd repotwo - $ hg push ../clonerepo --force - pushing to ../clonerepo - searching for changes - adding changesets - adding manifests - adding file changes - added 10 changesets with 8 changes to 5 files (+4 heads) - 3 new obsolescence markers - 3 new orphan changesets - $ cd ../clonerepo - $ hg up 7f8e8bd9f0b6 - 3 files updated, 0 files merged, 0 files removed, 0 files unresolved - $ echo bar > bar - $ hg add bar - $ hg ci -m "made an new commit on evolved rev" - - $ hg push ../repotwo --force - pushing to ../repotwo - searching for changes - adding changesets - adding manifests - adding file changes - added 1 changesets with 1 changes to 1 files - $ cd ../repotwo - $ hg evolve --abort - warning: new changesets detected on destination branch - abort: unable to abort interrupted evolve, use 'hg evolve --stop' to stop evolve - [255] - - $ hg evolve --stop - stopped the interrupted evolve - working directory is now at 807e8e2ca559 - -Testing when the evolved revision turned public due to some other user actions -============================================================================== - - $ hg evolve --all - move:[3] added c - atop:[8] added b - move:[5] added d - atop:[9] added c - move:[6] foo to a - atop:[7] added a - merging a - warning: conflicts while merging a! (edit, then use 'hg resolve --mark') - evolve failed! - fix conflict and run 'hg evolve --continue' or use 'hg evolve --abort' to abort - abort: unresolved merge conflicts (see hg help resolve) - [255] - - $ hg glog - o 12:1c476940790a added d - | () draft - | o 11:c10a55eb0cc6 added c - | | () draft - +---o 10:48eca1ed5478 made an new commit on evolved rev - | | () draft - o | 9:7f8e8bd9f0b6 added c - | | () draft - | o 8:db3b42ef4da7 added b - |/ () draft - @ 7:807e8e2ca559 added a - | () draft - | * 6:8f20d4390c21 foo to a - | | () draft - | x 1:2f913b0c9220 added a - |/ () draft - o 0:8fa14d15e168 added hgignore - () draft - - $ hg phase -r 1c476940790a --public - - $ hg evolve --abort - cannot clean up public changesets: 1c476940790a - abort: unable to abort interrupted evolve, use 'hg evolve --stop' to stop evolve - [255] - - $ hg evolve --stop - stopped the interrupted evolve - working directory is now at 807e8e2ca559 - - $ cd .. - -Testing that bookmark should be moved back when doing `hg evolve --abort` -========================================================================= - - $ hg init repothree - $ cd repothree - $ echo ".*\.orig" > .hgignore - $ hg add .hgignore - $ hg ci -m "added hgignore" - $ for ch in a b c; do echo $ch > $ch; hg add $ch; hg ci -m "added "$ch; done; - - $ hg up .^ - 0 files updated, 0 files merged, 1 files removed, 0 files unresolved - $ hg bookmark bm1 - $ hg up .^ - 0 files updated, 0 files merged, 1 files removed, 0 files unresolved - (leaving bookmark bm1) - $ echo foo > c - $ hg add c - $ hg amend - 2 new orphan changesets - - $ hg glog - @ 4:a0086c17bfc7 added a - | () draft - | * 3:17509928e5bf added c - | | () draft - | * 2:9f0c80a55ddc added b - | | (bm1) draft - | x 1:2f913b0c9220 added a - |/ () draft - o 0:8fa14d15e168 added hgignore - () draft - - $ hg evolve --all - move:[2] added b - atop:[4] added a - move:[3] added c - atop:[5] added b - merging c - warning: conflicts while merging c! (edit, then use 'hg resolve --mark') - evolve failed! - fix conflict and run 'hg evolve --continue' or use 'hg evolve --abort' to abort - abort: unresolved merge conflicts (see hg help resolve) - [255] - - $ hg glog - @ 5:c1f4718020e3 added b - | (bm1) draft - o 4:a0086c17bfc7 added a - | () draft - | * 3:17509928e5bf added c - | | () draft - | x 2:9f0c80a55ddc added b - | | () draft - | x 1:2f913b0c9220 added a - |/ () draft - o 0:8fa14d15e168 added hgignore - () draft - - $ hg evolve --abort - 1 new orphan changesets - evolve aborted - working directory is now at a0086c17bfc7 - - $ hg glog - @ 4:a0086c17bfc7 added a - | () draft - | * 3:17509928e5bf added c - | | () draft - | * 2:9f0c80a55ddc added b - | | (bm1) draft - | x 1:2f913b0c9220 added a - |/ () draft - o 0:8fa14d15e168 added hgignore - () draft
--- a/tests/test-evolve-obshistory.t Tue May 15 22:17:27 2018 -0700 +++ b/tests/test-evolve-obshistory.t Wed May 23 01:24:02 2018 +0200 @@ -222,9 +222,9 @@ (use --hidden to access hidden revisions) [255] $ hg update --hidden "desc(A0)" - updating to a hidden changeset 471f378eab4c + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + updated to hidden changeset 471f378eab4c (hidden revision '471f378eab4c' was rewritten as: 4ae3a4151de9) - 1 files updated, 0 files merged, 0 files removed, 0 files unresolved working directory parent is obsolete! (471f378eab4c) (use 'hg evolve' to update to its successor: 4ae3a4151de9) @@ -325,9 +325,9 @@ (use --hidden to access hidden revisions) [255] $ hg up --hidden -r 'desc(B0)' - updating to a hidden changeset 0dec01379d3b + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + updated to hidden changeset 0dec01379d3b (hidden revision '0dec01379d3b' is pruned) - 1 files updated, 0 files merged, 0 files removed, 0 files unresolved working directory parent is obsolete! (0dec01379d3b) (use 'hg evolve' to update to its parent successor) @@ -524,9 +524,9 @@ (use --hidden to access hidden revisions) [255] $ hg update --hidden 'min(desc(A0))' - updating to a hidden changeset 471597cad322 + 0 files updated, 0 files merged, 0 files removed, 0 files unresolved + updated to hidden changeset 471597cad322 (hidden revision '471597cad322' was split as: 337fec4d2edc, f257fde29c7a) - 0 files updated, 0 files merged, 0 files removed, 0 files unresolved working directory parent is obsolete! (471597cad322) (use 'hg evolve' to update to its tipmost successor: 337fec4d2edc, f257fde29c7a) @@ -805,9 +805,9 @@ (use --hidden to access hidden revisions) [255] $ hg update --hidden 'min(desc(A0))' - updating to a hidden changeset de7290d8b885 + 0 files updated, 0 files merged, 0 files removed, 0 files unresolved + updated to hidden changeset de7290d8b885 (hidden revision 'de7290d8b885' was split as: 337fec4d2edc, f257fde29c7a and 2 more) - 0 files updated, 0 files merged, 0 files removed, 0 files unresolved working directory parent is obsolete! (de7290d8b885) (use 'hg evolve' to update to its tipmost successor: 337fec4d2edc, f257fde29c7a and 2 more) @@ -1030,9 +1030,9 @@ (use --hidden to access hidden revisions) [255] $ hg update --hidden 'desc(A0)' - updating to a hidden changeset 471f378eab4c + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + updated to hidden changeset 471f378eab4c (hidden revision '471f378eab4c' was rewritten as: eb5a0daa2192) - 0 files updated, 0 files merged, 1 files removed, 0 files unresolved working directory parent is obsolete! (471f378eab4c) (use 'hg evolve' to update to its successor: eb5a0daa2192) $ hg update 0dec01379d3b @@ -1040,9 +1040,9 @@ (use --hidden to access hidden revisions) [255] $ hg update --hidden 'desc(B0)' - updating to a hidden changeset 0dec01379d3b + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + updated to hidden changeset 0dec01379d3b (hidden revision '0dec01379d3b' was rewritten as: eb5a0daa2192) - 1 files updated, 0 files merged, 0 files removed, 0 files unresolved working directory parent is obsolete! (0dec01379d3b) (use 'hg evolve' to update to its successor: eb5a0daa2192) @@ -1077,9 +1077,9 @@ summary: ROOT $ hg update --hidden 'desc(A0)' - updating to a hidden changeset 471f378eab4c + 0 files updated, 0 files merged, 0 files removed, 0 files unresolved + updated to hidden changeset 471f378eab4c (hidden revision '471f378eab4c' was rewritten as: fdf9bde5129a) - 0 files updated, 0 files merged, 0 files removed, 0 files unresolved working directory parent is obsolete! (471f378eab4c) (use 'hg evolve' to update to its successor: fdf9bde5129a) $ hg amend -m "A2" @@ -1377,9 +1377,9 @@ (use --hidden to access hidden revisions) [255] $ hg update --hidden 'desc(A0)' - updating to a hidden changeset 471f378eab4c + 0 files updated, 0 files merged, 0 files removed, 0 files unresolved + updated to hidden changeset 471f378eab4c (hidden revision '471f378eab4c' has diverged) - 0 files updated, 0 files merged, 0 files removed, 0 files unresolved working directory parent is obsolete! (471f378eab4c) (471f378eab4c has diverged, use 'hg evolve --list --content-divergent' to resolve the issue) @@ -1608,15 +1608,15 @@ (use --hidden to access hidden revisions) [255] $ hg update --hidden 'desc(A0)' - updating to a hidden changeset 471f378eab4c + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + updated to hidden changeset 471f378eab4c (hidden revision '471f378eab4c' was rewritten as: eb5a0daa2192) - 0 files updated, 0 files merged, 1 files removed, 0 files unresolved working directory parent is obsolete! (471f378eab4c) (use 'hg evolve' to update to its successor: eb5a0daa2192) $ hg update --hidden 0dec01379d3b - updating to a hidden changeset 0dec01379d3b + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + updated to hidden changeset 0dec01379d3b (hidden revision '0dec01379d3b' was rewritten as: eb5a0daa2192) - 1 files updated, 0 files merged, 0 files removed, 0 files unresolved working directory parent is obsolete! (0dec01379d3b) (use 'hg evolve' to update to its successor: eb5a0daa2192) $ hg update 0dec01379d3b
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-evolve-stop-contentdiv.t Wed May 23 01:24:02 2018 +0200 @@ -0,0 +1,99 @@ +Tests for the --stop flag for `hg evolve` command while resolving content-divergence +================================================================================== + +The `--stop` flag stops the interrupted evolution and delete the state file so +user can do other things and comeback and do evolution later on + +This is testing cases when `hg evolve` command is doing content-divergence resolution. + +Setup +===== + + $ cat >> $HGRCPATH <<EOF + > [alias] + > glog = log -GT "{rev}:{node|short} {desc}\n ({bookmarks}) {phase}" + > [extensions] + > EOF + $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH + + $ hg init stoprepo + $ cd stoprepo + $ echo ".*\.orig" > .hgignore + $ hg add .hgignore + $ hg ci -m "added hgignore" + $ for ch in a b c d; do echo foo > $ch; hg add $ch; hg ci -qm "added "$ch; done; + + $ hg glog + @ 4:c41c793e0ef1 added d + | () draft + o 3:ca1b80f7960a added c + | () draft + o 2:b1661037fa25 added b + | () draft + o 1:c7586e2a9264 added a + | () draft + o 0:8fa14d15e168 added hgignore + () draft + +Creating content divergence, resolution of which will lead to conflicts +----------------------------------------------------------------------- + + $ echo bar > d + $ hg amend + + $ hg up c41c793e0ef1 --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) + working directory parent is obsolete! (c41c793e0ef1) + (use 'hg evolve' to update to its successor: e49523854bc8) + + $ echo foobar > d + $ hg amend + 2 new content-divergent changesets + $ hg glog --hidden + @ 6:9c1631e352d9 added d + | () draft + | * 5:e49523854bc8 added d + |/ () draft + | x 4:c41c793e0ef1 added d + |/ () draft + o 3:ca1b80f7960a added c + | () draft + o 2:b1661037fa25 added b + | () draft + o 1:c7586e2a9264 added a + | () draft + o 0:8fa14d15e168 added hgignore + () draft + + $ hg evolve --content-divergent + merge:[6] added d + with: [5] added d + base: [4] added d + merging "other" content-divergent changeset 'e49523854bc8' + 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 + abort: fix conflicts and run 'hg evolve --continue' or use 'hg update -C .' to abort + [255] + + $ hg evolve --stop + stopped the interrupted evolve + working directory is now at 9c1631e352d9 + + $ hg glog --hidden + @ 6:9c1631e352d9 added d + | () draft + | * 5:e49523854bc8 added d + |/ () draft + | x 4:c41c793e0ef1 added d + |/ () draft + o 3:ca1b80f7960a added c + | () draft + o 2:b1661037fa25 added b + | () draft + o 1:c7586e2a9264 added a + | () draft + o 0:8fa14d15e168 added hgignore + () draft
--- a/tests/test-evolve-templates.t Tue May 15 22:17:27 2018 -0700 +++ b/tests/test-evolve-templates.t Wed May 23 01:24:02 2018 +0200 @@ -63,9 +63,9 @@ Check templates --------------- $ hg up 'desc(A0)' --hidden - updating to a hidden changeset 471f378eab4c + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + updated to hidden changeset 471f378eab4c (hidden revision '471f378eab4c' was rewritten as: d004c8f274b9) - 1 files updated, 0 files merged, 0 files removed, 0 files unresolved working directory parent is obsolete! (471f378eab4c) (use 'hg evolve' to update to its successor: d004c8f274b9) @@ -156,9 +156,9 @@ $ hg up 'desc(A1)' --hidden - updating to a hidden changeset a468dc9b3633 + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + updated to hidden changeset a468dc9b3633 (hidden revision 'a468dc9b3633' was rewritten as: d004c8f274b9) - 1 files updated, 0 files merged, 0 files removed, 0 files unresolved working directory parent is obsolete! (a468dc9b3633) (use 'hg evolve' to update to its successor: d004c8f274b9) @@ -332,9 +332,9 @@ --------------- $ hg up 'obsolete()' --hidden - updating to a hidden changeset 471597cad322 + 0 files updated, 0 files merged, 0 files removed, 0 files unresolved + updated to hidden changeset 471597cad322 (hidden revision '471597cad322' was split as: 337fec4d2edc, f257fde29c7a) - 0 files updated, 0 files merged, 0 files removed, 0 files unresolved working directory parent is obsolete! (471597cad322) (use 'hg evolve' to update to its tipmost successor: 337fec4d2edc, f257fde29c7a) @@ -463,9 +463,9 @@ --------------- $ hg up 'desc(A0)' --hidden - updating to a hidden changeset 471f378eab4c + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + updated to hidden changeset 471f378eab4c (hidden revision '471f378eab4c' was rewritten as: eb5a0daa2192) - 0 files updated, 0 files merged, 1 files removed, 0 files unresolved working directory parent is obsolete! (471f378eab4c) (use 'hg evolve' to update to its successor: eb5a0daa2192) @@ -490,9 +490,9 @@ o ea207398892e $ hg up 'desc(B0)' --hidden - updating to a hidden changeset 0dec01379d3b + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + updated to hidden changeset 0dec01379d3b (hidden revision '0dec01379d3b' was rewritten as: eb5a0daa2192) - 1 files updated, 0 files merged, 0 files removed, 0 files unresolved working directory parent is obsolete! (0dec01379d3b) (use 'hg evolve' to update to its successor: eb5a0daa2192) @@ -597,9 +597,9 @@ summary: ROOT $ hg update --hidden 'desc(A0)' - updating to a hidden changeset 471f378eab4c + 0 files updated, 0 files merged, 0 files removed, 0 files unresolved + updated to hidden changeset 471f378eab4c (hidden revision '471f378eab4c' was rewritten as: fdf9bde5129a) - 0 files updated, 0 files merged, 0 files removed, 0 files unresolved working directory parent is obsolete! (471f378eab4c) (use 'hg evolve' to update to its successor: fdf9bde5129a) $ hg amend -m "A2" @@ -638,9 +638,9 @@ --------------- $ hg up 'desc(A0)' --hidden - updating to a hidden changeset 471f378eab4c + 0 files updated, 0 files merged, 0 files removed, 0 files unresolved + updated to hidden changeset 471f378eab4c (hidden revision '471f378eab4c' has diverged) - 0 files updated, 0 files merged, 0 files removed, 0 files unresolved working directory parent is obsolete! (471f378eab4c) (471f378eab4c has diverged, use 'hg evolve --list --content-divergent' to resolve the issue) @@ -802,9 +802,9 @@ --------------- $ hg up 'desc(A0)' --hidden - updating to a hidden changeset 471f378eab4c + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + updated to hidden changeset 471f378eab4c (hidden revision '471f378eab4c' was rewritten as: eb5a0daa2192) - 0 files updated, 0 files merged, 1 files removed, 0 files unresolved working directory parent is obsolete! (471f378eab4c) (use 'hg evolve' to update to its successor: eb5a0daa2192) $ hg tlog @@ -827,9 +827,9 @@ o ea207398892e $ hg up 'desc(B0)' --hidden - updating to a hidden changeset 0dec01379d3b + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + updated to hidden changeset 0dec01379d3b (hidden revision '0dec01379d3b' was rewritten as: eb5a0daa2192) - 1 files updated, 0 files merged, 0 files removed, 0 files unresolved working directory parent is obsolete! (0dec01379d3b) (use 'hg evolve' to update to its successor: eb5a0daa2192) $ hg tlog @@ -861,9 +861,9 @@ $ hg up 'desc(B1)' --hidden - updating to a hidden changeset b7ea6d14e664 + 0 files updated, 0 files merged, 0 files removed, 0 files unresolved + updated to hidden changeset b7ea6d14e664 (hidden revision 'b7ea6d14e664' was rewritten as: eb5a0daa2192) - 0 files updated, 0 files merged, 0 files removed, 0 files unresolved working directory parent is obsolete! (b7ea6d14e664) (use 'hg evolve' to update to its successor: eb5a0daa2192) $ hg tlog @@ -1120,9 +1120,9 @@ o ea207398892e $ hg up -r "desc(B0)" --hidden - updating to a hidden changeset 0dec01379d3b + 2 files updated, 0 files merged, 1 files removed, 0 files unresolved + updated to hidden changeset 0dec01379d3b (hidden revision '0dec01379d3b' is pruned) - 2 files updated, 0 files merged, 1 files removed, 0 files unresolved working directory parent is obsolete! (0dec01379d3b) (use 'hg evolve' to update to its parent successor) $ hg tlog @@ -1486,9 +1486,9 @@ o ea207398892e $ hg up --hidden 4 - updating to a hidden changeset 9bd10a0775e4 + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + updated to hidden changeset 9bd10a0775e4 (hidden revision '9bd10a0775e4' has diverged) - 1 files updated, 0 files merged, 0 files removed, 0 files unresolved working directory parent is obsolete! (9bd10a0775e4) (9bd10a0775e4 has diverged, use 'hg evolve --list --content-divergent' to resolve the issue) $ hg rebase -r 7 -d 8 --config extensions.rebase= @@ -1551,9 +1551,9 @@ ------------ $ hg up "desc(A0)" --hidden - updating to a hidden changeset 471f378eab4c + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + updated to hidden changeset 471f378eab4c (hidden revision '471f378eab4c' is pruned) - 1 files updated, 0 files merged, 0 files removed, 0 files unresolved working directory parent is obsolete! (471f378eab4c) (use 'hg evolve' to update to its parent successor) $ hg tlog
--- a/tests/test-evolve.t Tue May 15 22:17:27 2018 -0700 +++ b/tests/test-evolve.t Wed May 23 01:24:02 2018 +0200 @@ -1254,18 +1254,18 @@ Shows "use 'hg evolve' to..." hints iff the evolve command is enabled $ hg --hidden up 14 - updating to a hidden changeset 484fb3cfa7f2 + 2 files updated, 0 files merged, 1 files removed, 0 files unresolved + updated to hidden changeset 484fb3cfa7f2 (hidden revision '484fb3cfa7f2' was rewritten as: 98e171e2f272) - 2 files updated, 0 files merged, 1 files removed, 0 files unresolved working directory parent is obsolete! (484fb3cfa7f2) $ cat >> $HGRCPATH <<EOF > [experimental] > evolutioncommands=evolve > EOF $ hg --hidden up 15 - updating to a hidden changeset daa1ff1c7fbd + 1 files updated, 0 files merged, 1 files removed, 0 files unresolved + updated to hidden changeset daa1ff1c7fbd (hidden revision 'daa1ff1c7fbd' was rewritten as: 0c049e4e5422) - 1 files updated, 0 files merged, 1 files removed, 0 files unresolved working directory parent is obsolete! (daa1ff1c7fbd) (use 'hg evolve' to update to its successor: 0c049e4e5422)
--- a/tests/test-obsolete.t Tue May 15 22:17:27 2018 -0700 +++ b/tests/test-obsolete.t Wed May 23 01:24:02 2018 +0200 @@ -121,7 +121,7 @@ 4 - 725c380fe99b $ hg up --hidden 3 -q - updating to a hidden changeset 0d3f46688ccc + updated to hidden changeset 0d3f46688ccc (hidden revision '0d3f46688ccc' was rewritten as: 725c380fe99b) working directory parent is obsolete! (0d3f46688ccc) (reported by parents too) @@ -707,7 +707,7 @@ $ hg up --hidden 3 -q - updating to a hidden changeset 0d3f46688ccc + updated to hidden changeset 0d3f46688ccc (hidden revision '0d3f46688ccc' has diverged) working directory parent is obsolete! (0d3f46688ccc) $ hg evolve @@ -727,9 +727,9 @@ Check import reports new unstable changeset: $ hg up --hidden 2 - updating to a hidden changeset 4538525df7e2 + 1 files updated, 0 files merged, 1 files removed, 0 files unresolved + updated to hidden changeset 4538525df7e2 (hidden revision '4538525df7e2' has diverged) - 1 files updated, 0 files merged, 1 files removed, 0 files unresolved working directory parent is obsolete! (4538525df7e2) (4538525df7e2 has diverged, use 'hg evolve --list --content-divergent' to resolve the issue) $ hg export 9468a5f5d8b2 | hg import -
--- a/tests/test-sharing.t Tue May 15 22:17:27 2018 -0700 +++ b/tests/test-sharing.t Wed May 23 01:24:02 2018 +0200 @@ -509,13 +509,14 @@ merge:[5] fix bug 24 (v2 by bob) with: [6] fix bug 24 (v2 by alice) base: [4] fix bug 24 (v1) + merging "other" content-divergent changeset 'e3f99ce9d9cd' 0 files updated, 1 files merged, 0 files removed, 0 files unresolved - working directory is now at 5ad6037c046c + working directory is now at 711ede2d7a26 $ hg log -q -r 'contentdivergent()' Figure SG10: Bob's repository after fixing divergence. $ hg --hidden shortlog -G -r 3:: - @ 7:5ad6037c046c draft fix bug 24 (v2 by bob) + @ 7:711ede2d7a26 draft fix bug 24 (v2 by bob) | | x 6:e3f99ce9d9cd draft fix bug 24 (v2 by alice) |/ @@ -526,7 +527,7 @@ o 3:a06ec1bf97bd public fix bug 15 (v2) | ~ - $ hg --hidden shortlog -r 'precursors(5ad6037c046c)' + $ hg --hidden shortlog -r 'precursors(711ede2d7a26)' 5:a360947f6faf draft fix bug 24 (v2 by bob) 6:e3f99ce9d9cd draft fix bug 24 (v2 by alice) $ cat file1
--- a/tests/test-stabilize-result.t Tue May 15 22:17:27 2018 -0700 +++ b/tests/test-stabilize-result.t Wed May 23 01:24:02 2018 +0200 @@ -239,9 +239,9 @@ $ echo 'babar' >> a $ hg amend $ hg up --hidden 3932c176bbaa - updating to a hidden changeset 3932c176bbaa + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + updated to hidden changeset 3932c176bbaa (hidden revision '3932c176bbaa' was rewritten as: d2f173e25686) - 1 files updated, 0 files merged, 0 files removed, 0 files unresolved working directory parent is obsolete! (3932c176bbaa) (use 'hg evolve' to update to its successor: d2f173e25686) $ mv a a.old @@ -290,20 +290,18 @@ merge:[14] More addition with: [13] More addition base: [12] More addition - merging content-divergent changeset + merging "other" content-divergent changeset 'd2f173e25686' resolving manifests merging a 0 files updated, 1 files merged, 0 files removed, 0 files unresolved - amending changeset eacc9c8240fe committing files: a committing manifest committing changelog - committed changeset 15:f344982e63c4 - working directory is now at f344982e63c4 + working directory is now at 4d6ed26797bc $ hg st $ glog - @ 15:f344982e63c4@default(draft) bk:[] More addition + @ 15:4d6ed26797bc@default(draft) bk:[] More addition | | o 11:8fc63fe1f297@default(draft) bk:[] phase-divergent update to 1cf0aacfd363: | | @@ -316,7 +314,7 @@ o 0:07f494440405@default(public) bk:[] adda $ hg summary - parent: 15:f344982e63c4 tip + parent: 15:4d6ed26797bc tip More addition branch: default commit: (clean) @@ -327,11 +325,11 @@ # User test # Date 0 0 # Thu Jan 01 00:00:00 1970 +0000 - # Node ID f344982e63c462b1e44c0371c804685389e673a9 + # Node ID 4d6ed26797bc392c0099e48402a5134e669f1a60 # Parent 7bc2f5967f5e4ed277f60a89b7b04cc5d6407ced More addition - diff -r 7bc2f5967f5e -r f344982e63c4 a + diff -r 7bc2f5967f5e -r 4d6ed26797bc a --- a/a Thu Jan 01 00:00:00 1970 +0000 +++ b/a Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +1,9 @@ @@ -349,11 +347,11 @@ ------------------------------------------------- $ hg up --hidden 3932c176bbaa - updating to a hidden changeset 3932c176bbaa - (hidden revision '3932c176bbaa' was rewritten as: f344982e63c4) 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + updated to hidden changeset 3932c176bbaa + (hidden revision '3932c176bbaa' was rewritten as: 4d6ed26797bc) working directory parent is obsolete! (3932c176bbaa) - (use 'hg evolve' to update to its successor: f344982e63c4) + (use 'hg evolve' to update to its successor: 4d6ed26797bc) $ echo 'gotta break' >> a $ hg amend 2 new content-divergent changesets @@ -362,10 +360,27 @@ $ hg phase 'contentdivergent()' 15: draft 17: draft + + $ glog + @ 17:0b336205a5d0@default(draft) bk:[] More addition (2) + | + | * 15:4d6ed26797bc@default(draft) bk:[] More addition + |/ + | o 11:8fc63fe1f297@default(draft) bk:[] phase-divergent update to 1cf0aacfd363: + | | + o | 7:7bc2f5967f5e@default(draft) bk:[] add c + | | + | o 6:1cf0aacfd363@default(public) bk:[] newer a + |/ + o 5:66719795a494@default(public) bk:[changea] changea + | + o 0:07f494440405@default(public) bk:[] adda + + $ hg evolve -qn --content-divergent hg update -c 0b336205a5d0 && - hg merge f344982e63c4 && - hg commit -m "auto merge resolving conflict between 0b336205a5d0 and f344982e63c4"&& + hg merge 4d6ed26797bc && + hg commit -m "auto merge resolving conflict between 0b336205a5d0 and 4d6ed26797bc"&& hg up -C 3932c176bbaa && hg revert --all --rev tip && hg commit -m "`hg log -r 0b336205a5d0 --template={desc}`"; @@ -373,16 +388,62 @@ merge:[17] More addition (2) with: [15] More addition base: [12] More addition + merging "other" content-divergent changeset '4d6ed26797bc' merging a warning: conflicts while merging a! (edit, then use 'hg resolve --mark') 0 files updated, 0 files merged, 0 files removed, 1 files unresolved - use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abort - abort: merge conflict between several amendments (this is not automated yet) - (/!\ You can try: - /!\ * manual merge + resolve => new cset X - /!\ * hg up to the parent of the amended changeset (which are named W and Z) - /!\ * hg revert --all -r X - /!\ * hg ci -m "same message as the amended changeset" => new cset Y - /!\ * hg prune -n Y W Z - ) + abort: fix conflicts and run 'hg evolve --continue' or use 'hg update -C .' to abort [255] + + $ cat > a <<EOF + > jungle + > a + > flore + > arthur + > zephir + > some + > less + > conflict + > babar + > EOF + + $ hg resolve -m + (no more unresolved files) + continue: hg evolve --continue + $ hg evolve --continue + working directory is now at e8746835a2a1 + $ glog + @ 18:e8746835a2a1@default(draft) bk:[] More addition (2) + | + | o 11:8fc63fe1f297@default(draft) bk:[] phase-divergent update to 1cf0aacfd363: + | | + o | 7:7bc2f5967f5e@default(draft) bk:[] add c + | | + | o 6:1cf0aacfd363@default(public) bk:[] newer a + |/ + o 5:66719795a494@default(public) bk:[changea] changea + | + o 0:07f494440405@default(public) bk:[] adda + + $ hg exp + # HG changeset patch + # User test + # Date 0 0 + # Thu Jan 01 00:00:00 1970 +0000 + # Node ID e8746835a2a13122bc8c0ed84fe4ee35649af25d + # Parent 7bc2f5967f5e4ed277f60a89b7b04cc5d6407ced + More addition (2) + + diff -r 7bc2f5967f5e -r e8746835a2a1 a + --- a/a Thu Jan 01 00:00:00 1970 +0000 + +++ b/a Thu Jan 01 00:00:00 1970 +0000 + @@ -1,1 +1,9 @@ + +jungle + a + +flore + +arthur + +zephir + +some + +less + +conflict + +babar
--- a/tests/test-touch.t Tue May 15 22:17:27 2018 -0700 +++ b/tests/test-touch.t Wed May 23 01:24:02 2018 +0200 @@ -32,9 +32,9 @@ $ hg add b $ hg commit -m ab --amend $ hg up --hidden 1 - updating to a hidden changeset [0-9a-f]{12} (re) + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + updated to hidden changeset * (glob) (hidden revision '*' was rewritten as: *) (glob) - 0 files updated, 0 files merged, 1 files removed, 0 files unresolved working directory parent is obsolete! (*) (glob) (use 'hg evolve' to update to its successor: *) (glob) $ hg log -G
--- a/tests/test-uncommit.t Tue May 15 22:17:27 2018 -0700 +++ b/tests/test-uncommit.t Wed May 23 01:24:02 2018 +0200 @@ -238,10 +238,10 @@ Test phase is preserved, no local changes $ hg up -C 3 --hidden - updating to a hidden changeset 5eb72dbe0cb4 - (hidden revision '5eb72dbe0cb4' was rewritten as: e8db4aa611f6) 8 files updated, 0 files merged, 1 files removed, 0 files unresolved (leaving bookmark touncommit-bm) + updated to hidden changeset 5eb72dbe0cb4 + (hidden revision '5eb72dbe0cb4' was rewritten as: e8db4aa611f6) working directory parent is obsolete! (5eb72dbe0cb4) (use 'hg evolve' to update to its successor: e8db4aa611f6) $ hg --config extensions.purge= purge @@ -287,9 +287,9 @@ Test --all $ hg up -C 3 --hidden - updating to a hidden changeset 5eb72dbe0cb4 + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + updated to hidden changeset 5eb72dbe0cb4 (hidden revision '5eb72dbe0cb4' has diverged) - 1 files updated, 0 files merged, 0 files removed, 0 files unresolved working directory parent is obsolete! (5eb72dbe0cb4) (5eb72dbe0cb4 has diverged, use 'hg evolve --list --content-divergent' to resolve the issue) $ hg --config extensions.purge= purge