# HG changeset patch # User Anton Shestakov # Date 1622269925 -28800 # Node ID daca8f4f7014d8d7efcd77444c267a298ddc2a66 # Parent aff36517130933be5522af340dfc5cd63b173a61# Parent b81fea3d59ca4116f1ce7d29e2699d6938dc80bb branching: merge with stable diff -r b81fea3d59ca -r daca8f4f7014 CHANGELOG --- a/CHANGELOG Sat May 29 14:26:04 2021 +0800 +++ b/CHANGELOG Sat May 29 14:32:05 2021 +0800 @@ -1,7 +1,14 @@ Changelog ========= -10.3.2 - 2021-05-28 +10.4.0 - in progress +-------------------- + + * next: add an --abort flag + * evolve: use a more stable criteria for picking p1 when solving + content-divergence (most recent evolution will be used). + +10.3.2 -- 2021-05-28 -------------------- * next: remove duplicated targets when updating from an unstable changeset diff -r b81fea3d59ca -r daca8f4f7014 hgext3rd/evolve/__init__.py --- a/hgext3rd/evolve/__init__.py Sat May 29 14:26:04 2021 +0800 +++ b/hgext3rd/evolve/__init__.py Sat May 29 14:32:05 2021 +0800 @@ -819,7 +819,8 @@ (b'', b'evolve', True, _(b'evolve the next changeset if necessary')), (b'', b'no-topic', False, _(b'ignore topic and move topologically')), (b'n', b'dry-run', False, - _(b'do not perform actions, just print what would be done'))], + _(b'do not perform actions, just print what would be done')), + (b'', b'abort', False, _(b'abort the interrupted next'))], b'[OPTION]...', helpbasic=True, **compat.helpcategorykwargs('CATEGORY_WORKING_DIRECTORY')) @@ -833,6 +834,26 @@ """ wlock = None dryrunopt = opts['dry_run'] + abortopt = opts['abort'] + + compat.check_incompatible_arguments(opts, 'abort', ['move_bookmark', 'merge']) + if abortopt: + evolvestate = state.cmdstate(repo) + if not evolvestate: + raise error.Abort(_(b'no interrupted next to abort')) + + evolvestate.load() + if evolvestate[b'command'] != b'next': + raise error.Abort(_(b'no interrupted next to abort')) + + pctx = repo[b'.'] + compat.clean_update(pctx) + ui.status(_(b'next aborted\n')) + ui.status(_(b'working directory is now at %s\n') + % ui.label(bytes(pctx), b'evolve.node')) + evolvestate.delete() + return 0 + if not dryrunopt: wlock = repo.wlock() try: @@ -1043,16 +1064,23 @@ _(b"make commit obsolete this revision (DEPRECATED)"))) @eh.wrapfunction(obsolete, '_checkinvalidmarkers') -def _checkinvalidmarkers(orig, markers): +def _checkinvalidmarkers(orig, *args): """search for marker with invalid data and raise error if needed Exist as a separated function to allow the evolve extension for a more subtle handling. """ + if len(args) == 2: + repo_nullid = args[0].nullid + markers = args[1] + else: + # hg <= 5.8 (d55b71393907) + repo_nullid = nullid + markers = args[0] if r'debugobsconvert' in sys.argv: return for mark in markers: - if nullid in mark[1]: + if repo_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 b81fea3d59ca -r daca8f4f7014 hgext3rd/evolve/cmdrewrite.py --- a/hgext3rd/evolve/cmdrewrite.py Sat May 29 14:26:04 2021 +0800 +++ b/hgext3rd/evolve/cmdrewrite.py Sat May 29 14:32:05 2021 +0800 @@ -1176,7 +1176,8 @@ bmupdate = rewriteutil.bookmarksupdater(repo, ctx.node(), tr) bookactive = repo._activebookmark if bookactive is not None: - repo.ui.status(_(b"(leaving bookmark %s)\n") % repo._activebookmark) + b = ui.label(repo._activebookmark, b'bookmarks') + ui.status(_(b"(leaving bookmark %s)\n") % b) bookmarksmod.deactivate(repo) # Prepare the working directory @@ -1274,7 +1275,7 @@ continue break # propagate the previous break else: - ui.status(_(b"no more change to split\n")) + ui.status(_(b"no more changes to split\n")) if haschanges(): # XXX: Should we show a message for informing the user # that we create another commit with remaining changes? diff -r b81fea3d59ca -r daca8f4f7014 hgext3rd/evolve/compat.py --- a/hgext3rd/evolve/compat.py Sat May 29 14:26:04 2021 +0800 +++ b/hgext3rd/evolve/compat.py Sat May 29 14:32:05 2021 +0800 @@ -8,14 +8,17 @@ import contextlib +from mercurial.i18n import _ from mercurial import ( cmdutil, context, copies, + error, hg, logcmdutil, merge as mergemod, obsolete, + pycompat, registrar, repair, scmutil, @@ -432,3 +435,35 @@ def format_changeset_summary_fn(ui, repo, command, default_spec): return logcmdutil.changesetdisplayer(ui, repo, {b'template': default_spec}).show + +if util.safehasattr(cmdutil, 'check_at_most_one_arg'): + def check_at_most_one_arg(opts, *args): + return cmdutil.check_at_most_one_arg(opts, *args) +else: + # hg <= 5.2 (d587937600be) + def check_at_most_one_arg(opts, *args): + def to_display(name): + return pycompat.sysbytes(name).replace(b'_', b'-') + + if util.safehasattr(error, 'InputError'): + err = error.InputError + else: + # hg <= 5.6 (8d72e29ad1e0) + err = error.Abort + previous = None + for x in args: + if opts.get(x): + if previous: + raise err(_(b'cannot specify both --%s and --%s') + % (to_display(previous), to_display(x))) + previous = x + return previous + +if util.safehasattr(cmdutil, 'check_incompatible_arguments'): + def check_incompatible_arguments(opts, first, others): + return cmdutil.check_incompatible_arguments(opts, first, others) +else: + # hg <= 5.2 (023ad45e2fd2) + def check_incompatible_arguments(opts, first, others): + for other in others: + check_at_most_one_arg(opts, first, other) diff -r b81fea3d59ca -r daca8f4f7014 hgext3rd/evolve/evolvecmd.py --- a/hgext3rd/evolve/evolvecmd.py Sat May 29 14:26:04 2021 +0800 +++ b/hgext3rd/evolve/evolvecmd.py Sat May 29 14:32:05 2021 +0800 @@ -301,7 +301,7 @@ ui.write_err(hint) return (False, b".") - if not (divergent.mutable() and other.mutable()): + if not divergent.mutable(): # Public divergence: we keep public one to local side while merging # When public branch is behind to the mutable branch, for now we # relocate mutable cset to public one's side in every case. @@ -311,9 +311,8 @@ # # 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().rev() - evolvestate[b'public-divergent'] = publicdiv.node() + resolutionparent = divergent.p1().rev() + evolvestate[b'public-divergent'] = divergent.node() return (True, resolutionparent) otherp1 = succsotherp1 = other.p1().rev() @@ -448,10 +447,12 @@ ui.write_err(msg) return (False, b".") other = others[0] + evolvestate[b'orig-divergent'] = divergent.node() + if not other.mutable(): + divergent, other = other, divergent evolvestate[b'divergent'] = divergent.node() evolvestate[b'other-divergent'] = other.node() evolvestate[b'base'] = base.node() - evolvestate[b'orig-divergent'] = divergent.node() # sometimes we will relocate a node in case of different parents and we can # encounter conflicts after relocation is done while solving @@ -532,10 +533,7 @@ evolvestate[b'other-divergent'] = newother other = repo[newother] - localside, otherside = divergent, other - if not otherside.mutable(): - localside, otherside = other, divergent - _mergecontentdivergents(repo, progresscb, localside, otherside, base, + _mergecontentdivergents(repo, progresscb, divergent, other, base, evolvestate) res, newnode = _completecontentdivergent(ui, repo, progresscb, divergent, other, base, evolvestate) @@ -556,7 +554,7 @@ if newnode == publicdiv.node(): # case 2) pubstr = bytes(publicdiv) - othstr = bytes(otherside) + othstr = bytes(other) msg = _(b'content divergence resolution between %s ' b'(public) and %s has same content as %s, ' b'discarding %s\n') @@ -576,7 +574,7 @@ local) compat.update(local) # merging the two content-divergent changesets - repo.ui.note(_(b"merging \"other\" %s changeset '%s'\n") % + repo.ui.note(_(b"merging \"other\" %s changeset %s\n") % (TROUBLES['CONTENTDIVERGENT'], other)) if progresscb: progresscb() @@ -653,9 +651,6 @@ else: date = max(divergent.date(), other.date()) - localside, otherside = divergent, other - if not otherside.mutable(): - localside, otherside = other, divergent # We really want a new commit in order to avoid obsmarker cycles (otherwise # divergence resolutions done in separate repos may create markers in the # opposite directions). For that reason, we set ui.allowemptycommit and @@ -665,8 +660,8 @@ {(b'ui', b'allowemptycommit'): b'true'}, b'evolve' ): extra = { - b'divergence_source_local': localside.hex(), - b'divergence_source_other': otherside.hex() + b'divergence_source_local': divergent.hex(), + b'divergence_source_other': other.hex() } newnode = repo.commit(text=desc, user=user, date=date, extra=extra) new = repo[newnode] @@ -1119,8 +1114,8 @@ return revs def _dedupedivergents(repo, revs): - """Dedupe the divergents revs in revs to get one from each group with the - lowest revision numbers + """Dedupe the divergents revs in revs to get one from each group which + will be used as p1 while merging the divergent csets """ repo = repo.unfiltered() res = set() @@ -1132,10 +1127,42 @@ divergent = repo[rev] base, others = divergentdata(divergent) othersrevs = [o.rev() for o in others] - res.add(min([divergent.rev()] + othersrevs)) - discarded.update(othersrevs) + all_divergents = othersrevs + [divergent.rev()] + pick, discard = _pick_latest_divergent(repo, all_divergents) + res.add(pick) + discarded.update(discard) return res +def _pick_latest_divergent(repo, divergent_revs): + """On the basis of evolution date, pick out the latest evolved revision + from all the `divergent_revs` (which are divergent with each other) + + Return a tuple (latest_evolved, others) + """ + mapping = [] + for rev in divergent_revs: + led = latest_evolution_date(repo, repo[rev]) + # For purpose of comparing, from `led` which is (unixtime, offset) + # we only need `unixtime`. + mapping.append((led[0], rev)) + # Sorting by negating the `rev` in key func, to fallback to the old way + # of selecting revision, in case when `led` is same while comparing. + # Old way: was to select the one with minimum revision number + mapping = sorted(mapping, key=lambda v: (v[0], -v[1])) + latest_evolved = mapping[-1][1] + others = mapping[:-1] + others = [val[1] for val in others[:]] + return latest_evolved, others + +def latest_evolution_date(repo, ctx): + """Return latest evolution date of a changeset `ctx`""" + node = ctx.node() + pred = list(obsutil.closestpredecessors(repo, node)) + pred.append(node) + markers = obsutil.getmarkers(repo, nodes=pred, exclusive=True) + markers_dates = (m.date() for m in markers) + return max(markers_dates) + def divergentdata(ctx): """return base, other part of a conflict @@ -2076,10 +2103,7 @@ evolvestate[b'other-divergent'] = newother other = repo[newother] # continue the resolution by merging the content-divergent csets - localside, otherside = divergent, other - if not otherside.mutable(): - localside, otherside = other, divergent - _mergecontentdivergents(repo, progresscb, localside, otherside, + _mergecontentdivergents(repo, progresscb, divergent, other, base, evolvestate) if evolvestate[b'relocating-other']: @@ -2094,10 +2118,7 @@ evolvestate[b'other-divergent'] = newother other = repo[newother] # continue the resolution by merging the content-divergent csets - localside, otherside = divergent, other - if not otherside.mutable(): - localside, otherside = other, divergent - _mergecontentdivergents(repo, progresscb, localside, otherside, + _mergecontentdivergents(repo, progresscb, divergent, other, base, evolvestate) res, newnode = _completecontentdivergent(ui, repo, progresscb, diff -r b81fea3d59ca -r daca8f4f7014 hgext3rd/evolve/metadata.py --- a/hgext3rd/evolve/metadata.py Sat May 29 14:26:04 2021 +0800 +++ b/hgext3rd/evolve/metadata.py Sat May 29 14:32:05 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.3.3.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 5.7 5.8' +__version__ = b'10.4.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 5.7' minimumhgversion = b'4.6' buglink = b'https://bz.mercurial-scm.org/' diff -r b81fea3d59ca -r daca8f4f7014 hgext3rd/evolve/rewriteutil.py --- a/hgext3rd/evolve/rewriteutil.py Sat May 29 14:26:04 2021 +0800 +++ b/hgext3rd/evolve/rewriteutil.py Sat May 29 14:32:05 2021 +0800 @@ -172,7 +172,8 @@ repo._bookmarks.applychanges(repo, tr, bmchanges) tr.close() for bookmark in sorted(bookmarks): - repo.ui.write(_(b"bookmark '%s' deleted\n") % bookmark) + b = repo.ui.label(bookmark, b'bookmarks') + repo.ui.write(_(b"bookmark '%s' deleted\n") % b) finally: lockmod.release(tr, lock, wlock) diff -r b81fea3d59ca -r daca8f4f7014 hgext3rd/topic/__init__.py --- a/hgext3rd/topic/__init__.py Sat May 29 14:26:04 2021 +0800 +++ b/hgext3rd/topic/__init__.py Sat May 29 14:32:05 2021 +0800 @@ -229,10 +229,9 @@ # default color to help log output and thg # (first pick I could think off, update as needed b'log.topic': b'green_background', - b'topic.active': b'green', } -__version__ = b'0.22.3.dev' +__version__ = b'0.23.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 5.7 5.8' minimumhgversion = b'4.6' @@ -670,7 +669,8 @@ csetcount = stack.stack(repo, topic=ct).changesetcount empty = csetcount == 0 if empty and not ctwasempty: - ui.status(b"active topic '%s' is now empty\n" % ct) + ui.status(b"active topic '%s' is now empty\n" + % ui.label(ct, b'topic.active')) trnames = getattr(tr, 'names', getattr(tr, '_names', ())) if (b'phase' in trnames or any(n.startswith(b'push-response') @@ -680,10 +680,10 @@ if ctwasempty and not empty: if csetcount == 1: msg = _(b"active topic '%s' grew its first changeset\n%s") - ui.status(msg % (ct, hint)) + ui.status(msg % (ui.label(ct, b'topic.active'), hint)) else: msg = _(b"active topic '%s' grew its %d first changesets\n%s") - ui.status(msg % (ct, csetcount, hint)) + ui.status(msg % (ui.label(ct, b'topic.active'), csetcount, hint)) tr.addpostclose(b'signalcurrenttopicempty', currenttopicempty) return tr @@ -870,7 +870,8 @@ if topic: if not ct: - ui.status(_(b'marked working directory as topic: %s\n') % topic) + ui.status(_(b'marked working directory as topic: %s\n') + % ui.label(topic, b'topic.active')) return _changecurrenttopic(repo, topic) ui.pager(b'topics') @@ -958,8 +959,8 @@ revnum = repo[node].rev() if len(nodetobook[node]) > 1: - ui.status(_(b"skipping revision '%d' as it has multiple bookmarks " - b"on it\n") % revnum) + ui.status(_(b"skipping revision %d as it has multiple " + b"bookmarks on it\n") % revnum) return targetrevs = _findconvertbmarktopic(repo, bookmark) if targetrevs: @@ -971,8 +972,8 @@ if revnum in skipped: continue if len(nodetobook[revnode]) > 1: - ui.status(_(b"skipping '%d' as it has multiple bookmarks on" - b" it\n") % revnum) + ui.status(_(b"skipping revision %d as it has multiple " + b"bookmarks on it\n") % revnum) skipped.append(revnum) continue if bmark == b'@': diff -r b81fea3d59ca -r daca8f4f7014 tests/test-check-sdist.t --- a/tests/test-check-sdist.t Sat May 29 14:26:04 2021 +0800 +++ b/tests/test-check-sdist.t Sat May 29 14:32:05 2021 +0800 @@ -35,7 +35,7 @@ $ tar -tzf hg-evolve-*.tar.gz | sed 's|^hg-evolve-[^/]*/||' | sort > files $ wc -l files - 350 files + 351 files $ fgrep debian files tests/test-check-debian.t $ fgrep __init__.py files diff -r b81fea3d59ca -r daca8f4f7014 tests/test-discovery-obshashrange.t diff -r b81fea3d59ca -r daca8f4f7014 tests/test-evolve-content-divergent-basic.t --- a/tests/test-evolve-content-divergent-basic.t Sat May 29 14:26:04 2021 +0800 +++ b/tests/test-evolve-content-divergent-basic.t Sat May 29 14:32:05 2021 +0800 @@ -517,7 +517,7 @@ merge:[3] More addition with: [2] More addition base: [1] More addition - merging "other" content-divergent changeset 'fc6349f931da' + merging "other" content-divergent changeset fc6349f931da resolving manifests merging a 0 files updated, 1 files merged, 0 files removed, 0 files unresolved diff -r b81fea3d59ca -r daca8f4f7014 tests/test-evolve-content-divergent-user-independent-resolution.t --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-evolve-content-divergent-user-independent-resolution.t Sat May 29 14:32:05 2021 +0800 @@ -0,0 +1,127 @@ +===================================== +Testing content-divergence resolution +===================================== + +Independent rewrites of same changeset can lead to content-divergence. In most +common cases, it can occur when multiple users rewrite the same changeset +independently and push it. + +This test aims to check that the resolution of content-divergent changesets is +independent of the user resolving the divergence. In other words, the two users +resolving the same divergence should end up with the same result. + +Setup +----- + $ . $TESTDIR/testlib/content-divergence-util.sh + $ setuprepos user-independent-resolution + creating test repo for test case user-independent-resolution + - upstream + - local + - other + cd into `local` and proceed with env setup + +initial + + $ cd upstream + $ mkcommit A0 + + $ cd ../local + $ hg pull -uq + $ hg amend -m "A1" --config devel.default-date='172800 19800' + + $ cd ../other + $ hg pull -uq + $ hg amend -d '2 0' --config devel.default-date='86400 7200' + $ hg push -q + + $ cd ../local + $ hg push -q + 2 new content-divergent changesets + $ hg pull -q + 2 new content-divergent changesets + +'local' amended desc, 'other' amended date +------------------------------------------ + $ hg log -G + * 3:1a0af03d20ad (draft): A0 [content-divergent] + | + | @ 2:0d8c87cec5fc (draft): A1 [content-divergent] + |/ + o 0:a9bdc8b26820 (public): O + + $ hg evolve --content-div + merge:[2] A1 + with: [3] A0 + base: [1] A0 + 0 files updated, 0 files merged, 0 files removed, 0 files unresolved + working directory is now at 276e2aee8fe1 + $ hg log -G + @ 4:276e2aee8fe1 (draft): A1 + | + o 0:a9bdc8b26820 (public): O + + $ hg evolve -l + +'local' amended date, 'other' amended desc +------------------------------------------ + $ cd ../other + $ hg pull -q + 2 new content-divergent changesets + $ hg log -G + * 3:0d8c87cec5fc (draft): A1 [content-divergent] + | + | @ 2:1a0af03d20ad (draft): A0 [content-divergent] + |/ + o 0:a9bdc8b26820 (public): O + + $ hg evolve --content-div + merge:[3] A1 + with: [2] A0 + base: [1] A0 + 0 files updated, 0 files merged, 0 files removed, 0 files unresolved + working directory is now at 276e2aee8fe1 + + $ hg log -G + @ 4:276e2aee8fe1 (draft): A1 + | + o 0:a9bdc8b26820 (public): O + + $ hg evolve -l + +both users can push/pull without any issue +------------------------------------------ + + $ hg push + pushing to $TESTTMP/user-independent-resolution/upstream + searching for changes + adding changesets + adding manifests + adding file changes + added 1 changesets with 0 changes to 1 files (+1 heads) + 2 new obsolescence markers + obsoleted 2 changesets + $ hg pull ../local + pulling from ../local + searching for changes + no changes found + $ hg debugobsolete -r tip + 0d8c87cec5fc1540b7c0324332375d530856fb56 276e2aee8fe1d3aae5e21dfee47be818fba8d7fc 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '32', 'operation': 'evolve', 'user': 'test'} + 1a0af03d20ad8b4e3a99d30620c8734efe076900 276e2aee8fe1d3aae5e21dfee47be818fba8d7fc 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'evolve', 'user': 'test'} + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0d8c87cec5fc1540b7c0324332375d530856fb56 0 (Fri Jan 02 18:30:00 1970 -0530) {'ef1': '1', 'operation': 'amend', 'user': 'test'} + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 1a0af03d20ad8b4e3a99d30620c8734efe076900 0 (Thu Jan 01 22:00:00 1970 -0200) {'ef1': '32', 'operation': 'amend', 'user': 'test'} + + $ cd ../local + $ hg push + pushing to $TESTTMP/user-independent-resolution/upstream + searching for changes + no changes found + [1] + $ hg pull ../other + pulling from ../other + searching for changes + no changes found + $ hg debugobsolete -r tip + 0d8c87cec5fc1540b7c0324332375d530856fb56 276e2aee8fe1d3aae5e21dfee47be818fba8d7fc 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '32', 'operation': 'evolve', 'user': 'test'} + 1a0af03d20ad8b4e3a99d30620c8734efe076900 276e2aee8fe1d3aae5e21dfee47be818fba8d7fc 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'evolve', 'user': 'test'} + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0d8c87cec5fc1540b7c0324332375d530856fb56 0 (Fri Jan 02 18:30:00 1970 -0530) {'ef1': '1', 'operation': 'amend', 'user': 'test'} + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 1a0af03d20ad8b4e3a99d30620c8734efe076900 0 (Thu Jan 01 22:00:00 1970 -0200) {'ef1': '32', 'operation': 'amend', 'user': 'test'} diff -r b81fea3d59ca -r daca8f4f7014 tests/test-evolve-obshistory-complex.t --- a/tests/test-evolve-obshistory-complex.t Sat May 29 14:26:04 2021 +0800 +++ b/tests/test-evolve-obshistory-complex.t Sat May 29 14:32:05 2021 +0800 @@ -170,7 +170,7 @@ record this change to 'B'? (enter ? for help) [Ynesfdaq?] Y - no more change to split + no more changes to split $ hg split --rev "desc(fold1)" -d "0 0" << EOF > Y > Y @@ -209,7 +209,7 @@ record this change to 'D'? (enter ? for help) [Ynesfdaq?] Y - no more change to split + no more changes to split 1 new orphan changesets $ hg split --rev "desc(fold2)" -d "0 0" << EOF > Y @@ -249,7 +249,7 @@ record this change to 'F'? (enter ? for help) [Ynesfdaq?] Y - no more change to split + no more changes to split 1 new orphan changesets $ hg log -G @ changeset: 15:d4a000f63ee9 diff -r b81fea3d59ca -r daca8f4f7014 tests/test-evolve-obshistory-lots-of-splits.t --- a/tests/test-evolve-obshistory-lots-of-splits.t Sat May 29 14:26:04 2021 +0800 +++ b/tests/test-evolve-obshistory-lots-of-splits.t Sat May 29 14:32:05 2021 +0800 @@ -134,7 +134,7 @@ record this change to 'd'? (enter ? for help) [Ynesfdaq?] y - no more change to split + no more changes to split $ hg log --hidden -G @ changeset: 5:c7f044602e9b diff -r b81fea3d59ca -r daca8f4f7014 tests/test-evolve-obshistory-split.t --- a/tests/test-evolve-obshistory-split.t Sat May 29 14:26:04 2021 +0800 +++ b/tests/test-evolve-obshistory-split.t Sat May 29 14:32:05 2021 +0800 @@ -71,7 +71,7 @@ record this change to 'b'? (enter ? for help) [Ynesfdaq?] y - no more change to split + no more changes to split $ sync diff -r b81fea3d59ca -r daca8f4f7014 tests/test-evolve-public-content-divergent-corner-cases.t --- a/tests/test-evolve-public-content-divergent-corner-cases.t Sat May 29 14:26:04 2021 +0800 +++ b/tests/test-evolve-public-content-divergent-corner-cases.t Sat May 29 14:32:05 2021 +0800 @@ -388,10 +388,10 @@ $ hg evolve --content-divergent --any --update - merge:[4] added c e - with: [5] added d + merge:[5] added d + with: [4] added c e base: [3] added d - rebasing "divergent" content-divergent changeset e568fd1029bb on 155349b645be + rebasing "other" content-divergent changeset e568fd1029bb on 155349b645be merging c warning: conflicts while merging c! (edit, then use 'hg resolve --mark') unresolved merge conflicts diff -r b81fea3d59ca -r daca8f4f7014 tests/test-evolve-public-content-divergent-discard.t --- a/tests/test-evolve-public-content-divergent-discard.t Sat May 29 14:26:04 2021 +0800 +++ b/tests/test-evolve-public-content-divergent-discard.t Sat May 29 14:32:05 2021 +0800 @@ -89,8 +89,8 @@ public $ hg evolve --content-divergent --any - merge:[3] added ch - with: [4] added c + merge:[4] added c + with: [3] added ch base: [2] added c 0 files updated, 0 files merged, 0 files removed, 0 files unresolved other divergent changeset 90522bccf499 has same content as local f7c1071f1e7c and differs by "description" only, discarding 90522bccf499 @@ -180,10 +180,10 @@ public $ hg evolve --content-divergent --any - merge:[4] added dh - with: [5] added d + merge:[5] added d + with: [4] added dh base: [3] added d - rebasing "divergent" content-divergent changeset 5acd58ef5066 on 155349b645be + rebasing "other" content-divergent changeset 5acd58ef5066 on 155349b645be 0 files updated, 0 files merged, 0 files removed, 0 files unresolved other divergent changeset ae3429430ef1 has same content as local e800202333a4 and differs by "description" only, discarding ae3429430ef1 content divergence resolution between e800202333a4 (public) and ae3429430ef1 has same content as e800202333a4, discarding ae3429430ef1 @@ -265,8 +265,8 @@ public $ hg evolve --content-divergent --any - merge:[3] added ch - with: [4] added c + merge:[4] added c + with: [3] added ch base: [2] added c merging ch warning: conflicts while merging ch! (edit, then use 'hg resolve --mark') @@ -379,10 +379,10 @@ public $ hg evolve --content-divergent --any - merge:[4] added dh - with: [5] added d + merge:[5] added d + with: [4] added dh base: [3] added d - rebasing "divergent" content-divergent changeset f89a8e2f86ac on 155349b645be + rebasing "other" content-divergent changeset f89a8e2f86ac on 155349b645be merging c warning: conflicts while merging c! (edit, then use 'hg resolve --mark') unresolved merge conflicts @@ -483,10 +483,10 @@ public $ hg evolve --content-divergent --any - merge:[4] added dh - with: [5] added d + merge:[5] added d + with: [4] added dh base: [3] added d - rebasing "divergent" content-divergent changeset db0b7bba0aae on 155349b645be + rebasing "other" content-divergent changeset db0b7bba0aae on 155349b645be merging dh warning: conflicts while merging dh! (edit, then use 'hg resolve --mark') 0 files updated, 0 files merged, 0 files removed, 1 files unresolved @@ -587,10 +587,10 @@ public $ hg evolve --content-divergent --any - merge:[4] added dh - with: [5] added d + merge:[5] added d + with: [4] added dh base: [3] added d - rebasing "divergent" content-divergent changeset 67b19bbd770f on 155349b645be + rebasing "other" content-divergent changeset 67b19bbd770f on 155349b645be merging c warning: conflicts while merging c! (edit, then use 'hg resolve --mark') unresolved merge conflicts diff -r b81fea3d59ca -r daca8f4f7014 tests/test-evolve-public-content-divergent-main.t --- a/tests/test-evolve-public-content-divergent-main.t Sat May 29 14:26:04 2021 +0800 +++ b/tests/test-evolve-public-content-divergent-main.t Sat May 29 14:32:05 2021 +0800 @@ -353,10 +353,10 @@ public $ hg evolve --content-divergent --any --update - merge:[4] added d c e - with: [5] added d + merge:[5] added d + with: [4] added d c e base: [3] added d - rebasing "divergent" content-divergent changeset f31bcc378766 on 155349b645be + rebasing "other" content-divergent changeset f31bcc378766 on 155349b645be merging c warning: conflicts while merging c! (edit, then use 'hg resolve --mark') unresolved merge conflicts @@ -483,10 +483,10 @@ public $ hg evolve --content-divergent --any - merge:[4] added d - with: [5] added d + merge:[5] added d + with: [4] added d base: [3] added d - rebasing "divergent" content-divergent changeset 9411ad1fe615 on 155349b645be + rebasing "other" content-divergent changeset 9411ad1fe615 on 155349b645be 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 @@ -576,10 +576,10 @@ public $ hg evolve --content-divergent --any - merge:[4] added c e - with: [5] added d + merge:[5] added d + with: [4] added c e base: [3] added d - rebasing "divergent" content-divergent changeset 3c17c7afaf6e on 155349b645be + rebasing "other" content-divergent changeset 3c17c7afaf6e on 155349b645be merging c warning: conflicts while merging c! (edit, then use 'hg resolve --mark') unresolved merge conflicts diff -r b81fea3d59ca -r daca8f4f7014 tests/test-evolve-templates.t --- a/tests/test-evolve-templates.t Sat May 29 14:26:04 2021 +0800 +++ b/tests/test-evolve-templates.t Sat May 29 14:32:05 2021 +0800 @@ -327,7 +327,7 @@ record this change to 'b'? (enter ? for help) [Ynesfdaq?] y - no more change to split + no more changes to split $ hg log --hidden -G @ changeset: 3:f257fde29c7a diff -r b81fea3d59ca -r daca8f4f7014 tests/test-obsolete.t --- a/tests/test-obsolete.t Sat May 29 14:26:04 2021 +0800 +++ b/tests/test-obsolete.t Sat May 29 14:32:05 2021 +0800 @@ -1,17 +1,12 @@ $ . $TESTDIR/testlib/common.sh $ cat >> $HGRCPATH < [web] - > push_ssl = false - > allow_push = * > [phases] - > publish=False - > [alias] - > debugobsolete=debugobsolete -d '0 0' + > publish = False > [extensions] - > hgext.rebase= + > rebase = + > evolve = > EOF - $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH $ mkcommit() { > echo "$1" > "$1" > hg add "$1" diff -r b81fea3d59ca -r daca8f4f7014 tests/test-prev-next.t --- a/tests/test-prev-next.t Sat May 29 14:26:04 2021 +0800 +++ b/tests/test-prev-next.t Sat May 29 14:32:05 2021 +0800 @@ -564,7 +564,7 @@ record this change to 'b'? (enter ? for help) [Ynesfdaq?] y - no more change to split + no more changes to split 1 new orphan changesets $ hg up 3 -q @@ -611,6 +611,49 @@ $ cd .. +hg next --abort + + $ hg init next-abort + $ cd next-abort + + $ echo apple > a + $ hg ci -qAm apple + $ echo banana > b + $ hg ci -qAm banana + $ hg up 0 + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + $ echo blueberry > b + $ hg ci -qAm 'apple and blueberry' --amend + 1 new orphan changesets + + $ hg next + move:[1] banana + atop:[2] apple and blueberry + merging b + warning: conflicts while merging b! (edit, then use 'hg resolve --mark') + unresolved merge conflicts + (see 'hg help evolve.interrupted') + [240] + + $ hg next --abort + next aborted + working directory is now at 1c7f51cf0ef0 + $ hg next --abort + abort: no interrupted next to abort + [255] + $ hg evolve --abort + abort: no interrupted evolve to abort + [255] + + $ hg next --abort --move-bookmark + abort: cannot specify both --abort and --move-bookmark + [10] + $ hg next --abort --merge + abort: cannot specify both --abort and --merge + [10] + + $ cd .. + Testing --merge and --evolve flags: 1 child, 1 aspchild, dirty working copy $ hg init next-dirty-evolve diff -r b81fea3d59ca -r daca8f4f7014 tests/test-split.t --- a/tests/test-split.t Sat May 29 14:26:04 2021 +0800 +++ b/tests/test-split.t Sat May 29 14:32:05 2021 +0800 @@ -88,7 +88,7 @@ record this change to '_d'? (enter ? for help) [Ynesfdaq?] y - no more change to split + no more changes to split $ hg debugobsolete 1334a80b33c3f9873edab728fbbcf500eab61d2e d2fe56e71366c2c5376c89960c281395062c0619 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'} @@ -562,7 +562,7 @@ examine changes to 'SPLIT2'? (enter ? for help) [Ynesfdaq?] Y - no more change to split + no more changes to split The split changesets should be on the 'another-branch' $ hg log -G -l 3 @@ -875,7 +875,7 @@ record this change to 'SPLIT3'? (enter ? for help) [Ynesfdaq?] y - no more change to split + no more changes to split $ hg status --change '.~2' A SPLIT2 @@ -911,7 +911,7 @@ record change 2/2 to 'SPLIT3'? (enter ? for help) [Ynesfdaq?] y - no more change to split + no more changes to split $ hg status --change '.~1' A SPLIT2 A SPLIT3 @@ -948,7 +948,7 @@ continue splitting? [Ycdq?] d discarding remaining changes - no more change to split + no more changes to split $ hg status --change '.~1' A SPLIT2 $ hg status --change '.' @@ -981,7 +981,7 @@ adding SPLIT2 adding SPLIT3 adding SPLIT4 - no more change to split + no more changes to split $ hg status --change '.' A SPLIT2 A SPLIT3 @@ -994,7 +994,7 @@ adding SPLIT2 adding SPLIT3 adding SPLIT4 - no more change to split + no more changes to split $ hg status --change '.~1' A SPLIT2 $ hg status --change '.' @@ -1011,7 +1011,7 @@ adding SPLIT2 adding SPLIT3 adding SPLIT4 - no more change to split + no more changes to split $ hg status --change '.~1' A SPLIT2 A SPLIT3 @@ -1029,7 +1029,7 @@ adding SPLIT2 adding SPLIT3 adding SPLIT4 - no more change to split + no more changes to split $ hg status --change '.' A SPLIT2 A SPLIT3 @@ -1112,7 +1112,7 @@ record this change to 'b'? (enter ? for help) [Ynesfdaq?] y - no more change to split + no more changes to split 1 new orphan changesets $ hg glog -p diff -r b81fea3d59ca -r daca8f4f7014 tests/test-topic-debugcb.t --- a/tests/test-topic-debugcb.t Sat May 29 14:26:04 2021 +0800 +++ b/tests/test-topic-debugcb.t Sat May 29 14:32:05 2021 +0800 @@ -132,7 +132,7 @@ o [0:249055fcca50] root $ hg debugconvertbookmark --all - skipping '9' as it has multiple bookmarks on it + skipping revision 9 as it has multiple bookmarks on it $ hg log -G @ [9:4ad3e7d421d4] Trying multiple bookmarks | bookmark: book1 diff -r b81fea3d59ca -r daca8f4f7014 tests/testlib/common.sh --- a/tests/testlib/common.sh Sat May 29 14:26:04 2021 +0800 +++ b/tests/testlib/common.sh Sat May 29 14:32:05 2021 +0800 @@ -9,8 +9,3 @@ getid() { hg log --hidden --template '{node}\n' --rev "$1" } - -cat >> $HGRCPATH <