Mercurial > evolve
changeset 6073:6b67f26f4667 mercurial-4.8
test-compat: merge mercurial-4.9 into mercurial-4.8
# no-check-commit
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Tue, 12 Oct 2021 13:46:30 +0300 |
parents | 5c921c26dc40 (diff) 2da0e17ca1c0 (current diff) |
children | 55e9987b8384 8d04f00c2fbf |
files | tests/test-discovery-obshashrange.t tests/test-evolve-abort-orphan.t tests/test-evolve-stop-orphan.t tests/test-split.t tests/test-topic-flow-publish-bare.t tests/test-topic-stack.t tests/test-topic.t |
diffstat | 111 files changed, 1694 insertions(+), 1491 deletions(-) [+] |
line wrap: on
line diff
--- a/.hgtags Thu Aug 12 22:01:11 2021 +0200 +++ b/.hgtags Tue Oct 12 13:46:30 2021 +0300 @@ -95,3 +95,4 @@ c0ed8e57463875414d1c06f0428d550c4480d289 10.3.0 93dc3cb6884259f91d739a1cfe993a01820c729c 10.3.1 30c8d8e6a7f4056c46a868b47ee949d3bdb48c4c 10.3.2 +cca465bf6a6a103449aa58deecdffba8e546f7c6 10.3.3
--- a/CHANGELOG Thu Aug 12 22:01:11 2021 +0200 +++ b/CHANGELOG Tue Oct 12 13:46:30 2021 +0300 @@ -1,27 +1,52 @@ Changelog ========= -10.3.3 - in progress +10.4.0 - in progress -------------------- + * evolve: use a more stable criteria for picking p1 when solving + content-divergence (most recent evolution will be used) + * evolve: drop the deprecated --unstable, --divergent and --bumped flags, + they were replaced by --orphan, --content-divergent and --phase-divergent + respectively a long time ago + * evolve: remove experimental.obshashrange.lru-size docs, that config option + didn't do anything for a long time + * evolve: use precheck function from Mercurial 5.9+ when available, mostly + affects error messages and exit codes + + * next: add an --abort flag + + * evolve, topic, pullbundle: drop compatibility with Mercurial 4.6 + +topic (0.23.0) + + * topic: don't cache .topic() of memctx instances, as that could produce + KeyError: b'topic' during some rewrite operations (issue6500) + * topic: drop old code for working with amends on ancient hg versions (~3.6) + +10.3.3 -- 2021-08-13 +-------------------- + + * evolve: compatibility with Mercurial 5.9 * fold: make sure to save commit messages in last-message.txt, also affects metaedit (issue6549) + * touch/fold/metaedit/rewind: no longer lose changes from merge commits + (issue6416). As a consequence (for technical reasons), when run with + Mercurial 5.5 and earlier, these commands now require there to be no + unresolved conflicts. topic (0.22.3) * topic: correctly update from public commits with a (now hidden) topic when hg update is called without any revision (issue6553) + * topic: fix the help text to show how to disable publishing -10.3.2 - 2021-05-28 + +10.3.2 -- 2021-05-28 -------------------- * next: remove duplicated targets when updating from an unstable changeset * evolve: use "served" repo filter to guess what the server will publish - * touch/fold/metaedit/rewind: no longer lose changes from merge commits - (issue6416). As a consequence (for technical reasons), when run with - Mercurial 5.5 and earlier, these commands now require there to be no - unresolved conflicts. - topic (0.22.2)
--- a/debian/changelog Thu Aug 12 22:01:11 2021 +0200 +++ b/debian/changelog Tue Oct 12 13:46:30 2021 +0300 @@ -1,3 +1,9 @@ +mercurial-evolve (10.3.3-1) UNRELEASED; urgency=medium + + * new upstream release + + -- Pierre-Yves David <pierre-yves.david@ens-lyon.org> Fri, 13 Aug 2021 19:27:29 +0200 + mercurial-evolve (10.3.2-1) unstable; urgency=medium * new upstream release
--- a/debian/control Thu Aug 12 22:01:11 2021 +0200 +++ b/debian/control Tue Oct 12 13:46:30 2021 +0300 @@ -7,7 +7,7 @@ Pierre-Yves David <pierre-yves.david@logilab.fr>, Standards-Version: 4.3.0 Build-Depends: - mercurial (>= 4.6), + mercurial (>= 4.7), python, python3, debhelper (>= 10), @@ -28,7 +28,7 @@ ${python3:Depends}, ${misc:Depends}, ${sphinxdoc:Depends}, - mercurial (>= 4.6), + mercurial (>= 4.7), Built-Using: ${sphinxdoc:Built-Using} Description: evolve extension for Mercurial This package provides the experimental "evolve" extension for the Mercurial
--- a/hgext3rd/evolve/__init__.py Thu Aug 12 22:01:11 2021 +0200 +++ b/hgext3rd/evolve/__init__.py Tue Oct 12 13:46:30 2021 +0300 @@ -31,9 +31,9 @@ Some improvement and bug fixes available in newer version of Mercurial are also backported to older version of Mercurial by this extension. Some older -experimental protocol are also supported for a longer time in the extensions to -help people transitioning. (The extensions is currently compatible down to -Mercurial version 4.6). +experimental protocols are also supported for a longer time in the extension to +help people transitioning. (The extension is currently compatible down to +Mercurial version 4.7). New Config:: @@ -90,13 +90,10 @@ [extensions] blackbox = -Finally some extra options are available to help tame the experimental +Finally one more option is available to help tame the experimental implementation of some of the algorithms:: [experimental] - # restrict cache size to reduce memory consumption - obshashrange.lru-size = 2000 # default is 2000 - # automatically disable obshashrange related computation and capabilities # if the repository has more than N revisions. This is meant to help large # server deployment to enable the feature on smaller repositories while @@ -819,7 +816,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 +831,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:
--- a/hgext3rd/evolve/cmdrewrite.py Thu Aug 12 22:01:11 2021 +0200 +++ b/hgext3rd/evolve/cmdrewrite.py Tue Oct 12 13:46:30 2021 +0300 @@ -1011,7 +1011,7 @@ # reset files that only changed in the dirstate too dirstate = repo.dirstate - dirchanges = [f for f in dirstate if dirstate[f] != b'n'] + dirchanges = compat.dirchanges(dirstate) changedfiles.extend(dirchanges) repo.dirstate.rebuild(newnode.node(), newnode.manifest(), changedfiles) @@ -1124,7 +1124,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 @@ -1222,7 +1223,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? @@ -1356,7 +1357,20 @@ pickstate = state.cmdstate(repo, path=b'pickstate') pctx = repo[b'.'] - if not cont and not abort: + if cont: + if revs: + raise error.Abort(_(b"cannot specify both --continue and " + b"revision")) + if not pickstate: + raise error.Abort(_(b"no interrupted pick state exists")) + + pickstate.load() + orignode = pickstate[b'orignode'] + origctx = repo[orignode] + + elif abort: + return abortpick(ui, repo, pickstate) + else: cmdutil.bailifchanged(repo) revs = scmutil.revrange(repo, revs) if len(revs) > 1: @@ -1384,21 +1398,6 @@ pickstate.save() raise error.InterventionRequired(_(b"unresolved merge conflicts" b" (see hg help resolve)")) - - elif abort: - return abortpick(ui, repo, pickstate) - - else: - if revs: - raise error.Abort(_(b"cannot specify both --continue and " - b"revision")) - if not pickstate: - raise error.Abort(_(b"no interrupted pick state exists")) - - pickstate.load() - orignode = pickstate[b'orignode'] - origctx = repo[orignode] - overrides = {(b'phases', b'new-commit'): origctx.phase()} with repo.ui.configoverride(overrides, b'pick'): newnode = repo.commit(text=origctx.description(),
--- a/hgext3rd/evolve/compat.py Thu Aug 12 22:01:11 2021 +0200 +++ b/hgext3rd/evolve/compat.py Tue Oct 12 13:46:30 2021 +0300 @@ -8,21 +8,22 @@ import contextlib +from mercurial.i18n import _ from mercurial import ( cmdutil, context, copies as copiesmod, dirstate, + error, hg, logcmdutil, merge as mergemod, node, obsolete, + pycompat, registrar, - repair, scmutil, util, - ui as uimod, ) # hg <= 5.2 (c21aca51b392) @@ -53,18 +54,6 @@ r'PHASEDIVERGENT': b'phase-divergent', } -# hg <= 4.6 (bec1212eceaa) -if util.safehasattr(uimod.ui, 'makeprogress'): - def progress(ui, topic, pos, item=b"", unit=b"", total=None): - progress = ui.makeprogress(topic, unit, total) - if pos is not None: - progress.update(pos, item=item) - else: - progress.complete() -else: - def progress(ui, topic, pos, item=b"", unit=b"", total=None): - ui.progress(topic, pos, item, unit, total) - # XXX: Better detection of property cache if r'predecessors' not in dir(obsolete.obsstore): @property @@ -90,19 +79,13 @@ copied=copied.get(path)) # pytype: disable=wrong-keyword-args return mctx -try: - # hg <= 4.6 (46c2b19a1263) - bmrevset = repair.stripbmrevset # pytype: disable=module-attr -except AttributeError: - bmrevset = scmutil.bookmarkrevs - hg48 = util.safehasattr(copiesmod, 'stringutil') # code imported from Mercurial core at ae17555ef93f + patch def fixedcopytracing(repo, c1, c2, base): """A complete copy-patse of copies._fullcopytrace with a one line fix to handle when the base is not parent of both c1 and c2. This should be converted in a compat function once https://phab.mercurial-scm.org/D3896 - gets in and once we drop support for 4.6, this should be removed.""" + gets in and once we drop support for 4.9, this should be removed.""" from mercurial import pathutil copies = copiesmod @@ -121,12 +104,8 @@ # an endpoint is "dirty" if it isn't a descendant of the merge base # if we have a dirty endpoint, we need to trigger graft logic, and also # keep track of which endpoint is dirty - if util.safehasattr(base, 'isancestorof'): - dirtyc1 = not base.isancestorof(_c1) - dirtyc2 = not base.isancestorof(_c2) - else: # hg <= 4.6 (fbec9c0b32d3) - dirtyc1 = not base.descendant(_c1) - dirtyc2 = not base.descendant(_c2) + dirtyc1 = not base.isancestorof(_c1) + dirtyc2 = not base.isancestorof(_c2) graft = dirtyc1 or dirtyc2 tca = base if graft: @@ -436,6 +415,58 @@ 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'): + code = cmdutil.check_incompatible_arguments.__code__ + if r'others' in code.co_varnames[:code.co_argcount]: + def check_incompatible_arguments(opts, first, others): + return cmdutil.check_incompatible_arguments(opts, first, others) + else: + # hg <= 5.3 (d4c1501225c4) + 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) + +# allowdivergenceopt is a much newer addition to obsolete.py +# hg <= 5.8 (ba6881c6a178) +allowdivergenceopt = b'allowdivergence' +def isenabled(repo, option): + if option == allowdivergenceopt: + if obsolete._getoptionvalue(repo, obsolete.createmarkersopt): + return obsolete._getoptionvalue(repo, allowdivergenceopt) + else: + # note that we're not raising error.Abort when divergence is + # allowed, but creating markers is not, even on older hg versions + return False + else: + return obsolete.isenabled(repo, option) + if util.safehasattr(dirstate.dirstate, 'set_clean'): movedirstate = scmutil.movedirstate else: # hg <= 5.8 (8a50fb0784a9) @@ -529,3 +560,13 @@ } context.overlayworkingctx._markdirty = fixedmarkdirty + +if util.safehasattr(dirstate.dirstate, 'get_entry'): + def dirchanges(dirstate): + return [ + f for f in dirstate if not dirstate.get_entry(f).maybe_clean + ] +else: + # hg <= 5.9 (dcd97b082b3b) + def dirchanges(dirstate): + return [f for f in dirstate if dirstate[f] != b'n']
--- a/hgext3rd/evolve/depthcache.py Thu Aug 12 22:01:11 2021 +0200 +++ b/hgext3rd/evolve/depthcache.py Tue Oct 12 13:46:30 2021 +0300 @@ -20,7 +20,6 @@ from mercurial.utils.stringutil import forcebytestr from . import ( - compat, error, exthelper, genericcaches, @@ -113,17 +112,15 @@ cl = repo.unfiltered().changelog total = len(data) - def progress(pos, rev=None): - revstr = b'' if rev is None else (b'rev %d' % rev) - compat.progress(repo.ui, b'updating depth cache', - pos, revstr, unit=_(b'changesets'), total=total) - progress(0) + progress = repo.ui.makeprogress(b'updating depth cache', _(b'changesets'), total) + progress.update(0) for idx, rev in enumerate(data, 1): assert rev == len(self._data), (rev, len(self._data)) self._data.append(self._depth(cl, rev)) if not (idx % 10000): # progress as a too high performance impact - progress(idx, rev) - progress(None) + revstr = b'' if rev is None else (b'rev %d' % rev) + progress.update(idx, item=revstr) + progress.complete() def _depth(self, changelog, rev): cl = changelog
--- a/hgext3rd/evolve/evolvecmd.py Thu Aug 12 22:01:11 2021 +0200 +++ b/hgext3rd/evolve/evolvecmd.py Tue Oct 12 13:46:30 2021 +0300 @@ -300,7 +300,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. @@ -310,9 +310,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() @@ -447,10 +446,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 @@ -531,10 +532,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) @@ -555,7 +553,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') @@ -575,7 +573,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() @@ -652,9 +650,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 @@ -664,8 +659,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] @@ -1118,8 +1113,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() @@ -1131,10 +1126,36 @@ 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()] + all_divergents = _sorted_divergents(repo, all_divergents) + res.update(all_divergents[:1]) + discarded.update(all_divergents[1:]) return res +def _sorted_divergents(repo, divergent_revs): + """Sort divergent_revs by latest evolution date, from newest to oldest. + + Fall back to rev number, but in ascending order, for historical reasons. + """ + ledmap = { + # For purpose of comparing, from `led` which is (unixtime, offset) + # we only need `unixtime`. + rev: latest_evolution_date(repo, repo[rev])[0] + for rev in divergent_revs + } + # 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 + return sorted(divergent_revs, key=lambda rev: (-ledmap[rev], rev)) + +def latest_evolution_date(repo, ctx): + """Return latest evolution date of `ctx`""" + node = ctx.node() + nodes = list(obsutil.closestpredecessors(repo, node)) + nodes.append(node) + markers = obsutil.getmarkers(repo, nodes=nodes, exclusive=True) + return max(m.date() for m in markers) + def divergentdata(ctx): """return base, other part of a conflict @@ -1447,28 +1468,6 @@ if opts['all']: raise error.Abort(_(b'cannot specify both "--rev" and "--all"')) - # Backward compatibility - if opts['unstable']: - msg = (b"'evolve --unstable' is deprecated, " - b"use 'evolve --orphan'") - repo.ui.deprecwarn(msg, b'4.4') - - opts['orphan'] = opts['divergent'] - - if opts['divergent']: - msg = (b"'evolve --divergent' is deprecated, " - b"use 'evolve --content-divergent'") - repo.ui.deprecwarn(msg, b'4.4') - - opts['content_divergent'] = opts['divergent'] - - if opts['bumped']: - msg = (b"'evolve --bumped' is deprecated, " - b"use 'evolve --phase-divergent'") - repo.ui.deprecwarn(msg, b'4.4') - - opts['phase_divergent'] = opts['bumped'] - return opts def _cleanup(ui, repo, startnode, shouldupdate, headnode): @@ -1529,11 +1528,8 @@ _(b'also consider troubled changesets unrelated to current working ' b'directory')), (b'r', b'rev', [], _(b'solves troubles of these revisions'), _(b'REV')), - (b'', b'bumped', False, _(b'solves only bumped changesets (DEPRECATED)')), (b'', b'phase-divergent', False, _(b'solves only phase-divergent changesets')), - (b'', b'divergent', False, _(b'solves only divergent changesets (DEPRECATED)')), (b'', b'content-divergent', False, _(b'solves only content-divergent changesets')), - (b'', b'unstable', False, _(b'solves only unstable changesets (DEPRECATED)')), (b'', b'orphan', False, _(b'solves only orphan changesets (default)')), (b'a', b'all', None, _(b'evolve all troubled changesets related to the current' b' working directory and its descendants (default)')), @@ -1740,11 +1736,12 @@ seen = 1 showprogress = allopt or revopt count = len(revs) + if showprogress: + progress = repo.ui.makeprogress(_(b'evolve'), _(b'changesets'), count) def progresscb(): if showprogress: - compat.progress(ui, _(b'evolve'), seen, unit=_(b'changesets'), - total=count) + progress.update(seen) # Order the revisions revs = _orderrevs(repo, revs) @@ -1771,7 +1768,7 @@ seen += 1 if showprogress: - compat.progress(ui, _(b'evolve'), None) + progress.complete() _cleanup(ui, repo, startnode, shouldupdate, headnode) @@ -2001,10 +1998,10 @@ # Progress handling seen = 1 count = len(evolvestate[b'revs']) + progress = repo.ui.makeprogress(_(b'evolve'), _(b'changesets'), count) def progresscb(): - compat.progress(ui, _(b'evolve'), seen, unit=_(b'changesets'), - total=count) + progress.update(seen) headnode = None category = evolvestate[b'category'] @@ -2037,6 +2034,7 @@ else: evolvestate[b'skippedrevs'].append(curctx.node()) seen += 1 + progress.complete() return headnode def _continuecontentdivergent(ui, repo, evolvestate, progresscb): @@ -2075,10 +2073,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']: @@ -2093,10 +2088,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,
--- a/hgext3rd/evolve/firstmergecache.py Thu Aug 12 22:01:11 2021 +0200 +++ b/hgext3rd/evolve/firstmergecache.py Tue Oct 12 13:46:30 2021 +0300 @@ -20,7 +20,6 @@ from mercurial.utils.stringutil import forcebytestr from . import ( - compat, error, exthelper, genericcaches, @@ -86,17 +85,15 @@ cl = repo.unfiltered().changelog total = len(data) - def progress(pos, rev=None): - revstr = b'' if rev is None else (b'rev %d' % rev) - compat.progress(repo.ui, b'updating firstmerge cache', - pos, revstr, unit=_(b'changesets'), total=total) - progress(0) + progress = repo.ui.makeprogress(b'updating firstmerge cache', _(b'changesets'), total) + progress.update(0) for idx, rev in enumerate(data, 1): assert rev == len(self._data), (rev, len(self._data)) self._data.append(self._firstmerge(cl, rev)) if not (idx % 10000): # progress as a too high performance impact - progress(idx, rev) - progress(None) + revstr = b'' if rev is None else (b'rev %d' % rev) + progress.update(idx, item=revstr) + progress.complete() def _firstmerge(self, changelog, rev): cl = changelog
--- a/hgext3rd/evolve/metadata.py Thu Aug 12 22:01:11 2021 +0200 +++ b/hgext3rd/evolve/metadata.py Tue Oct 12 13:46:30 2021 +0300 @@ -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' -minimumhgversion = b'4.6' +__version__ = b'10.4.0.dev' +testedwith = b'4.7 4.8 4.9 5.0 5.1 5.2 5.3 5.4 5.5 5.6 5.7 5.8 5.9' +minimumhgversion = b'4.7' buglink = b'https://bz.mercurial-scm.org/'
--- a/hgext3rd/evolve/obsdiscovery.py Thu Aug 12 22:01:11 2021 +0200 +++ b/hgext3rd/evolve/obsdiscovery.py Tue Oct 12 13:46:30 2021 +0300 @@ -47,7 +47,7 @@ stablerangecache, ) -from mercurial import wireprototypes, wireprotov1server +from mercurial import wireprotov1server from mercurial.wireprotov1peer import wirepeer from mercurial.wireprototypes import encodelist, decodelist @@ -63,7 +63,6 @@ eh.configitem(b'experimental', b'obshashrange', True) eh.configitem(b'experimental', b'obshashrange.warm-cache', b'auto') eh.configitem(b'experimental', b'obshashrange.max-revs', None) -eh.configitem(b'experimental', b'obshashrange.lru-size', 2000) ################################## ### Code performing discovery ### @@ -103,8 +102,7 @@ local.obsstore.rangeobshashcache.update(local) querycount = 0 - compat.progress(ui, _(b"comparing obsmarker with other"), querycount, - unit=_(b"queries")) + progress = ui.makeprogress(_(b"comparing obsmarker with other"), _(b"queries")) overflow = [] while sample or overflow: if overflow: @@ -159,9 +157,8 @@ addentry(new) assert nbsample == nbreplies querycount += 1 - compat.progress(ui, _(b"comparing obsmarker with other"), querycount, - unit=_(b"queries")) - compat.progress(ui, _(b"comparing obsmarker with other"), None) + progress.update(querycount) + progress.complete() local.obsstore.rangeobshashcache.save(local) duration = util.timer() - starttime logmsg = (b'obsdiscovery, %d/%d mismatch' @@ -469,16 +466,14 @@ repo.depthcache.update(repo) total = len(revs) - def progress(pos, rev=None): - revstr = b'' if rev is None else (b'rev %d' % rev) - compat.progress(repo.ui, b'updating obshashrange cache', - pos, revstr, unit=_(b'changesets'), total=total) # warm the cache for the new revs - progress(0) + progress = repo.ui.makeprogress(b'updating obshashrange cache', _(b'changesets'), total) + progress.update(0) for idx, r in enumerate(revs): _obshashrange(repo, (r, 0)) - progress(idx, r) - progress(None) + revstr = b'' if r is None else (b'rev %d' % r) + progress.update(idx, item=revstr) + progress.complete() del self._updating @@ -729,23 +724,13 @@ caps = orig(repo, proto) enabled = _useobshashrange(repo) if obsolete.isenabled(repo, obsolete.exchangeopt) and enabled: - caps = caps.data.split() caps.append(b'_evoext_obshashrange_v1') - caps.sort() - caps = wireprototypes.bytesresponse(b' '.join(caps)) return caps @eh.extsetup def obshashrange_extsetup(ui): - ### - extensions.wrapfunction(wireprotov1server, 'capabilities', + extensions.wrapfunction(wireprotov1server, '_capabilities', _obshashrange_capabilities) - # wrap command content - oldcap, args = wireprotov1server.commands[b'capabilities'] - - def newcap(repo, proto): - return _obshashrange_capabilities(oldcap, repo, proto) - wireprotov1server.commands[b'capabilities'] = (newcap, args) ########################################## ### trigger discovery during exchange ###
--- a/hgext3rd/evolve/obsexchange.py Thu Aug 12 22:01:11 2021 +0200 +++ b/hgext3rd/evolve/obsexchange.py Tue Oct 12 13:46:30 2021 +0300 @@ -117,15 +117,11 @@ else: exchange.buildobsmarkerspart(bundler, markers) -# manual wrap up in extsetup because of the wireproto.commands mapping def _obscommon_capabilities(orig, repo, proto): """wrapper to advertise new capability""" caps = orig(repo, proto) if obsolete.isenabled(repo, obsolete.exchangeopt): - caps = caps.data.split() caps.append(b'_evoext_getbundle_obscommon') - caps.sort() - caps = wireprototypes.bytesresponse(b' '.join(caps)) return caps @eh.extsetup @@ -140,14 +136,8 @@ return _getbundleobsmarkerpart(origfunc, *args, **kwargs) exchange.getbundle2partsmapping[b'obsmarkers'] = newfunc - extensions.wrapfunction(wireprotov1server, 'capabilities', + extensions.wrapfunction(wireprotov1server, '_capabilities', _obscommon_capabilities) - # wrap command content - oldcap, args = wireprotov1server.commands[b'capabilities'] - - def newcap(repo, proto): - return _obscommon_capabilities(oldcap, repo, proto) - wireprotov1server.commands[b'capabilities'] = (newcap, args) abortmsg = b"won't exchange obsmarkers through pushkey" hint = b"upgrade your client or server to use the bundle2 protocol"
--- a/hgext3rd/evolve/obshashtree.py Thu Aug 12 22:01:11 2021 +0200 +++ b/hgext3rd/evolve/obshashtree.py Tue Oct 12 13:46:30 2021 +0300 @@ -18,7 +18,6 @@ from mercurial.i18n import _ from . import ( - compat, exthelper, ) @@ -61,8 +60,8 @@ cache = [] unfi = repo.unfiltered() markercache = {} - compat.progress(repo.ui, _(b"preparing locally"), 0, total=len(unfi), - unit=_(b"changesets")) + progress = repo.ui.makeprogress(_(b"preparing locally"), _(b"changesets"), + len(unfi)) for i in unfi: ctx = unfi[i] entry = 0 @@ -92,7 +91,6 @@ cache.append((ctx.node(), sha.digest())) else: cache.append((ctx.node(), node.nullid)) - compat.progress(repo.ui, _(b"preparing locally"), i, total=len(unfi), - unit=_(b"changesets")) - compat.progress(repo.ui, _(b"preparing locally"), None) + progress.update(i) + progress.complete() return cache
--- a/hgext3rd/evolve/obshistory.py Thu Aug 12 22:01:11 2021 +0200 +++ b/hgext3rd/evolve/obshistory.py Tue Oct 12 13:46:30 2021 +0300 @@ -265,11 +265,7 @@ super(obsmarker_printer, self).__init__(ui, repo, *args, **kwargs) diffopts = kwargs.get('diffopts', {}) - - # hg <= 4.6 (3fe1c9263024) - if not util.safehasattr(self, "_includediff"): - self._includediff = diffopts and diffopts.get(b'patch') - + self._includediff = diffopts and diffopts.get(b'patch') self.template = diffopts and diffopts.get(b'template') self.filter = diffopts and diffopts.get(b'filternonlocal') self.origin = diffopts and diffopts.get(b'origin')
--- a/hgext3rd/evolve/rewind.py Thu Aug 12 22:01:11 2021 +0200 +++ b/hgext3rd/evolve/rewind.py Tue Oct 12 13:46:30 2021 +0300 @@ -163,7 +163,7 @@ # reset files that only changed in the dirstate too dirstate = repo.dirstate - dirchanges = [f for f in dirstate if dirstate[f] != 'n'] + dirchanges = compat.dirchanges(dirstate) changedfiles.extend(dirchanges) repo.dirstate.rebuild(newctx.node(), newctx.manifest(), changedfiles)
--- a/hgext3rd/evolve/rewriteutil.py Thu Aug 12 22:01:11 2021 +0200 +++ b/hgext3rd/evolve/rewriteutil.py Tue Oct 12 13:46:30 2021 +0300 @@ -24,6 +24,8 @@ obsolete, obsutil, revset, + rewriteutil as corerewriteutil, + scmutil, util, ) @@ -57,6 +59,12 @@ <action> can be used to control the commit message. """ + # If this attribute exists, then core's rewriteutil is recent enough + # that it has all the features from our own implementation. + if util.safehasattr(corerewriteutil, 'find_new_divergence_from'): + return corerewriteutil.precheck(repo, revs, action) + + # hg <= 5.8 (d90f6237) if node.nullrev in revs: msg = _(b"cannot %s the null revision") % (action) hint = _(b"no changeset checked out") @@ -78,8 +86,7 @@ hint = _(b"see 'hg help evolution.instability'") raise error.Abort(msg, hint=hint) divrisk = revs_hascontentdivrisk(repo, revs) - allowdivergence = repo.ui.configbool(b'experimental', - b'evolution.allowdivergence') + allowdivergence = compat.isenabled(repo, compat.allowdivergenceopt) if divrisk and not allowdivergence: localdiv = repo[divrisk[0]] otherdiv, base = repo[divrisk[1][0]], repo[divrisk[1][1]] @@ -148,9 +155,9 @@ if len(baseparents) > 2: raise error.Abort(_(b"cannot fold revisions that merge with more than " b"one external changeset (not in revisions)")) - if not repo.ui.configbool(b'experimental', b'evolution.allowdivergence'): - obsolete = repo.revs(b'%ld and obsolete()', revs) - if obsolete: + if not compat.isenabled(repo, compat.allowdivergenceopt): + obsoleterevs = repo.revs(b'%ld and obsolete()', revs) + if obsoleterevs: msg = _(b'folding obsolete revisions may cause divergence') hint = _(b'set experimental.evolution.allowdivergence=yes' b' to allow folding them') @@ -173,7 +180,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) @@ -200,7 +208,7 @@ nodetobookmarks.setdefault(bnode, []).append(mark) for marks in nodetobookmarks.values(): if bookmarks.issuperset(marks): - rsrevs = compat.bmrevset(repo, marks[0]) + rsrevs = scmutil.bookmarkrevs(repo, marks[0]) revs = set(revs) revs.update(set(rsrevs)) revs = sorted(revs)
--- a/hgext3rd/evolve/stablerange.py Thu Aug 12 22:01:11 2021 +0200 +++ b/hgext3rd/evolve/stablerange.py Tue Oct 12 13:46:30 2021 +0300 @@ -369,7 +369,6 @@ from mercurial.i18n import _ from . import ( - compat, exthelper, firstmergecache, stablesort, @@ -423,7 +422,7 @@ (b'r', b'rev', [], b'operate on (rev, 0) ranges for rev in REVS'), (b'', b'subranges', False, b'recursively display data for subranges too'), (b'', b'verify', False, b'checks subranges content (EXPENSIVE)'), - (b'', b'method', b'branchpoint', + (b'', b'method', b'mergepoint', b'method to use, one of "branchpoint", "mergepoint"') ], _(b'')) @@ -964,14 +963,14 @@ revs = cl.revs(start=self._tiprev + 1, stop=upto) nbrevs = upto - self._tiprev rangeheap = [] + progress = ui.makeprogress(_(b"filling depth cache"), _(b"changesets"), nbrevs) for idx, r in enumerate(revs): if not idx % 1000: - compat.progress(ui, _(b"filling depth cache"), idx, total=nbrevs, - unit=_(b"changesets")) + progress.update(idx) # warm up depth self.depthrev(repo, r) rangeheap.append((-r, (r, 0))) - compat.progress(ui, _(b"filling depth cache"), None, total=nbrevs) + progress.complete() heappop = heapq.heappop heappush = heapq.heappush @@ -984,6 +983,7 @@ progress_each = 100 progress_last = time.time() heapify(rangeheap) + progress = ui.makeprogress(_(b"filling stablerange cache"), _(b"changesets"), nbrevs) while rangeheap: value = heappop(rangeheap) if value in original: @@ -992,8 +992,7 @@ progress_new = time.time() if (1 < progress_each) and (0.1 < progress_new - progress_last): progress_each /= 10 - compat.progress(ui, _(b"filling stablerange cache"), seen, - total=nbrevs, unit=_(b"changesets")) + progress.update(seen) progress_last = progress_new seen += 1 original.remove(value) # might have been added from other source @@ -1002,7 +1001,7 @@ for sub in self.subranges(repo, rangeid): if self._getsub(sub) is None: heappush(rangeheap, (-sub[0], sub)) - compat.progress(ui, _(b"filling stablerange cache"), None, total=nbrevs) + progress.complete() self._tiprev = upto self._tipnode = cl.node(upto)
--- a/hgext3rd/evolve/stablerangecache.py Thu Aug 12 22:01:11 2021 +0200 +++ b/hgext3rd/evolve/stablerangecache.py Tue Oct 12 13:46:30 2021 +0300 @@ -28,7 +28,6 @@ from mercurial.utils.stringutil import forcebytestr from . import ( - compat, exthelper, genericcaches, stablerange, @@ -92,6 +91,7 @@ initial_time = progress_last = time.time() warned_long = False heapify(rangeheap) + progress = ui.makeprogress(_(b"filling stablerange cache"), _(b"changesets"), total) while rangeheap: rangeid = heappop(rangeheap) if rangeid in original: @@ -103,8 +103,7 @@ warned_long = True if (1 < progress_each) and (0.1 < progress_new - progress_last): progress_each /= 10 - compat.progress(ui, _(b"filling stablerange cache"), seen, - total=total, unit=_(b"changesets")) + progress.update(seen) progress_last = progress_new seen += 1 original.remove(rangeid) # might have been added from other source @@ -113,7 +112,7 @@ for sub in self.subranges(repo, rangeid): if self._getsub(sub) is None: heappush(rangeheap, sub) - compat.progress(ui, _(b"filling stablerange cache"), None, total=total) + progress.complete() def clear(self, reset=False): super(stablerangeondiskbase, self).clear()
--- a/hgext3rd/evolve/stablesort.py Thu Aug 12 22:01:11 2021 +0200 +++ b/hgext3rd/evolve/stablesort.py Tue Oct 12 13:46:30 2021 +0300 @@ -264,7 +264,6 @@ from mercurial.utils.stringutil import forcebytestr from . import ( - compat, depthcache, exthelper, utility, @@ -861,12 +860,8 @@ total = len(data) - def progress(pos, rev=None): - revstr = b'' if rev is None else (b'rev %d' % rev) - compat.progress(repo.ui, b'updating stablesort cache', - pos, revstr, unit=_(b'changesets'), total=total) - - progress(0) + progress = repo.ui.makeprogress(b'updating stablesort cache', _(b'changesets'), total) + progress.update(0) for idx, rev in enumerate(data): parents = filterparents(repo.changelog.parentrevs(rev)) if len(parents) <= 1: @@ -879,8 +874,9 @@ if r == minparent: break if not (idx % 1000): # progress as a too high performance impact - progress(idx, rev) - progress(None) + revstr = b'' if rev is None else (b'rev %d' % rev) + progress.update(idx, item=revstr) + progress.complete() def clear(self, reset=False): super(ondiskstablesortcache, self).clear()
--- a/hgext3rd/evolve/utility.py Thu Aug 12 22:01:11 2021 +0200 +++ b/hgext3rd/evolve/utility.py Tue Oct 12 13:46:30 2021 +0300 @@ -67,10 +67,12 @@ return True class MultipleSuccessorsError(RuntimeError): - """Exception raised by _singlesuccessor when multiple successor sets exists + """Exception raised by _singlesuccessor() when multiple successor sets exists - The object contains the list of successorssets in its 'successorssets' - attribute to call to easily recover. + Attributes: + successorssets the list of successorssets to call to easily recover + divergenceflag indicate that changeset has divergent rewriting + splitflag indicate that changeset was split """ def __init__(self, successorssets):
--- a/hgext3rd/pullbundle.py Thu Aug 12 22:01:11 2021 +0200 +++ b/hgext3rd/pullbundle.py Tue Oct 12 13:46:30 2021 +0300 @@ -87,15 +87,14 @@ node as nodemod, registrar, scmutil, - ui as uimod, util, ) from mercurial.i18n import _ __version__ = b'0.1.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' -minimumhgversion = b'4.6' +testedwith = b'4.7 4.8 4.9 5.0 5.1 5.2 5.3 5.4 5.5 5.6 5.7 5.8 5.9' +minimumhgversion = b'4.7' buglink = b'https://bz.mercurial-scm.org/' cmdtable = {} @@ -513,10 +512,11 @@ repo.ui.write(b"gathering %d sample pulls within %d revisions\n" % (count, len(actionrevs))) + progress = repo.ui.makeprogress(b'gathering data', b'pulls', count) if 1 < min_cache: repo.ui.write(b" not caching ranges smaller than %d changesets\n" % min_cache) for i in range(count): - progress(repo.ui, b'gathering data', i, total=count) + progress.update(i) outgoing = takeonesample(repo, actionrevs) ranges = sliceoutgoing(repo, outgoing) hitranges = 0 @@ -540,7 +540,7 @@ hitranges, ) pullstats.append(stats) - progress(repo.ui, b'gathering data', None) + progress.complete() sizes = [] changesmissing = [] @@ -634,18 +634,6 @@ data[b'name'] = name return STATSFORMAT % data -# hg <= 4.6 (bec1212eceaa) -if util.safehasattr(uimod.ui, 'makeprogress'): - def progress(ui, topic, pos, item=b"", unit=b"", total=None): - progress = ui.makeprogress(topic, unit, total) - if pos is not None: - progress.update(pos, item=item) - else: - progress.complete() -else: - def progress(ui, topic, pos, item=b"", unit=b"", total=None): - ui.progress(topic, pos, item, unit, total) - # nodemap.get and index.[has_node|rev|get_rev] # hg <= 5.2 (02802fa87b74) def getgetrev(cl):
--- a/hgext3rd/topic/__init__.py Thu Aug 12 22:01:11 2021 +0200 +++ b/hgext3rd/topic/__init__.py Tue Oct 12 13:46:30 2021 +0300 @@ -229,13 +229,12 @@ # 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' +testedwith = b'4.7 4.8 4.9 5.0 5.1 5.2 5.3 5.4 5.5 5.6 5.7 5.8 5.9' +minimumhgversion = b'4.7' buglink = b'https://bz.mercurial-scm.org/' if util.safehasattr(registrar, 'configitem'): @@ -298,6 +297,9 @@ # topic loaded, but not enabled (eg: multiple repo in the same process) if cache is None: return b'' + if self.rev() is None: + # don't cache volatile ctx instances that aren't stored on-disk yet + return self.extra().get(constants.extrakey, b'') topic = cache.get(self.rev()) if topic is None: topic = self.extra().get(constants.extrakey, b'') @@ -485,21 +487,10 @@ return super(topicrepo, self).commit(*args, **kwargs) def commitctx(self, ctx, *args, **kwargs): - topicfilter = topicmap.topicfilter(self.filtername) - if topicfilter != self.filtername: - other = self.filtered(topicmap.topicfilter(self.filtername)) - other.commitctx(ctx, *args, **kwargs) - if isinstance(ctx, context.workingcommitctx): current = self.currenttopic if current: ctx.extra()[constants.extrakey] = current - if (isinstance(ctx, context.memctx) - and ctx.extra().get(b'amend_source') - and ctx.topic() - and not self.currenttopic): - # we are amending and need to remove a topic - del ctx.extra()[constants.extrakey] return super(topicrepo, self).commitctx(ctx, *args, **kwargs) @util.propertycache @@ -670,7 +661,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 +672,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 +862,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 +951,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 +964,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'@': @@ -1082,13 +1075,6 @@ else: fixedextra[constants.extrakey] = newtopic fixedextra[constants.changekey] = c.hex() - if b'amend_source' in fixedextra: - # TODO: right now the commitctx wrapper in - # topicrepo overwrites the topic in extra if - # amend_source is set to support 'hg commit - # --amend'. Support for amend should be adjusted - # to not be so invasive. - del fixedextra[b'amend_source'] ui.debug(b'changing topic of %s from %s to %s\n' % ( c, oldtopic or b'<none>', newtopic or b'<none>')) ui.debug(b'fixedextra: %r\n' % fixedextra)
--- a/tests/test-amend-merge.t Thu Aug 12 22:01:11 2021 +0200 +++ b/tests/test-amend-merge.t Tue Oct 12 13:46:30 2021 +0300 @@ -25,6 +25,8 @@ (branch merge, don't forget to commit) $ hg ci -m merge + $ hg log -r . -T '{rev}: {join(extras, " ")}\n' + 3: branch=default $ hg diff -r 'p1(.)' -r '.' diff -r 88a060ab6523 -r c20705a6a8c4 banana --- /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -41,6 +43,8 @@ amend $ hg amend -m 'merge, amend' + $ hg log -r . -T '{rev}: {join(extras, " ")}\n' + 4: amend_source=[0-9a-f]+ branch=default (re) $ hg diff -r 'p1(.)' -r '.' diff -r 88a060ab6523 -r 456753fae3cd banana --- /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -58,6 +62,8 @@ $ hg metaedit -m 'merge, metaedit' 0 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ hg log -r . -T '{rev}: {join(extras, " ")}\n' + 5: amend_source=[0-9a-f]+ branch=default (re) $ hg diff -r 'p1(.)' -r '.' diff -r 88a060ab6523 -r 1528d42f3e83 banana --- /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -76,14 +82,16 @@ $ hg topics -r . foo switching to topic foo changed topic on 1 changesets to "foo" + $ hg log -r . -T '{rev}: {join(extras, " ")}\n' + 6: _rewrite_noise=[0-9a-f]+ amend_source=[0-9a-f]+ branch=default topic=foo (re) $ hg diff -r 'p1(.)' -r '.' - diff -r 88a060ab6523 -r 52150b9639f7 banana + diff -r 88a060ab6523 -r 05be679ae1bd banana --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/banana Thu Jan 01 00:00:00 1970 +0000 @@ -0,0 +1,1 @@ +banana $ hg diff -r 'p2(.)' -r '.' - diff -r d8c7baf0ca58 -r 52150b9639f7 apple + diff -r d8c7baf0ca58 -r 05be679ae1bd apple --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/apple Thu Jan 01 00:00:00 1970 +0000 @@ -0,0 +1,1 @@
--- a/tests/test-amend-patch.t Thu Aug 12 22:01:11 2021 +0200 +++ b/tests/test-amend-patch.t Tue Oct 12 13:46:30 2021 +0300 @@ -2,14 +2,14 @@ Setup + $ . $TESTDIR/testlib/common.sh + $ cat >> $HGRCPATH << EOF - > [alias] - > glog = log -GT "{rev}:{node|short} {desc}\n ({bookmarks}) {phase}" > [diff] > git = 1 > [extensions] + > evolve = > EOF - $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH Reposetup
--- a/tests/test-check-sdist.t Thu Aug 12 22:01:11 2021 +0200 +++ b/tests/test-check-sdist.t Tue Oct 12 13:46:30 2021 +0300 @@ -35,7 +35,7 @@ $ tar -tzf hg-evolve-*.tar.gz | sed 's|^hg-evolve-[^/]*/||' | sort > files $ wc -l files - 349 files + 351 files $ fgrep debian files tests/test-check-debian.t $ fgrep __init__.py files
--- a/tests/test-discovery-obshashrange-cache.t Thu Aug 12 22:01:11 2021 +0200 +++ b/tests/test-discovery-obshashrange-cache.t Tue Oct 12 13:46:30 2021 +0300 @@ -8,9 +8,6 @@ $ cat << EOF >> $HGRCPATH > [extensions] > evolve = - > blackbox = - > [defaults] - > blackbox = -l 100 > [experimental] > obshashrange=1 > verbose-obsolescence-exchange=1
--- a/tests/test-evolve-abort-orphan.t Thu Aug 12 22:01:11 2021 +0200 +++ b/tests/test-evolve-abort-orphan.t Tue Oct 12 13:46:30 2021 +0300 @@ -10,14 +10,14 @@ Setup ===== + $ . $TESTDIR/testlib/common.sh + $ cat >> $HGRCPATH <<EOF > [phases] > publish = False - > [alias] - > glog = log -GT "{rev}:{node|short} {desc}\n ({bookmarks}) {phase}" > [extensions] + > evolve = > EOF - $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH $ cat >> $HGRCPATH <<EOF > [alias] @@ -111,7 +111,7 @@ @ 5:e93a9161a274 added c | () draft | * 4:c41c793e0ef1 added d - | | () draft + | | () draft orphan | x 3:ca1b80f7960a added c |/ () draft o 2:b1661037fa25 added b @@ -188,9 +188,9 @@ o 7:125af0ed8cae added a | () draft | * 6:e83de241f751 added d - | | () draft + | | () draft orphan | * 5:e93a9161a274 added c - | | () draft + | | () draft orphan | x 2:b1661037fa25 added b | | () draft | x 1:c7586e2a9264 added a @@ -207,11 +207,11 @@ @ 7:125af0ed8cae added a | () draft | * 6:e83de241f751 added d - | | () draft + | | () draft orphan | * 5:e93a9161a274 added c - | | () draft + | | () draft orphan | * 2:b1661037fa25 added b - | | () draft + | | () draft orphan | x 1:c7586e2a9264 added a |/ () draft o 0:8fa14d15e168 added hgignore @@ -284,13 +284,13 @@ @ 7:807e8e2ca559 added a | () draft | * 6:8f20d4390c21 foo to a - | | () draft + | | () draft orphan | | * 5:bcb1c47f8520 added d - | | | () draft + | | | () draft orphan | | x 4:86d2603075a3 added c | |/ () draft | | * 3:17509928e5bf added c - | | | () draft + | | | () draft orphan | | x 2:9f0c80a55ddc added b | |/ () draft | x 1:2f913b0c9220 added a @@ -307,15 +307,15 @@ @ 7:807e8e2ca559 added a | () draft | * 6:8f20d4390c21 foo to a - | | () draft + | | () draft orphan | | * 5:bcb1c47f8520 added d - | | | () draft + | | | () draft orphan | | * 4:86d2603075a3 added c - | |/ () draft + | |/ () draft orphan | | * 3:17509928e5bf added c - | | | () draft + | | | () draft orphan | | * 2:9f0c80a55ddc added b - | |/ () draft + | |/ () draft orphan | x 1:2f913b0c9220 added a |/ () draft o 0:8fa14d15e168 added hgignore @@ -348,13 +348,13 @@ @ 7:807e8e2ca559 added a | () draft | * 6:8f20d4390c21 foo to a - | | () draft + | | () draft orphan | | * 5:bcb1c47f8520 added d - | | | () draft + | | | () draft orphan | | x 4:86d2603075a3 added c | |/ () draft | | * 3:17509928e5bf added c - | | | () draft + | | | () draft orphan | | x 2:9f0c80a55ddc added b | |/ () draft | x 1:2f913b0c9220 added a @@ -433,7 +433,7 @@ @ 7:807e8e2ca559 added a | () draft | * 6:8f20d4390c21 foo to a - | | () draft + | | () draft orphan | x 1:2f913b0c9220 added a |/ () draft o 0:8fa14d15e168 added hgignore @@ -477,9 +477,9 @@ @ 4:a0086c17bfc7 added a | () draft | * 3:17509928e5bf added c - | | () draft + | | () draft orphan | * 2:9f0c80a55ddc added b - | | (bm1) draft + | | (bm1) draft orphan | x 1:2f913b0c9220 added a |/ () draft o 0:8fa14d15e168 added hgignore @@ -501,7 +501,7 @@ o 4:a0086c17bfc7 added a | () draft | * 3:17509928e5bf added c - | | () draft + | | () draft orphan | x 2:9f0c80a55ddc added b | | () draft | x 1:2f913b0c9220 added a @@ -518,9 +518,9 @@ @ 4:a0086c17bfc7 added a | () draft | * 3:17509928e5bf added c - | | () draft + | | () draft orphan | * 2:9f0c80a55ddc added b - | | (bm1) draft + | | (bm1) draft orphan | x 1:2f913b0c9220 added a |/ () draft o 0:8fa14d15e168 added hgignore
--- a/tests/test-evolve-abort-phasediv.t Thu Aug 12 22:01:11 2021 +0200 +++ b/tests/test-evolve-abort-phasediv.t Tue Oct 12 13:46:30 2021 +0300 @@ -10,14 +10,14 @@ Setup ===== + $ . $TESTDIR/testlib/common.sh + $ cat >> $HGRCPATH <<EOF > [phases] > publish = False - > [alias] - > glog = log -GT "{rev}:{node|short} {desc}\n ({bookmarks}) {phase}" > [extensions] + > evolve = > EOF - $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH $ cat >> $HGRCPATH <<EOF > [alias] @@ -83,7 +83,7 @@ $ hg glog @ 6:ddba58020bc0 added d - | () draft + | () draft phase-divergent | o 4:c41c793e0ef1 added d | | () public | o 3:ca1b80f7960a added c @@ -135,7 +135,7 @@ $ hg glog @ 6:ddba58020bc0 added d - | () draft + | () draft phase-divergent | o 4:c41c793e0ef1 added d | | () public | o 3:ca1b80f7960a added c @@ -189,11 +189,11 @@ $ hg glog --hidden @ 9:28cd06b3f801 added c - | () draft + | () draft phase-divergent | x 8:9ff8adbe8a24 added c |/ () draft | * 7:e44ebefe4f54 added d - |/ () draft + |/ () draft phase-divergent | x 6:ddba58020bc0 added d |/ () draft | x 5:cfe30edc6125 added d @@ -230,11 +230,11 @@ $ hg glog --hidden @ 9:28cd06b3f801 added c - | () draft + | () draft phase-divergent | x 8:9ff8adbe8a24 added c |/ () draft | * 7:e44ebefe4f54 added d - |/ () draft + |/ () draft phase-divergent | x 6:ddba58020bc0 added d |/ () draft | x 5:cfe30edc6125 added d @@ -261,9 +261,9 @@ $ hg glog --hidden @ 10:ef9b72b9b42c added d - | () draft + | () draft phase-divergent | * 9:28cd06b3f801 added c - |/ () draft + |/ () draft phase-divergent | x 8:9ff8adbe8a24 added c |/ () draft | x 7:e44ebefe4f54 added d @@ -316,9 +316,9 @@ $ hg glog --hidden @ 10:ef9b72b9b42c added d - | () draft + | () draft phase-divergent | * 9:28cd06b3f801 added c - |/ () draft + |/ () draft phase-divergent | x 8:9ff8adbe8a24 added c |/ () draft | x 7:e44ebefe4f54 added d
--- a/tests/test-evolve-content-divergent-basic.t Thu Aug 12 22:01:11 2021 +0200 +++ b/tests/test-evolve-content-divergent-basic.t Tue Oct 12 13:46:30 2021 +0300 @@ -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
--- a/tests/test-evolve-content-divergent-interrupted.t Thu Aug 12 22:01:11 2021 +0200 +++ b/tests/test-evolve-content-divergent-interrupted.t Tue Oct 12 13:46:30 2021 +0300 @@ -19,16 +19,16 @@ Setup ===== + $ . $TESTDIR/testlib/common.sh + $ cat >> $HGRCPATH <<EOF > [phases] > publish = False - > [alias] - > glog = log -GT "{rev}:{node|short} {desc}\n ({bookmarks}) {phase}" > [experimental] > evolution.allowdivergence = True > [extensions] + > evolve = > EOF - $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH $ hg init abortrepo $ cd abortrepo @@ -67,9 +67,9 @@ 2 new content-divergent changesets $ hg glog --hidden @ 6:9c1631e352d9 added d - | () draft + | () draft content-divergent | * 5:e49523854bc8 added d - |/ () draft + |/ () draft content-divergent | x 4:c41c793e0ef1 added d |/ () draft o 3:ca1b80f7960a added c @@ -130,9 +130,9 @@ $ hg glog --hidden @ 6:9c1631e352d9 added d - | () draft + | () draft content-divergent | * 5:e49523854bc8 added d - |/ () draft + |/ () draft content-divergent | x 4:c41c793e0ef1 added d |/ () draft o 3:ca1b80f7960a added c @@ -167,17 +167,17 @@ $ hg glog --hidden @ 10:491e10505bae added c - | () draft + | () draft content-divergent | x 9:7398f702a162 added c |/ () draft | * 8:2ba73e31f264 added c - |/ () draft + |/ () draft content-divergent | * 7:f0f1694f123e added d - | | () draft + | | () draft orphan content-divergent | | x 6:9c1631e352d9 added d | |/ () draft | | * 5:e49523854bc8 added d - | |/ () draft + | |/ () draft orphan content-divergent | | x 4:c41c793e0ef1 added d | |/ () draft | x 3:ca1b80f7960a added c @@ -214,17 +214,17 @@ $ hg glog --hidden @ 10:491e10505bae added c - | () draft + | () draft content-divergent | x 9:7398f702a162 added c |/ () draft | * 8:2ba73e31f264 added c - |/ () draft + |/ () draft content-divergent | * 7:f0f1694f123e added d - | | () draft + | | () draft orphan content-divergent | | x 6:9c1631e352d9 added d | |/ () draft | | * 5:e49523854bc8 added d - | |/ () draft + | |/ () draft orphan content-divergent | | x 4:c41c793e0ef1 added d | |/ () draft | x 3:ca1b80f7960a added c @@ -297,9 +297,9 @@ $ hg glog @ 8:a8673909e314 added d - | () draft + | () draft content-divergent | * 7:6f7eaf1944c0 added d - | | () draft + | | () draft content-divergent o | 4:33c16a2e0eb8 added c | | () draft o | 2:b1661037fa25 added b @@ -326,9 +326,9 @@ $ hg glog @ 8:a8673909e314 added d - | () draft + | () draft content-divergent | * 7:6f7eaf1944c0 added d - | | () draft + | | () draft content-divergent o | 4:33c16a2e0eb8 added c | | () draft o | 2:b1661037fa25 added b @@ -350,9 +350,9 @@ $ hg glog @ 9:b6a3f3ee0c44 added d - | () draft + | () draft content-divergent | * 8:a8673909e314 added d - | | () draft + | | () draft content-divergent | o 4:33c16a2e0eb8 added c | | () draft | o 2:b1661037fa25 added b @@ -376,7 +376,7 @@ this test case is mainly to test that we hit merge conlict while merging the two divergent csets, so resolving this one which happened during relocation $ echo a > a - $ hg res -m + $ hg resolve -m (no more unresolved files) continue: hg evolve --continue @@ -397,9 +397,9 @@ $ hg glog @ 9:b6a3f3ee0c44 added d - | () draft + | () draft content-divergent | * 8:a8673909e314 added d - | | () draft + | | () draft content-divergent | o 4:33c16a2e0eb8 added c | | () draft | o 2:b1661037fa25 added b @@ -458,9 +458,9 @@ 2 new content-divergent changesets $ hg glog --hidden @ 6:9c1631e352d9 added d - | () draft + | () draft content-divergent | * 5:e49523854bc8 added d - |/ () draft + |/ () draft content-divergent | x 4:c41c793e0ef1 added d |/ () draft o 3:ca1b80f7960a added c @@ -489,9 +489,9 @@ $ hg glog --hidden @ 6:9c1631e352d9 added d - | () draft + | () draft content-divergent | * 5:e49523854bc8 added d - |/ () draft + |/ () draft content-divergent | x 4:c41c793e0ef1 added d |/ () draft o 3:ca1b80f7960a added c @@ -512,9 +512,9 @@ $ hg glog @ 7:517d4375cb72 added d - | () draft + | () draft content-divergent | * 5:e49523854bc8 added d - | | () draft + | | () draft content-divergent | o 3:ca1b80f7960a added c | | () draft | o 2:b1661037fa25 added b @@ -542,9 +542,9 @@ $ hg glog @ 7:517d4375cb72 added d - | () draft + | () draft content-divergent | * 5:e49523854bc8 added d - | | () draft + | | () draft content-divergent | o 3:ca1b80f7960a added c | | () draft | o 2:b1661037fa25 added b @@ -572,11 +572,11 @@ $ hg amend $ hg glog @ 10:0892835a581f added d - | () draft + | () draft content-divergent o 8:33c16a2e0eb8 added c | () draft | * 7:517d4375cb72 added d - | | () draft + | | () draft content-divergent o | 2:b1661037fa25 added b |/ () draft o 1:c7586e2a9264 added a @@ -618,11 +618,11 @@ $ hg glog @ 10:0892835a581f added d - | () draft + | () draft content-divergent o 8:33c16a2e0eb8 added c | () draft | * 7:517d4375cb72 added d - | | () draft + | | () draft content-divergent o | 2:b1661037fa25 added b |/ () draft o 1:c7586e2a9264 added a
--- a/tests/test-evolve-content-divergent-stack.t Thu Aug 12 22:01:11 2021 +0200 +++ b/tests/test-evolve-content-divergent-stack.t Tue Oct 12 13:46:30 2021 +0300 @@ -274,7 +274,7 @@ (see 'hg help evolve.interrupted') [1] $ echo c > c - $ hg res -m + $ hg resolve -m (no more unresolved files) continue: hg evolve --continue @@ -303,7 +303,7 @@ +new_file $ echo c > c - $ hg res -m + $ hg resolve -m (no more unresolved files) continue: hg evolve --continue $ hg evolve -c @@ -545,7 +545,7 @@ [1] $ echo b > b - $ hg res -m + $ hg resolve -m (no more unresolved files) continue: hg evolve --continue $ hg evolve --continue @@ -558,7 +558,7 @@ [1] $ echo b > b - $ hg res -m + $ hg resolve -m (no more unresolved files) continue: hg evolve --continue $ hg evolve --continue @@ -867,7 +867,7 @@ [1] $ echo foo > b - $ hg res -m + $ hg resolve -m (no more unresolved files) continue: hg evolve --continue $ hg evolve --continue @@ -1149,14 +1149,14 @@ o 0:bde1d2b6b5e5 added base () [default] draft - $ hg reb -r 10 -d 7 + $ hg rebase -r 10 -d 7 rebasing 10:9a1f460df8b5 "added dar" $ hg up 0 -q $ echo alpha > alpha $ hg ci -Am "added alpha" adding alpha created new head - $ hg reb -r 6 -d 'desc("added alpha")' + $ hg rebase -r 6 -d 'desc("added alpha")' rebasing 6:57a3f8edf065 "added dar" $ hg evolve --content-divergent skipping 8b68d5104188: have a different parent than cf9a46e19942 (not handled yet)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-evolve-content-divergent-user-independent-resolution.t Tue Oct 12 13:46:30 2021 +0300 @@ -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'}
--- a/tests/test-evolve-continue.t Thu Aug 12 22:01:11 2021 +0200 +++ b/tests/test-evolve-continue.t Tue Oct 12 13:46:30 2021 +0300 @@ -1,14 +1,14 @@ Testing the continue functionality of `hg evolve` + $ . $TESTDIR/testlib/common.sh + $ cat >> $HGRCPATH <<EOF > [ui] > interactive = True - > [alias] - > glog = log -GT "{rev}:{node|short} {desc}\n ({bookmarks}) {phase}" > [extensions] > rebase = + > evolve = > EOF - $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH Setting up the repo @@ -43,7 +43,7 @@ @ 5:cb6a2ab625bb added c | () draft | * 4:c41c793e0ef1 added d - | | () draft + | | () draft orphan | x 3:ca1b80f7960a added c |/ () draft o 2:b1661037fa25 added b @@ -101,7 +101,7 @@ @ 8:00a5c774cc37 added d | () draft | * 7:ad0a59d83efe added e - | | () draft + | | () draft orphan | x 6:2a4e03d422e2 added d |/ () draft o 5:cb6a2ab625bb added c @@ -221,13 +221,13 @@ @ 16:645135c5caa4 added c | () draft | * 15:09becba8f97d added h - | | () draft + | | () draft orphan | * 14:5aa7b2bbd944 added g - | | () draft + | | () draft orphan | * 13:be88f889b6dc added f - | | () draft + | | () draft orphan | * 12:6642d2c9176e added d - | | () draft + | | () draft orphan | x 11:95665a2de664 added c |/ () draft o 10:87f748868183 added b @@ -449,7 +449,7 @@ $ echo 2b > a $ hg amend -q 1 new orphan changesets - $ hg ev -q + $ hg evolve -q warning: conflicts while merging a! (edit, then use 'hg resolve --mark') unresolved merge conflicts (see 'hg help evolve.interrupted')
--- a/tests/test-evolve-issue5832.t Thu Aug 12 22:01:11 2021 +0200 +++ b/tests/test-evolve-issue5832.t Tue Oct 12 13:46:30 2021 +0300 @@ -4,14 +4,14 @@ Setup ===== + $ . $TESTDIR/testlib/common.sh + $ cat >> $HGRCPATH <<EOF > [phases] > publish = False - > [alias] - > glog = log -GT "{rev}:{node|short} {desc}\n ({bookmarks}) {phase}" > [extensions] + > evolve = > EOF - $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH $ hg init issue5832 $ cd issue5832 @@ -70,11 +70,11 @@ | o 5:7014ec2829cd added a |/ () draft | * 4:b9b387427a53 merge commit - | |\ () draft + | |\ () draft orphan +---o 3:9402371b436e added c and d | | () draft | * 2:a1da0651488c added b - | | () draft + | | () draft orphan | x 1:1b24879c5c3c added a |/ () draft o 0:bde1d2b6b5e5 added base @@ -91,11 +91,11 @@ | o 5:7014ec2829cd added a |/ () draft | * 4:b9b387427a53 merge commit - | |\ () draft + | |\ () draft orphan +---x 3:9402371b436e added c and d | | () draft | * 2:a1da0651488c added b - | | () draft + | | () draft orphan | x 1:1b24879c5c3c added a |/ () draft o 0:bde1d2b6b5e5 added base @@ -212,11 +212,11 @@ | o 5:0a6281e212fe added l |/ () draft | * 4:b9b387427a53 merge commit - | |\ () draft + | |\ () draft orphan +---o 3:9402371b436e added c and d | | () draft | * 2:a1da0651488c added b - | | () draft + | | () draft orphan | x 1:1b24879c5c3c added a |/ () draft o 0:bde1d2b6b5e5 added base @@ -235,11 +235,11 @@ | o 5:0a6281e212fe added l |/ () draft | * 4:b9b387427a53 merge commit - | |\ () draft + | |\ () draft orphan +---x 3:9402371b436e added c and d | | () draft | * 2:a1da0651488c added b - | | () draft + | | () draft orphan | x 1:1b24879c5c3c added a |/ () draft o 0:bde1d2b6b5e5 added base @@ -358,11 +358,11 @@ | o 5:0a6281e212fe added l |/ () draft | * 4:b9b387427a53 merge commit - | |\ () draft + | |\ () draft orphan +---o 3:9402371b436e added c and d | | () draft | * 2:a1da0651488c added b - | | () draft + | | () draft orphan | x 1:1b24879c5c3c added a |/ () draft o 0:bde1d2b6b5e5 added base @@ -381,11 +381,11 @@ | o 5:0a6281e212fe added l |/ () draft | * 4:b9b387427a53 merge commit - | |\ () draft + | |\ () draft orphan +---x 3:9402371b436e added c and d | | () draft | * 2:a1da0651488c added b - | | () draft + | | () draft orphan | x 1:1b24879c5c3c added a |/ () draft o 0:bde1d2b6b5e5 added base
--- a/tests/test-evolve-issue5881.t Thu Aug 12 22:01:11 2021 +0200 +++ b/tests/test-evolve-issue5881.t Tue Oct 12 13:46:30 2021 +0300 @@ -7,14 +7,14 @@ Setup ===== + $ . $TESTDIR/testlib/common.sh + $ cat >> $HGRCPATH <<EOF > [phases] > publish = False - > [alias] - > glog = log -GT "{rev}:{node|short} {desc}\n ({bookmarks}) {phase}" > [extensions] + > evolve = > EOF - $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH $ hg init issue5881 $ cd issue5881 @@ -37,7 +37,7 @@ o 3:e6048a693c0d updated b | () draft | * 2:155349b645be added c - | | () draft + | | () draft orphan | @ 1:5f6d8a4bf34a added b |/ () draft o 0:9092f1db7931 added a
--- a/tests/test-evolve-noupdate.t Thu Aug 12 22:01:11 2021 +0200 +++ b/tests/test-evolve-noupdate.t Tue Oct 12 13:46:30 2021 +0300 @@ -11,12 +11,12 @@ Setup ----- + $ . $TESTDIR/testlib/common.sh + $ cat >> $HGRCPATH <<EOF - > [alias] - > glog = log -GT "{rev}:{node|short} {desc}\n ({bookmarks}) {phase}" > [extensions] + > evolve = > EOF - $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH #testcases inmemory ondisk #if inmemory @@ -57,9 +57,9 @@ @ 5:7ed0642d644b added b | () draft | * 4:c41c793e0ef1 added d - | | () draft + | | () draft orphan | * 3:ca1b80f7960a added c - | | () draft + | | () draft orphan | x 2:b1661037fa25 added b |/ () draft o 1:c7586e2a9264 added a @@ -101,11 +101,11 @@ o 8:3d41537b44ca added a | () draft | * 7:b6b20b8eefdc added d - | | () draft + | | () draft orphan | * 6:7c46f743e62f added c - | | () draft + | | () draft orphan | @ 5:7ed0642d644b added b - | | () draft + | | () draft orphan | x 1:c7586e2a9264 added a |/ () draft o 0:8fa14d15e168 added hgignore
--- a/tests/test-evolve-obshistory-complex.t Thu Aug 12 22:01:11 2021 +0200 +++ b/tests/test-evolve-obshistory-complex.t Tue Oct 12 13:46:30 2021 +0300 @@ -165,7 +165,7 @@ +B record this change to 'B'? [Ynesfdaq?] Y - no more change to split + no more changes to split $ hg split --rev "desc(fold1)" -d "0 0" << EOF > Y > Y @@ -199,7 +199,7 @@ +D record this change to 'D'? [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 @@ -234,7 +234,7 @@ +F record this change to 'F'? [Ynesfdaq?] Y - no more change to split + no more changes to split 1 new orphan changesets $ hg log -G @ changeset: 15:d4a000f63ee9
--- a/tests/test-evolve-obshistory-lots-of-splits.t Thu Aug 12 22:01:11 2021 +0200 +++ b/tests/test-evolve-obshistory-lots-of-splits.t Tue Oct 12 13:46:30 2021 +0300 @@ -120,7 +120,7 @@ +45 record this change to 'd'? [Ynesfdaq?] y - no more change to split + no more changes to split $ hg log --hidden -G @ changeset: 5:c7f044602e9b
--- a/tests/test-evolve-obshistory-split.t Thu Aug 12 22:01:11 2021 +0200 +++ b/tests/test-evolve-obshistory-split.t Tue Oct 12 13:46:30 2021 +0300 @@ -66,7 +66,7 @@ +43 record this change to 'b'? [Ynesfdaq?] y - no more change to split + no more changes to split $ sync
--- a/tests/test-evolve-orphan-merge.t Thu Aug 12 22:01:11 2021 +0200 +++ b/tests/test-evolve-orphan-merge.t Tue Oct 12 13:46:30 2021 +0300 @@ -1,14 +1,13 @@ ** Testing resolution of orphans by `hg evolve` when merges are involved ** + $ . $TESTDIR/testlib/common.sh + $ cat >> $HGRCPATH <<EOF > [ui] > interactive = True - > [alias] - > glog = log -GT "{rev}:{node|short} {desc}\n ({bookmarks}) {phase}" > [extensions] - > rebase = + > evolve = > EOF - $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH Repo Setup @@ -57,7 +56,7 @@ @ 4:64370c9805e7 added b | () draft | * 3:3b2b6f4652ee merging a and b - | |\ () draft + | |\ () draft orphan +---x 2:d76850646258 added b | | () draft | o 1:c7586e2a9264 added a @@ -102,7 +101,7 @@ @ 6:3d41537b44ca added a | () draft | * 5:91fd62122a4b merging a and b - | |\ () draft + | |\ () draft orphan +---o 4:64370c9805e7 added b | | () draft | x 1:c7586e2a9264 added a @@ -195,7 +194,7 @@ @ 11:31c317b7bdb1 foo to c | () draft | * 10:fd41d25a3e90 foobar to c - | |\ () draft + | |\ () draft orphan +---o 9:d0f84b25d4e3 bar to c | | () draft | x 8:1c165c673853 foo to c @@ -251,7 +250,7 @@ @ 13:928097d0b5b5 foo to c | () draft | * 12:c5405d2da7a1 foobar to c - | |\ () draft + | |\ () draft orphan +---x 11:31c317b7bdb1 foo to c | | () draft | o 9:d0f84b25d4e3 bar to c @@ -326,13 +325,13 @@ @ 20:fccc9de66799 added l | () draft | * 19:190763373d8b merge commit - | |\ () draft + | |\ () draft orphan | | o 18:863d11043c67 added y | | | () draft +---o 17:3f2247835c1d added x | | () draft | * 16:e44dc179e7f5 added m - | | () draft + | | () draft orphan | x 15:8634bee7bf1e added l |/ () draft o 0:8fa14d15e168 added hgignore @@ -393,7 +392,7 @@ | o 24:3f371171d767 added l |/ () draft | * 23:7b78a9784f3e merged l and x - | |\ () draft + | |\ () draft orphan +---x 20:fccc9de66799 added l | | () draft | x 17:3f2247835c1d added x @@ -453,7 +452,7 @@ 1 new orphan changesets $ hg glog @ 27:adb665a78e08 merged l and x - |\ () draft + |\ () draft orphan | x 25:cdf6547da25f added x | | () draft o | 24:3f371171d767 added l @@ -492,7 +491,7 @@ $ hg glog @ 28:fb8fe870ae7d merged l and x - |\ () draft + |\ () draft orphan | x 24:3f371171d767 added l |/ () draft o 0:8fa14d15e168 added hgignore @@ -562,7 +561,7 @@ $ hg glog @ 31:32beb84b9dbc merge commit - |\ () draft + |\ () draft orphan | x 30:f3ba8b99bb6f added foo | () draft o 0:8fa14d15e168 added hgignore
--- a/tests/test-evolve-orphan-split.t Thu Aug 12 22:01:11 2021 +0200 +++ b/tests/test-evolve-orphan-split.t Tue Oct 12 13:46:30 2021 +0300 @@ -1,15 +1,15 @@ ** Testing resolution of orphans by `hg evolve` where an obsolete changeset has multiple successors ** + $ . $TESTDIR/testlib/common.sh + $ cat >> $HGRCPATH <<EOF > [ui] > interactive = True - > [alias] - > glog = log -GT "{rev}:{node|short} {desc}\n ({bookmarks}) {phase}" > [extensions] > rebase = + > evolve = > EOF - $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH Repo Setup @@ -68,7 +68,7 @@ o 3:bd3735d4dab0 added a and b | () draft | * 2:86e1ebf1ca61 added c - | | () draft + | | () draft orphan | x 1:d0ddb614efbd added a and b |/ () draft o 0:8fa14d15e168 added hgignore @@ -161,7 +161,7 @@ o 8:f2632392aefe added a b c | () draft | * 7:d48a30875f01 added d - | | () draft + | | () draft orphan | x 6:f89e4764f2ed added a b c |/ () draft o 0:8fa14d15e168 added hgignore @@ -175,7 +175,7 @@ | o 8:f2632392aefe added a b c |/ () draft | * 7:d48a30875f01 added d - | | () draft + | | () draft orphan | x 6:f89e4764f2ed added a b c |/ () draft o 0:8fa14d15e168 added hgignore
--- a/tests/test-evolve-phase-divergence.t Thu Aug 12 22:01:11 2021 +0200 +++ b/tests/test-evolve-phase-divergence.t Tue Oct 12 13:46:30 2021 +0300 @@ -8,7 +8,6 @@ > glog = log -GT "{rev}:{node|short} {desc|firstline}\n ({bookmarks}) {phase}" > [extensions] > rebase = - > [extensions] > evolve = > EOF @@ -27,8 +26,6 @@ adding a $ cd .. - $ evolvepath=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/ - Setting up a private non-publishing repo ----------------------------------------
--- a/tests/test-evolve-public-content-divergent-corner-cases.t Thu Aug 12 22:01:11 2021 +0200 +++ b/tests/test-evolve-public-content-divergent-corner-cases.t Tue Oct 12 13:46:30 2021 +0300 @@ -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 @@ -415,7 +415,7 @@ +e $ echo c > c - $ hg res -m + $ hg resolve -m (no more unresolved files) continue: hg evolve --continue
--- a/tests/test-evolve-public-content-divergent-discard.t Thu Aug 12 22:01:11 2021 +0200 +++ b/tests/test-evolve-public-content-divergent-discard.t Tue Oct 12 13:46:30 2021 +0300 @@ -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 @@ -98,7 +98,7 @@ $ hg evolve -l - $ hg par + $ hg parents changeset: 4:f7c1071f1e7c tag: tip parent: 1:5f6d8a4bf34a @@ -180,17 +180,17 @@ 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 $ hg evolve -l - $ hg par + $ hg parents changeset: 5:e800202333a4 tag: tip parent: 2:155349b645be @@ -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') @@ -287,7 +287,7 @@ +>>>>>>> other: 229da2719b19 - test: added ch $ echo ch > ch - $ hg res -m + $ hg resolve -m (no more unresolved files) continue: hg evolve --continue @@ -296,7 +296,7 @@ $ hg evolve -l - $ hg par + $ hg parents changeset: 4:f7c1071f1e7c tag: tip parent: 1:5f6d8a4bf34a @@ -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 @@ -390,7 +390,7 @@ [1] $ echo c > c - $ hg res -m + $ hg resolve -m (no more unresolved files) continue: hg evolve --continue @@ -401,7 +401,7 @@ $ hg evolve -l - $ hg par + $ hg parents changeset: 5:e800202333a4 tag: tip parent: 2:155349b645be @@ -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 @@ -495,7 +495,7 @@ [1] $ echo dh > dh - $ hg res -m + $ hg resolve -m (no more unresolved files) continue: hg evolve --continue @@ -504,7 +504,7 @@ $ hg evolve -l - $ hg par + $ hg parents changeset: 5:e800202333a4 tag: tip parent: 2:155349b645be @@ -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 @@ -598,7 +598,7 @@ [1] $ echo c > c - $ hg res -m + $ hg resolve -m (no more unresolved files) continue: hg evolve --continue @@ -612,7 +612,7 @@ [1] $ echo dh > dh - $ hg res -m + $ hg resolve -m (no more unresolved files) continue: hg evolve --continue @@ -621,7 +621,7 @@ $ hg evolve -l - $ hg par + $ hg parents changeset: 5:e800202333a4 tag: tip parent: 2:155349b645be
--- a/tests/test-evolve-public-content-divergent-main.t Thu Aug 12 22:01:11 2021 +0200 +++ b/tests/test-evolve-public-content-divergent-main.t Tue Oct 12 13:46:30 2021 +0300 @@ -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 @@ -385,7 +385,7 @@ +e $ echo c > c - $ hg res -m + $ hg resolve -m (no more unresolved files) continue: hg evolve --continue @@ -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 @@ -495,7 +495,7 @@ [1] $ echo d > d - $ hg res -m + $ hg resolve -m (no more unresolved files) continue: hg evolve --continue @@ -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 @@ -608,7 +608,7 @@ +e $ echo cfoo > c - $ hg res -m + $ hg resolve -m (no more unresolved files) continue: hg evolve --continue @@ -622,7 +622,7 @@ [1] $ echo d > d - $ hg res -m + $ hg resolve -m (no more unresolved files) continue: hg evolve --continue
--- a/tests/test-evolve-serveronly-legacy.t Thu Aug 12 22:01:11 2021 +0200 +++ b/tests/test-evolve-serveronly-legacy.t Tue Oct 12 13:46:30 2021 +0300 @@ -11,7 +11,6 @@ > bundle2-exp=False # < Mercurial-4.0 > [devel] > legacy.exchange=bundle1 - > [extensions] > EOF $ mkcommit() {
--- a/tests/test-evolve-split.t Thu Aug 12 22:01:11 2021 +0200 +++ b/tests/test-evolve-split.t Tue Oct 12 13:46:30 2021 +0300 @@ -1,5 +1,6 @@ -Check that evolve shows error while handling split commits --------------------------------------- +Check that evolve can handle split commits +------------------------------------------ + $ cat >> $HGRCPATH <<EOF > [ui] > logtemplate = {rev}:{node|short}@{branch}({phase}) {desc|firstline}\n
--- a/tests/test-evolve-stop-orphan.t Thu Aug 12 22:01:11 2021 +0200 +++ b/tests/test-evolve-stop-orphan.t Tue Oct 12 13:46:30 2021 +0300 @@ -9,12 +9,12 @@ Setup ===== + $ . $TESTDIR/testlib/common.sh + $ cat >> $HGRCPATH <<EOF - > [alias] - > glog = log -GT "{rev}:{node|short} {desc}\n ({bookmarks}) {phase}" > [extensions] + > evolve = > EOF - $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH $ hg init stoprepo $ cd stoprepo @@ -75,7 +75,7 @@ @ 5:cb6a2ab625bb added c | () draft | * 4:c41c793e0ef1 added d - | | () draft + | | () draft orphan | x 3:ca1b80f7960a added c |/ () draft o 2:b1661037fa25 added b @@ -118,7 +118,7 @@ @ 5:cb6a2ab625bb added c | () draft | * 4:c41c793e0ef1 added d - | | () draft + | | () draft orphan | x 3:ca1b80f7960a added c |/ () draft o 2:b1661037fa25 added b @@ -158,7 +158,7 @@ @ 5:cb6a2ab625bb added c | () draft | * 4:c41c793e0ef1 added d - | | () draft + | | () draft orphan | x 3:ca1b80f7960a added c |/ () draft o 2:b1661037fa25 added b @@ -229,13 +229,13 @@ @ 7:21817cd42526 added hgignore () draft * 6:2a4e03d422e2 added d - | () draft + | () draft orphan * 5:cb6a2ab625bb added c - | () draft + | () draft orphan * 2:b1661037fa25 added b - | () draft + | () draft orphan * 1:c7586e2a9264 added a - | () draft + | () draft orphan x 0:8fa14d15e168 added hgignore () draft @@ -267,9 +267,9 @@ @ 7:21817cd42526 added hgignore () draft * 6:2a4e03d422e2 added d - | () draft + | () draft orphan * 5:cb6a2ab625bb added c - | () draft + | () draft orphan x 2:b1661037fa25 added b | () draft x 1:c7586e2a9264 added a @@ -343,11 +343,11 @@ @ 12:a3cc2042492f added a | () draft | * 11:cd0909a30222 added d - | | () draft + | | () draft orphan | * 10:cb1dd1086ef6 added c - | | (b1) draft + | | (b1) draft orphan | * 9:aec285328e90 added b - | | (b2) draft + | | (b2) draft orphan | x 8:fd00db71edca added a |/ () draft o 7:21817cd42526 added hgignore @@ -374,9 +374,9 @@ @ 12:a3cc2042492f added a | () draft | * 11:cd0909a30222 added d - | | () draft + | | () draft orphan | * 10:cb1dd1086ef6 added c - | | (b1) draft + | | (b1) draft orphan | x 9:aec285328e90 added b | | () draft | x 8:fd00db71edca added a
--- a/tests/test-evolve-stop-phasediv.t Thu Aug 12 22:01:11 2021 +0200 +++ b/tests/test-evolve-stop-phasediv.t Tue Oct 12 13:46:30 2021 +0300 @@ -9,12 +9,12 @@ Setup ===== + $ . $TESTDIR/testlib/common.sh + $ cat >> $HGRCPATH <<EOF - > [alias] - > glog = log -GT "{rev}:{node|short} {desc}\n ({bookmarks}) {phase}" > [extensions] + > evolve = > EOF - $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH #testcases inmemory ondisk #if inmemory @@ -75,7 +75,7 @@ $ hg glog @ 6:ddba58020bc0 added d - | () draft + | () draft phase-divergent | o 4:c41c793e0ef1 added d | | () public | o 3:ca1b80f7960a added c @@ -102,7 +102,7 @@ $ hg glog @ 6:ddba58020bc0 added d - | () draft + | () draft phase-divergent | o 4:c41c793e0ef1 added d | | () public | o 3:ca1b80f7960a added c
--- a/tests/test-evolve-templates.t Thu Aug 12 22:01:11 2021 +0200 +++ b/tests/test-evolve-templates.t Tue Oct 12 13:46:30 2021 +0300 @@ -322,7 +322,7 @@ +43 record this change to 'b'? [Ynesfdaq?] y - no more change to split + no more changes to split $ hg log --hidden -G @ changeset: 3:f257fde29c7a
--- a/tests/test-evolve-topic.t Thu Aug 12 22:01:11 2021 +0200 +++ b/tests/test-evolve-topic.t Tue Oct 12 13:46:30 2021 +0300 @@ -250,6 +250,8 @@ $ hg topic -r 070c5573d8f9 bar 4 new orphan changesets changed topic on 1 changesets to "bar" + $ hg log -r 18 -T '{rev}: {join(extras, " ")}\n' + 18: _rewrite_noise=[0-9a-f]+ amend_source=[0-9a-f]+ branch=default rebase_source=[0-9a-f]+ topic=bar (re) $ hg up 16d6f664b17c switching to topic bar 2 files updated, 0 files merged, 0 files removed, 0 files unresolved @@ -272,7 +274,7 @@ ------------------------------------------------------------------------------ $ hg log --graph - @ 18 - {bar} 793eb6370b2d add fff (draft) + @ 18 - {bar} c80027c7cda1 add fff (draft) | | * 17 - {bar} 9bf430c106b7 add jjj (draft) | | @@ -341,7 +343,7 @@ | * 19 - {bar} d834582d9ee3 add hhh (draft) | - | o 18 - {bar} 793eb6370b2d add fff (draft) + | o 18 - {bar} c80027c7cda1 add fff (draft) | | @ | 14 - {bar} 16d6f664b17c add ggg (draft) | | @@ -355,7 +357,7 @@ switching to topic foo 0 files updated, 0 files merged, 1 files removed, 0 files unresolved working directory parent is obsolete! (070c5573d8f9) - (use 'hg evolve' to update to its successor: 793eb6370b2d) + (use 'hg evolve' to update to its successor: c80027c7cda1) $ hg topic bar @@ -390,17 +392,17 @@ $ hg ci --amend 4 new orphan changesets $ hg log -G - @ 26 - {bar} 2c295936ac04 add fff (draft) + @ 26 - {bar} 239dcab64bc0 add fff (draft) | - | * 25 - {bar} 38a82cbb794a add jjj (draft) + | * 25 - {bar} e49f8682fb23 add jjj (draft) | | - | * 24 - {bar} 4a44eba0fdb3 add iii (draft) + | * 24 - {bar} 318094e157e3 add iii (draft) | | - | * 23 - {bar} 7acd9ea5d677 add hhh (draft) + | * 23 - {bar} aa8b0df2da21 add hhh (draft) | | - | * 22 - {bar} 735c7bd8f133 add ggg (draft) + | * 22 - {bar} 310e9f9bceb1 add ggg (draft) | | - | x 18 - {bar} 793eb6370b2d add fff (draft) + | x 18 - {bar} c80027c7cda1 add fff (draft) |/ o 12 - {foo} 42b49017ff90 add eee (draft) | @@ -426,7 +428,7 @@ (no more unresolved files) continue: hg evolve --continue $ hg evolve --continue - evolving 23:7acd9ea5d677 "add hhh" + evolving 23:aa8b0df2da21 "add hhh" move:[s4] add iii atop:[s3] add hhh move:[s5] add jjj @@ -439,13 +441,13 @@ switching to topic foo 2 files updated, 0 files merged, 1 files removed, 0 files unresolved updated to hidden changeset 6a6b7365c751 - (hidden revision '6a6b7365c751' was rewritten as: 2c295936ac04) + (hidden revision '6a6b7365c751' was rewritten as: 239dcab64bc0) working directory parent is obsolete! (6a6b7365c751) - (use 'hg evolve' to update to its successor: 2c295936ac04) + (use 'hg evolve' to update to its successor: 239dcab64bc0) Evolve: $ hg evolve update:[26] add fff switching to topic bar 3 files updated, 0 files merged, 0 files removed, 0 files unresolved - working directory is now at 2c295936ac04 + working directory is now at 239dcab64bc0
--- a/tests/test-evolve.t Thu Aug 12 22:01:11 2021 +0200 +++ b/tests/test-evolve.t Tue Oct 12 13:46:30 2021 +0300 @@ -531,11 +531,11 @@ crosschecking files in changesets and manifests checking files checked 3 changesets with 3 changes to 3 files - $ hg --config extensions.hgext.mq= strip 'extinct()' + $ hg --config extensions.mq= strip 'extinct()' abort: empty revision set [255] (do some garbare collection) - $ hg --config extensions.hgext.mq= strip --hidden 'extinct()' --config devel.strip-obsmarkers=no + $ hg --config extensions.mq= strip --hidden 'extinct()' --config devel.strip-obsmarkers=no saved backup bundle to $TESTTMP/alpha/.hg/strip-backup/e87767087a57-a365b072-backup.hg (glob) $ hg verify checking changesets
--- a/tests/test-fold.t Thu Aug 12 22:01:11 2021 +0200 +++ b/tests/test-fold.t Tue Oct 12 13:46:30 2021 +0300 @@ -11,11 +11,6 @@ > [ui] > logtemplate = '{rev} - {node|short} {desc|firstline} [{author}] ({phase}) {bookmarks}\n' > EOF - $ mkcommit() { - > echo "$1" > "$1" - > hg add "$1" - > hg ci -qm "$1" - > } $ hg init fold-tests $ cd fold-tests/ @@ -319,6 +314,7 @@ $ hg up null 0 files updated, 0 files merged, 1 files removed, 0 files unresolved $ mkcommit apple + created new head $ mkcommit banana $ hg merge
--- a/tests/test-issue-6028.t Thu Aug 12 22:01:11 2021 +0200 +++ b/tests/test-issue-6028.t Tue Oct 12 13:46:30 2021 +0300 @@ -155,7 +155,7 @@ test that we successfully got rid of the bad file - $ hg d --git -r 'predecessors(.)' -r '.' + $ hg diff --git -r 'predecessors(.)' -r '.' diff --git a/a_bad_commit b/a_bad_commit deleted file mode 100644 --- a/a_bad_commit
--- a/tests/test-obsolete.t Thu Aug 12 22:01:11 2021 +0200 +++ b/tests/test-obsolete.t Tue Oct 12 13:46:30 2021 +0300 @@ -1,17 +1,12 @@ $ . $TESTDIR/testlib/common.sh $ cat >> $HGRCPATH <<EOF - > [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"
--- a/tests/test-prev-next.t Thu Aug 12 22:01:11 2021 +0200 +++ b/tests/test-prev-next.t Tue Oct 12 13:46:30 2021 +0300 @@ -229,7 +229,7 @@ next with ambiguity in aspiring children - $ hg am -m 'added b (3)' + $ hg amend -m 'added b (3)' 2 new orphan changesets $ hg next --no-evolve no children @@ -559,7 +559,7 @@ +bbbbb record this change to 'b'? [Ynesfdaq?] y - no more change to split + no more changes to split 1 new orphan changesets $ hg up 3 -q @@ -606,6 +606,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') + [1] + + $ 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 + [255] + $ hg next --abort --merge + abort: cannot specify both --abort and --merge + [255] + + $ cd .. + Testing --merge and --evolve flags: 1 child, 1 aspchild, dirty working copy $ hg init next-dirty-evolve
--- a/tests/test-prune.t Thu Aug 12 22:01:11 2021 +0200 +++ b/tests/test-prune.t Tue Oct 12 13:46:30 2021 +0300 @@ -482,7 +482,7 @@ $ hg prune -r "desc('added c')" 1 changesets pruned - $ hg par + $ hg parents 1:5f6d8a4bf34a[] (obsolete/draft) added b working directory parent is obsolete! (5f6d8a4bf34a) (use 'hg evolve' to update to its parent successor)
--- a/tests/test-push-checkheads-partial-C1.t Thu Aug 12 22:01:11 2021 +0200 +++ b/tests/test-push-checkheads-partial-C1.t Tue Oct 12 13:46:30 2021 +0300 @@ -17,7 +17,7 @@ .. .. new-state: .. -.. * 1 new changesets branches superceeding only the head of the old one +.. * 1 new changesets branches superseding only the head of the old one .. * base of the old branch is still alive .. .. expected-result:
--- a/tests/test-push-checkheads-partial-C2.t Thu Aug 12 22:01:11 2021 +0200 +++ b/tests/test-push-checkheads-partial-C2.t Tue Oct 12 13:46:30 2021 +0300 @@ -17,7 +17,7 @@ .. .. new-state: .. -.. * 1 new changesets branches superceeding only the base of the old one +.. * 1 new changesets branches superseding only the base of the old one .. * The old branch is still alive (base is obsolete, head is alive) .. .. expected-result:
--- a/tests/test-push-checkheads-pruned-B2.t Thu Aug 12 22:01:11 2021 +0200 +++ b/tests/test-push-checkheads-pruned-B2.t Tue Oct 12 13:46:30 2021 +0300 @@ -9,7 +9,7 @@ This case is part of a series of tests checking this behavior. Category B: simple case involving pruned changesets -TestCase 2: multi-changeset branch, head is pruned, rest is superceeded +TestCase 2: multi-changeset branch, head is pruned, rest is superseded .. old-state: ..
--- a/tests/test-push-checkheads-pruned-B3.t Thu Aug 12 22:01:11 2021 +0200 +++ b/tests/test-push-checkheads-pruned-B3.t Tue Oct 12 13:46:30 2021 +0300 @@ -9,7 +9,7 @@ This case is part of a series of tests checking this behavior. Category B: simple case involving pruned changesets -TestCase 3: multi-changeset branch, other is pruned, rest is superceeded +TestCase 3: multi-changeset branch, other is pruned, rest is superseded .. old-state: .. @@ -17,7 +17,7 @@ .. .. new-state: .. -.. * old head is superceeded +.. * old head is superseded .. * old other is pruned .. .. expected-result:
--- a/tests/test-push-checkheads-pruned-B5.t Thu Aug 12 22:01:11 2021 +0200 +++ b/tests/test-push-checkheads-pruned-B5.t Tue Oct 12 13:46:30 2021 +0300 @@ -9,7 +9,7 @@ This case is part of a series of tests checking this behavior. Category B: simple case involving pruned changesets -TestCase 5: multi-changeset branch, mix of pruned and superceeded +TestCase 5: multi-changeset branch, mix of pruned and superseded .. old-state: .. @@ -18,7 +18,7 @@ .. new-state: .. .. * old head is pruned -.. * old mid is superceeded +.. * old mid is superseded .. * old root is pruned .. .. expected-result:
--- a/tests/test-push-checkheads-pruned-B8.t Thu Aug 12 22:01:11 2021 +0200 +++ b/tests/test-push-checkheads-pruned-B8.t Tue Oct 12 13:46:30 2021 +0300 @@ -9,7 +9,7 @@ This case is part of a series of tests checking this behavior. Category B: simple case involving pruned changesets -TestCase 2: multi-changeset branch, head is pruned, rest is superceeded, through other +TestCase 2: multi-changeset branch, head is pruned, rest is superseded, through other .. old-state: ..
--- a/tests/test-push-checkheads-superceed-A1.t Thu Aug 12 22:01:11 2021 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,71 +0,0 @@ -==================================== -Testing head checking code: Case A-1 -==================================== - -Mercurial checks for the introduction of new heads on push. Evolution comes -into play to detect if existing branches on the server are being replaced by -some of the new one we push. - -This case is part of a series of tests checking this behavior. - -Category A: simple case involving a branch being superceeded by another. -TestCase 1: single-changeset branch - -.. old-state: -.. -.. * 1 changeset branch -.. -.. new-state: -.. -.. * 1 changeset branch succeeding to A -.. -.. expected-result: -.. -.. * push allowed -.. -.. graph-summary: -.. -.. A ø⇠◔ A' -.. |/ -.. ● - - $ . $TESTDIR/testlib/push-checkheads-util.sh - -Test setup ----------- - - $ mkdir A1 - $ cd A1 - $ setuprepos - creating basic server and client repo - updating to branch default - 2 files updated, 0 files merged, 0 files removed, 0 files unresolved - $ cd client - $ hg up 0 - 0 files updated, 0 files merged, 1 files removed, 0 files unresolved - $ mkcommit A1 - created new head - $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"` - obsoleted 1 changesets - $ hg log -G --hidden - @ f6082bc4ffef (draft): A1 - | - | x 8aaa48160adc (draft): A0 - |/ - o 1e4be0697311 (public): root - - -Actual testing --------------- - - $ hg push - pushing to $TESTTMP/A1/server (glob) - searching for changes - adding changesets - adding manifests - adding file changes - added 1 changesets with 1 changes to 1 files (+1 heads) - 1 new obsolescence markers - obsoleted 1 changesets - - $ cd ../..
--- a/tests/test-push-checkheads-superceed-A2.t Thu Aug 12 22:01:11 2021 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,92 +0,0 @@ -==================================== -Testing head checking code: Case A-2 -==================================== - -Mercurial checks for the introduction of new heads on push. Evolution comes -into play to detect if existing branches on the server are being replaced by -some of the new one we push. - -This case is part of a series of tests checking this behavior. - -Category A: simple case involving a branch being superceeded by another. -TestCase 2: multi-changeset branch - -.. old-state: -.. -.. * 1 branch with 2 changesets -.. -.. new-state: -.. -.. * another 2-changeset branch succeeding the old one -.. -.. expected-result: -.. -.. * push allowed -.. -.. graph-summary: -.. -.. B ø⇠◔ B' -.. | | -.. A ø⇠◔ A' -.. |/ -.. ● - - $ . $TESTDIR/testlib/push-checkheads-util.sh - -Test setup ----------- - - $ mkdir A2 - $ cd A2 - $ setuprepos - creating basic server and client repo - updating to branch default - 2 files updated, 0 files merged, 0 files removed, 0 files unresolved - $ cd server - $ mkcommit B0 - $ cd ../client - $ hg pull - pulling from $TESTTMP/A2/server (glob) - searching for changes - adding changesets - adding manifests - adding file changes - added 1 changesets with 1 changes to 1 files - new changesets d73caddc5533 (1 drafts) - (run 'hg update' to get a working copy) - $ hg up 0 - 0 files updated, 0 files merged, 1 files removed, 0 files unresolved - $ mkcommit A1 - created new head - $ mkcommit B1 - $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"` - obsoleted 1 changesets - 1 new orphan changesets - $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"` - obsoleted 1 changesets - $ hg log -G --hidden - @ 262c8c798096 (draft): B1 - | - o f6082bc4ffef (draft): A1 - | - | x d73caddc5533 (draft): B0 - | | - | x 8aaa48160adc (draft): A0 - |/ - o 1e4be0697311 (public): root - - -Actual testing --------------- - - $ hg push - pushing to $TESTTMP/A2/server (glob) - searching for changes - adding changesets - adding manifests - adding file changes - added 2 changesets with 2 changes to 2 files (+1 heads) - 2 new obsolescence markers - obsoleted 2 changesets - - $ cd ../..
--- a/tests/test-push-checkheads-superceed-A3.t Thu Aug 12 22:01:11 2021 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,95 +0,0 @@ -==================================== -Testing head checking code: Case A-3 -==================================== - -Mercurial checks for the introduction of new heads on push. Evolution comes -into play to detect if existing branches on the server are being replaced by -some of the new one we push. - -This case is part of a series of tests checking this behavior. - -Category A: simple case involving a branch being superceeded by another. -TestCase 3: multi-changeset branch with reordering - -Push should be allowed -.. old-state: -.. -.. * 2 changeset branch -.. -.. new-state: -.. -.. * 2 changeset branch succeeding the old one with reordering -.. -.. expected-result: -.. -.. * push allowed -.. -.. graph-summary: -.. -.. B ø⇠⇠ -.. | ⇡ -.. A ø⇠⇠⇠○ A' -.. | ⇡/ -.. | ○ B' -.. |/ -.. ● - - $ . $TESTDIR/testlib/push-checkheads-util.sh - -Test setup ----------- - - $ mkdir A3 - $ cd A3 - $ setuprepos - creating basic server and client repo - updating to branch default - 2 files updated, 0 files merged, 0 files removed, 0 files unresolved - $ cd server - $ mkcommit B0 - $ cd ../client - $ hg pull - pulling from $TESTTMP/A3/server (glob) - searching for changes - adding changesets - adding manifests - adding file changes - added 1 changesets with 1 changes to 1 files - new changesets d73caddc5533 (1 drafts) - (run 'hg update' to get a working copy) - $ hg up 0 - 0 files updated, 0 files merged, 1 files removed, 0 files unresolved - $ mkcommit B1 - created new head - $ mkcommit A1 - $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"` - obsoleted 1 changesets - 1 new orphan changesets - $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"` - obsoleted 1 changesets - $ hg log -G --hidden - @ c1c7524e9488 (draft): A1 - | - o 25c56d33e4c4 (draft): B1 - | - | x d73caddc5533 (draft): B0 - | | - | x 8aaa48160adc (draft): A0 - |/ - o 1e4be0697311 (public): root - - -Actual testing --------------- - - $ hg push - pushing to $TESTTMP/A3/server (glob) - searching for changes - adding changesets - adding manifests - adding file changes - added 2 changesets with 2 changes to 2 files (+1 heads) - 2 new obsolescence markers - obsoleted 2 changesets - - $ cd ../..
--- a/tests/test-push-checkheads-superceed-A4.t Thu Aug 12 22:01:11 2021 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,76 +0,0 @@ -==================================== -Testing head checking code: Case A-4 -==================================== - -Mercurial checks for the introduction of new heads on push. Evolution comes -into play to detect if existing branches on the server are being replaced by -some of the new one we push. - -This case is part of a series of tests checking this behavior. - -Category A: simple case involving a branch being superceeded by another. -TestCase 4: New changeset as children of the successor - -.. old-state: -.. -.. * 1-changeset branch -.. -.. new-state: -.. -.. * 2-changeset branch, first is a successor, but head is new -.. -.. expected-result: -.. -.. * push allowed -.. -.. graph-summary: -.. -.. ◔ B -.. | -.. A ø⇠◔ A' -.. |/ -.. ● - - $ . $TESTDIR/testlib/push-checkheads-util.sh - -Test setup ----------- - - $ mkdir A4 - $ cd A4 - $ setuprepos - creating basic server and client repo - updating to branch default - 2 files updated, 0 files merged, 0 files removed, 0 files unresolved - $ cd client - $ hg up 0 - 0 files updated, 0 files merged, 1 files removed, 0 files unresolved - $ mkcommit A1 - created new head - $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"` - obsoleted 1 changesets - $ mkcommit B0 - $ hg log -G --hidden - @ f40ded968333 (draft): B0 - | - o f6082bc4ffef (draft): A1 - | - | x 8aaa48160adc (draft): A0 - |/ - o 1e4be0697311 (public): root - - -Actual testing --------------- - - $ hg push - pushing to $TESTTMP/A4/server (glob) - searching for changes - adding changesets - adding manifests - adding file changes - added 2 changesets with 2 changes to 2 files (+1 heads) - 1 new obsolescence markers - obsoleted 1 changesets - - $ cd ../../
--- a/tests/test-push-checkheads-superceed-A5.t Thu Aug 12 22:01:11 2021 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,77 +0,0 @@ -==================================== -Testing head checking code: Case A-5 -==================================== - -Mercurial checks for the introduction of new heads on push. Evolution comes -into play to detect if existing branches on the server are being replaced by -some of the new one we push. - -This case is part of a series of tests checking this behavior. - -Category A: simple case involving a branch being superceeded by another. -TestCase 5: New changeset as parent of the successor - -.. old-state: -.. -.. * 1-changeset branch -.. -.. new-state: -.. -.. * 2rchangeset branch, head is a successor, but other is new -.. -.. expected-result: -.. -.. * push allowed -.. -.. graph-summary: -.. -.. A ø⇠◔ A' -.. | | -.. | ◔ B -.. |/ -.. ● - - $ . $TESTDIR/testlib/push-checkheads-util.sh - -Test setup ----------- - - $ mkdir A5 - $ cd A5 - $ setuprepos - creating basic server and client repo - updating to branch default - 2 files updated, 0 files merged, 0 files removed, 0 files unresolved - $ cd client - $ hg up 0 - 0 files updated, 0 files merged, 1 files removed, 0 files unresolved - $ mkcommit B0 - created new head - $ mkcommit A1 - $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"` - obsoleted 1 changesets - $ hg log -G --hidden - @ ba93660aff8d (draft): A1 - | - o 74ff5441d343 (draft): B0 - | - | x 8aaa48160adc (draft): A0 - |/ - o 1e4be0697311 (public): root - - -Actual testing --------------- - - $ hg push - pushing to $TESTTMP/A5/server (glob) - searching for changes - adding changesets - adding manifests - adding file changes - added 2 changesets with 2 changes to 2 files (+1 heads) - 1 new obsolescence markers - obsoleted 1 changesets - - $ cd ../.. -
--- a/tests/test-push-checkheads-superceed-A6.t Thu Aug 12 22:01:11 2021 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,103 +0,0 @@ -==================================== -Testing head checking code: Case A-6 -==================================== - -Mercurial checks for the introduction of new heads on push. Evolution comes -into play to detect if existing branches on the server are being replaced by -some of the new one we push. - -This case is part of a series of tests checking this behavior. - -Category A: simple case involving a branch being superceeded by another. -TestCase 6: multi-changeset branch, split on multiple other, (base on its own branch), same number of head - -.. old-state: -.. -.. * 2 branch (1-changeset, and 2-changesets) -.. -.. new-state: -.. -.. * 1 new branch superceeding the base of the old-2-changesets-branch, -.. * 1 new changesets on the old-1-changeset-branch superceeding the head of the other -.. -.. expected-result: -.. -.. * push allowed -.. -.. graph-summary: -.. -.. B'◔⇢ø B -.. | | -.. A | ø⇠◔ A' -.. | |/ -.. C ● | -.. \| -.. ● - - $ . $TESTDIR/testlib/push-checkheads-util.sh - -Test setup ----------- - - $ mkdir A6 - $ cd A6 - $ setuprepos - creating basic server and client repo - updating to branch default - 2 files updated, 0 files merged, 0 files removed, 0 files unresolved - $ cd server - $ mkcommit B0 - $ hg up 0 - 0 files updated, 0 files merged, 2 files removed, 0 files unresolved - $ mkcommit C0 - created new head - $ cd ../client - $ hg pull - pulling from $TESTTMP/A6/server (glob) - searching for changes - adding changesets - adding manifests - adding file changes - added 2 changesets with 2 changes to 2 files (+1 heads) - new changesets d73caddc5533:0f88766e02d6 (2 drafts) - (run 'hg heads' to see heads, 'hg merge' to merge) - $ hg up 0 - 0 files updated, 0 files merged, 1 files removed, 0 files unresolved - $ mkcommit A1 - created new head - $ hg up 'desc(C0)' - 1 files updated, 0 files merged, 1 files removed, 0 files unresolved - $ mkcommit B1 - $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"` - obsoleted 1 changesets - 1 new orphan changesets - $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"` - obsoleted 1 changesets - $ hg log -G --hidden - @ d70a1f75a020 (draft): B1 - | - | o f6082bc4ffef (draft): A1 - | | - o | 0f88766e02d6 (draft): C0 - |/ - | x d73caddc5533 (draft): B0 - | | - | x 8aaa48160adc (draft): A0 - |/ - o 1e4be0697311 (public): root - - -Actual testing --------------- - - $ hg push - pushing to $TESTTMP/A6/server (glob) - searching for changes - adding changesets - adding manifests - adding file changes - added 2 changesets with 2 changes to 2 files (+1 heads) - 2 new obsolescence markers - obsoleted 2 changesets - - $ cd ../..
--- a/tests/test-push-checkheads-superceed-A7.t Thu Aug 12 22:01:11 2021 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,103 +0,0 @@ -==================================== -Testing head checking code: Case A-7 -==================================== - -Mercurial checks for the introduction of new heads on push. Evolution comes -into play to detect if existing branches on the server are being replaced by -some of the new one we push. - -This case is part of a series of tests checking this behavior. - -Category A: simple case involving a branch being superceeded by another. -TestCase 7: multi-changeset branch, split on multiple other, (head on its own branch), same number of head - -.. old-state: -.. -.. * 2 branch (1-changeset, and 2-changesets) -.. -.. new-state: -.. -.. * 1 new branch superceeding the head of the old-2-changesets-branch, -.. * 1 new changesets on the old-1-changeset-branch superceeding the base of the other -.. -.. expected-result: -.. -.. * push allowed -.. -.. graph-summary: -.. -.. B ø⇠◔ B' -.. | | -.. A'◔⇢ø | -.. | |/ -.. C ● | -.. \| -.. ● - - $ . $TESTDIR/testlib/push-checkheads-util.sh - -Test setup ----------- - - $ mkdir A7 - $ cd A7 - $ setuprepos - creating basic server and client repo - updating to branch default - 2 files updated, 0 files merged, 0 files removed, 0 files unresolved - $ cd server - $ mkcommit B0 - $ hg up 0 - 0 files updated, 0 files merged, 2 files removed, 0 files unresolved - $ mkcommit C0 - created new head - $ cd ../client - $ hg pull - pulling from $TESTTMP/A7/server (glob) - searching for changes - adding changesets - adding manifests - adding file changes - added 2 changesets with 2 changes to 2 files (+1 heads) - new changesets d73caddc5533:0f88766e02d6 (2 drafts) - (run 'hg heads' to see heads, 'hg merge' to merge) - $ hg up 'desc(C0)' - 1 files updated, 0 files merged, 1 files removed, 0 files unresolved - $ mkcommit A1 - $ hg up 0 - 0 files updated, 0 files merged, 2 files removed, 0 files unresolved - $ mkcommit B1 - created new head - $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"` - obsoleted 1 changesets - 1 new orphan changesets - $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"` - obsoleted 1 changesets - $ hg log -G --hidden - @ 25c56d33e4c4 (draft): B1 - | - | o a0802eb7fc1b (draft): A1 - | | - | o 0f88766e02d6 (draft): C0 - |/ - | x d73caddc5533 (draft): B0 - | | - | x 8aaa48160adc (draft): A0 - |/ - o 1e4be0697311 (public): root - - -Actual testing --------------- - - $ hg push - pushing to $TESTTMP/A7/server (glob) - searching for changes - adding changesets - adding manifests - adding file changes - added 2 changesets with 2 changes to 2 files (+1 heads) - 2 new obsolescence markers - obsoleted 2 changesets - - $ cd ../..
--- a/tests/test-push-checkheads-superceed-A8.t Thu Aug 12 22:01:11 2021 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -==================================== -Testing head checking code: Case A-8 -==================================== - -Mercurial checks for the introduction of new heads on push. Evolution comes -into play to detect if existing branches on the server are being replaced by -some of the new one we push. - -This case is part of a series of tests checking this behavior. - -Category A: simple case involving a branch being superceeded by another. -TestCase 8: single-changeset branch indirect rewrite - -.. old-state: -.. -.. * 1-changeset branch -.. -.. new-state: -.. -.. * 1-changeset branch succeeding to A, through another unpushed changesets -.. -.. expected-result: -.. -.. * push allowed -.. -.. graph-summary: -.. -.. A' -.. A ø⇠ø⇠◔ A'' -.. |/ / -.. | / -.. |/ -.. ● - - $ . $TESTDIR/testlib/push-checkheads-util.sh - -Test setup ----------- - - $ mkdir A8 - $ cd A8 - $ setuprepos - creating basic server and client repo - updating to branch default - 2 files updated, 0 files merged, 0 files removed, 0 files unresolved - $ cd client - $ hg up 0 - 0 files updated, 0 files merged, 1 files removed, 0 files unresolved - $ mkcommit A1 - created new head - $ hg up 0 - 0 files updated, 0 files merged, 1 files removed, 0 files unresolved - $ mkcommit A2 - created new head - $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"` - obsoleted 1 changesets - $ hg debugobsolete `getid "desc(A1)" ` `getid "desc(A2)"` - obsoleted 1 changesets - $ hg log -G --hidden - @ c1f8d089020f (draft): A2 - | - | x f6082bc4ffef (draft): A1 - |/ - | x 8aaa48160adc (draft): A0 - |/ - o 1e4be0697311 (public): root - - -Actual testing --------------- - - $ hg push - pushing to $TESTTMP/A8/server (glob) - searching for changes - adding changesets - adding manifests - adding file changes - added 1 changesets with 1 changes to 1 files (+1 heads) - 2 new obsolescence markers - obsoleted 1 changesets - - $ cd ../..
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-push-checkheads-supersede-A1.t Tue Oct 12 13:46:30 2021 +0300 @@ -0,0 +1,71 @@ +==================================== +Testing head checking code: Case A-1 +==================================== + +Mercurial checks for the introduction of new heads on push. Evolution comes +into play to detect if existing branches on the server are being replaced by +some of the new one we push. + +This case is part of a series of tests checking this behavior. + +Category A: simple case involving a branch being superseded by another. +TestCase 1: single-changeset branch + +.. old-state: +.. +.. * 1 changeset branch +.. +.. new-state: +.. +.. * 1 changeset branch succeeding to A +.. +.. expected-result: +.. +.. * push allowed +.. +.. graph-summary: +.. +.. A ø⇠◔ A' +.. |/ +.. ● + + $ . $TESTDIR/testlib/push-checkheads-util.sh + +Test setup +---------- + + $ mkdir A1 + $ cd A1 + $ setuprepos + creating basic server and client repo + updating to branch default + 2 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ cd client + $ hg up 0 + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + $ mkcommit A1 + created new head + $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"` + obsoleted 1 changesets + $ hg log -G --hidden + @ f6082bc4ffef (draft): A1 + | + | x 8aaa48160adc (draft): A0 + |/ + o 1e4be0697311 (public): root + + +Actual testing +-------------- + + $ hg push + pushing to $TESTTMP/A1/server (glob) + searching for changes + adding changesets + adding manifests + adding file changes + added 1 changesets with 1 changes to 1 files (+1 heads) + 1 new obsolescence markers + obsoleted 1 changesets + + $ cd ../..
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-push-checkheads-supersede-A2.t Tue Oct 12 13:46:30 2021 +0300 @@ -0,0 +1,92 @@ +==================================== +Testing head checking code: Case A-2 +==================================== + +Mercurial checks for the introduction of new heads on push. Evolution comes +into play to detect if existing branches on the server are being replaced by +some of the new one we push. + +This case is part of a series of tests checking this behavior. + +Category A: simple case involving a branch being superseded by another. +TestCase 2: multi-changeset branch + +.. old-state: +.. +.. * 1 branch with 2 changesets +.. +.. new-state: +.. +.. * another 2-changeset branch succeeding the old one +.. +.. expected-result: +.. +.. * push allowed +.. +.. graph-summary: +.. +.. B ø⇠◔ B' +.. | | +.. A ø⇠◔ A' +.. |/ +.. ● + + $ . $TESTDIR/testlib/push-checkheads-util.sh + +Test setup +---------- + + $ mkdir A2 + $ cd A2 + $ setuprepos + creating basic server and client repo + updating to branch default + 2 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ cd server + $ mkcommit B0 + $ cd ../client + $ hg pull + pulling from $TESTTMP/A2/server (glob) + searching for changes + adding changesets + adding manifests + adding file changes + added 1 changesets with 1 changes to 1 files + new changesets d73caddc5533 (1 drafts) + (run 'hg update' to get a working copy) + $ hg up 0 + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + $ mkcommit A1 + created new head + $ mkcommit B1 + $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"` + obsoleted 1 changesets + 1 new orphan changesets + $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"` + obsoleted 1 changesets + $ hg log -G --hidden + @ 262c8c798096 (draft): B1 + | + o f6082bc4ffef (draft): A1 + | + | x d73caddc5533 (draft): B0 + | | + | x 8aaa48160adc (draft): A0 + |/ + o 1e4be0697311 (public): root + + +Actual testing +-------------- + + $ hg push + pushing to $TESTTMP/A2/server (glob) + searching for changes + adding changesets + adding manifests + adding file changes + added 2 changesets with 2 changes to 2 files (+1 heads) + 2 new obsolescence markers + obsoleted 2 changesets + + $ cd ../..
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-push-checkheads-supersede-A3.t Tue Oct 12 13:46:30 2021 +0300 @@ -0,0 +1,95 @@ +==================================== +Testing head checking code: Case A-3 +==================================== + +Mercurial checks for the introduction of new heads on push. Evolution comes +into play to detect if existing branches on the server are being replaced by +some of the new one we push. + +This case is part of a series of tests checking this behavior. + +Category A: simple case involving a branch being superseded by another. +TestCase 3: multi-changeset branch with reordering + +Push should be allowed +.. old-state: +.. +.. * 2 changeset branch +.. +.. new-state: +.. +.. * 2 changeset branch succeeding the old one with reordering +.. +.. expected-result: +.. +.. * push allowed +.. +.. graph-summary: +.. +.. B ø⇠⇠ +.. | ⇡ +.. A ø⇠⇠⇠○ A' +.. | ⇡/ +.. | ○ B' +.. |/ +.. ● + + $ . $TESTDIR/testlib/push-checkheads-util.sh + +Test setup +---------- + + $ mkdir A3 + $ cd A3 + $ setuprepos + creating basic server and client repo + updating to branch default + 2 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ cd server + $ mkcommit B0 + $ cd ../client + $ hg pull + pulling from $TESTTMP/A3/server (glob) + searching for changes + adding changesets + adding manifests + adding file changes + added 1 changesets with 1 changes to 1 files + new changesets d73caddc5533 (1 drafts) + (run 'hg update' to get a working copy) + $ hg up 0 + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + $ mkcommit B1 + created new head + $ mkcommit A1 + $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"` + obsoleted 1 changesets + 1 new orphan changesets + $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"` + obsoleted 1 changesets + $ hg log -G --hidden + @ c1c7524e9488 (draft): A1 + | + o 25c56d33e4c4 (draft): B1 + | + | x d73caddc5533 (draft): B0 + | | + | x 8aaa48160adc (draft): A0 + |/ + o 1e4be0697311 (public): root + + +Actual testing +-------------- + + $ hg push + pushing to $TESTTMP/A3/server (glob) + searching for changes + adding changesets + adding manifests + adding file changes + added 2 changesets with 2 changes to 2 files (+1 heads) + 2 new obsolescence markers + obsoleted 2 changesets + + $ cd ../..
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-push-checkheads-supersede-A4.t Tue Oct 12 13:46:30 2021 +0300 @@ -0,0 +1,76 @@ +==================================== +Testing head checking code: Case A-4 +==================================== + +Mercurial checks for the introduction of new heads on push. Evolution comes +into play to detect if existing branches on the server are being replaced by +some of the new one we push. + +This case is part of a series of tests checking this behavior. + +Category A: simple case involving a branch being superseded by another. +TestCase 4: New changeset as children of the successor + +.. old-state: +.. +.. * 1-changeset branch +.. +.. new-state: +.. +.. * 2-changeset branch, first is a successor, but head is new +.. +.. expected-result: +.. +.. * push allowed +.. +.. graph-summary: +.. +.. ◔ B +.. | +.. A ø⇠◔ A' +.. |/ +.. ● + + $ . $TESTDIR/testlib/push-checkheads-util.sh + +Test setup +---------- + + $ mkdir A4 + $ cd A4 + $ setuprepos + creating basic server and client repo + updating to branch default + 2 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ cd client + $ hg up 0 + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + $ mkcommit A1 + created new head + $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"` + obsoleted 1 changesets + $ mkcommit B0 + $ hg log -G --hidden + @ f40ded968333 (draft): B0 + | + o f6082bc4ffef (draft): A1 + | + | x 8aaa48160adc (draft): A0 + |/ + o 1e4be0697311 (public): root + + +Actual testing +-------------- + + $ hg push + pushing to $TESTTMP/A4/server (glob) + searching for changes + adding changesets + adding manifests + adding file changes + added 2 changesets with 2 changes to 2 files (+1 heads) + 1 new obsolescence markers + obsoleted 1 changesets + + $ cd ../../
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-push-checkheads-supersede-A5.t Tue Oct 12 13:46:30 2021 +0300 @@ -0,0 +1,77 @@ +==================================== +Testing head checking code: Case A-5 +==================================== + +Mercurial checks for the introduction of new heads on push. Evolution comes +into play to detect if existing branches on the server are being replaced by +some of the new one we push. + +This case is part of a series of tests checking this behavior. + +Category A: simple case involving a branch being superseded by another. +TestCase 5: New changeset as parent of the successor + +.. old-state: +.. +.. * 1-changeset branch +.. +.. new-state: +.. +.. * 2rchangeset branch, head is a successor, but other is new +.. +.. expected-result: +.. +.. * push allowed +.. +.. graph-summary: +.. +.. A ø⇠◔ A' +.. | | +.. | ◔ B +.. |/ +.. ● + + $ . $TESTDIR/testlib/push-checkheads-util.sh + +Test setup +---------- + + $ mkdir A5 + $ cd A5 + $ setuprepos + creating basic server and client repo + updating to branch default + 2 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ cd client + $ hg up 0 + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + $ mkcommit B0 + created new head + $ mkcommit A1 + $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"` + obsoleted 1 changesets + $ hg log -G --hidden + @ ba93660aff8d (draft): A1 + | + o 74ff5441d343 (draft): B0 + | + | x 8aaa48160adc (draft): A0 + |/ + o 1e4be0697311 (public): root + + +Actual testing +-------------- + + $ hg push + pushing to $TESTTMP/A5/server (glob) + searching for changes + adding changesets + adding manifests + adding file changes + added 2 changesets with 2 changes to 2 files (+1 heads) + 1 new obsolescence markers + obsoleted 1 changesets + + $ cd ../.. +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-push-checkheads-supersede-A6.t Tue Oct 12 13:46:30 2021 +0300 @@ -0,0 +1,103 @@ +==================================== +Testing head checking code: Case A-6 +==================================== + +Mercurial checks for the introduction of new heads on push. Evolution comes +into play to detect if existing branches on the server are being replaced by +some of the new one we push. + +This case is part of a series of tests checking this behavior. + +Category A: simple case involving a branch being superseded by another. +TestCase 6: multi-changeset branch, split on multiple other, (base on its own branch), same number of head + +.. old-state: +.. +.. * 2 branch (1-changeset, and 2-changesets) +.. +.. new-state: +.. +.. * 1 new branch superseding the base of the old-2-changesets-branch, +.. * 1 new changesets on the old-1-changeset-branch superseding the head of the other +.. +.. expected-result: +.. +.. * push allowed +.. +.. graph-summary: +.. +.. B'◔⇢ø B +.. | | +.. A | ø⇠◔ A' +.. | |/ +.. C ● | +.. \| +.. ● + + $ . $TESTDIR/testlib/push-checkheads-util.sh + +Test setup +---------- + + $ mkdir A6 + $ cd A6 + $ setuprepos + creating basic server and client repo + updating to branch default + 2 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ cd server + $ mkcommit B0 + $ hg up 0 + 0 files updated, 0 files merged, 2 files removed, 0 files unresolved + $ mkcommit C0 + created new head + $ cd ../client + $ hg pull + pulling from $TESTTMP/A6/server (glob) + searching for changes + adding changesets + adding manifests + adding file changes + added 2 changesets with 2 changes to 2 files (+1 heads) + new changesets d73caddc5533:0f88766e02d6 (2 drafts) + (run 'hg heads' to see heads, 'hg merge' to merge) + $ hg up 0 + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + $ mkcommit A1 + created new head + $ hg up 'desc(C0)' + 1 files updated, 0 files merged, 1 files removed, 0 files unresolved + $ mkcommit B1 + $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"` + obsoleted 1 changesets + 1 new orphan changesets + $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"` + obsoleted 1 changesets + $ hg log -G --hidden + @ d70a1f75a020 (draft): B1 + | + | o f6082bc4ffef (draft): A1 + | | + o | 0f88766e02d6 (draft): C0 + |/ + | x d73caddc5533 (draft): B0 + | | + | x 8aaa48160adc (draft): A0 + |/ + o 1e4be0697311 (public): root + + +Actual testing +-------------- + + $ hg push + pushing to $TESTTMP/A6/server (glob) + searching for changes + adding changesets + adding manifests + adding file changes + added 2 changesets with 2 changes to 2 files (+1 heads) + 2 new obsolescence markers + obsoleted 2 changesets + + $ cd ../..
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-push-checkheads-supersede-A7.t Tue Oct 12 13:46:30 2021 +0300 @@ -0,0 +1,103 @@ +==================================== +Testing head checking code: Case A-7 +==================================== + +Mercurial checks for the introduction of new heads on push. Evolution comes +into play to detect if existing branches on the server are being replaced by +some of the new one we push. + +This case is part of a series of tests checking this behavior. + +Category A: simple case involving a branch being superseded by another. +TestCase 7: multi-changeset branch, split on multiple other, (head on its own branch), same number of head + +.. old-state: +.. +.. * 2 branch (1-changeset, and 2-changesets) +.. +.. new-state: +.. +.. * 1 new branch superseding the head of the old-2-changesets-branch, +.. * 1 new changesets on the old-1-changeset-branch superseding the base of the other +.. +.. expected-result: +.. +.. * push allowed +.. +.. graph-summary: +.. +.. B ø⇠◔ B' +.. | | +.. A'◔⇢ø | +.. | |/ +.. C ● | +.. \| +.. ● + + $ . $TESTDIR/testlib/push-checkheads-util.sh + +Test setup +---------- + + $ mkdir A7 + $ cd A7 + $ setuprepos + creating basic server and client repo + updating to branch default + 2 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ cd server + $ mkcommit B0 + $ hg up 0 + 0 files updated, 0 files merged, 2 files removed, 0 files unresolved + $ mkcommit C0 + created new head + $ cd ../client + $ hg pull + pulling from $TESTTMP/A7/server (glob) + searching for changes + adding changesets + adding manifests + adding file changes + added 2 changesets with 2 changes to 2 files (+1 heads) + new changesets d73caddc5533:0f88766e02d6 (2 drafts) + (run 'hg heads' to see heads, 'hg merge' to merge) + $ hg up 'desc(C0)' + 1 files updated, 0 files merged, 1 files removed, 0 files unresolved + $ mkcommit A1 + $ hg up 0 + 0 files updated, 0 files merged, 2 files removed, 0 files unresolved + $ mkcommit B1 + created new head + $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"` + obsoleted 1 changesets + 1 new orphan changesets + $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"` + obsoleted 1 changesets + $ hg log -G --hidden + @ 25c56d33e4c4 (draft): B1 + | + | o a0802eb7fc1b (draft): A1 + | | + | o 0f88766e02d6 (draft): C0 + |/ + | x d73caddc5533 (draft): B0 + | | + | x 8aaa48160adc (draft): A0 + |/ + o 1e4be0697311 (public): root + + +Actual testing +-------------- + + $ hg push + pushing to $TESTTMP/A7/server (glob) + searching for changes + adding changesets + adding manifests + adding file changes + added 2 changesets with 2 changes to 2 files (+1 heads) + 2 new obsolescence markers + obsoleted 2 changesets + + $ cd ../..
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-push-checkheads-supersede-A8.t Tue Oct 12 13:46:30 2021 +0300 @@ -0,0 +1,82 @@ +==================================== +Testing head checking code: Case A-8 +==================================== + +Mercurial checks for the introduction of new heads on push. Evolution comes +into play to detect if existing branches on the server are being replaced by +some of the new one we push. + +This case is part of a series of tests checking this behavior. + +Category A: simple case involving a branch being superseded by another. +TestCase 8: single-changeset branch indirect rewrite + +.. old-state: +.. +.. * 1-changeset branch +.. +.. new-state: +.. +.. * 1-changeset branch succeeding to A, through another unpushed changesets +.. +.. expected-result: +.. +.. * push allowed +.. +.. graph-summary: +.. +.. A' +.. A ø⇠ø⇠◔ A'' +.. |/ / +.. | / +.. |/ +.. ● + + $ . $TESTDIR/testlib/push-checkheads-util.sh + +Test setup +---------- + + $ mkdir A8 + $ cd A8 + $ setuprepos + creating basic server and client repo + updating to branch default + 2 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ cd client + $ hg up 0 + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + $ mkcommit A1 + created new head + $ hg up 0 + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + $ mkcommit A2 + created new head + $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"` + obsoleted 1 changesets + $ hg debugobsolete `getid "desc(A1)" ` `getid "desc(A2)"` + obsoleted 1 changesets + $ hg log -G --hidden + @ c1f8d089020f (draft): A2 + | + | x f6082bc4ffef (draft): A1 + |/ + | x 8aaa48160adc (draft): A0 + |/ + o 1e4be0697311 (public): root + + +Actual testing +-------------- + + $ hg push + pushing to $TESTTMP/A8/server (glob) + searching for changes + adding changesets + adding manifests + adding file changes + added 1 changesets with 1 changes to 1 files (+1 heads) + 2 new obsolescence markers + obsoleted 1 changesets + + $ cd ../..
--- a/tests/test-push-checkheads-unpushed-D4.t Thu Aug 12 22:01:11 2021 +0200 +++ b/tests/test-push-checkheads-unpushed-D4.t Tue Oct 12 13:46:30 2021 +0300 @@ -17,8 +17,8 @@ .. .. new-state: .. -.. * 1 new branch superceeding the base of the old-2-changesets-branch, -.. * 1 new changesets on the old-1-changeset-branch superceeding the head of the other +.. * 1 new branch superseding the base of the old-2-changesets-branch, +.. * 1 new changesets on the old-1-changeset-branch superseding the head of the other .. .. expected-result: ..
--- a/tests/test-push-checkheads-unpushed-D5.t Thu Aug 12 22:01:11 2021 +0200 +++ b/tests/test-push-checkheads-unpushed-D5.t Tue Oct 12 13:46:30 2021 +0300 @@ -17,8 +17,8 @@ .. .. new-state: .. -.. * 1 new branch superceeding the head of the old-2-changesets-branch, -.. * 1 new changesets on the old-1-changeset-branch superceeding the base of the other +.. * 1 new branch superseding the head of the old-2-changesets-branch, +.. * 1 new changesets on the old-1-changeset-branch superseding the base of the other .. .. expected-result: ..
--- a/tests/test-single-head-obsolescence-named-branch-A1.t Thu Aug 12 22:01:11 2021 +0200 +++ b/tests/test-single-head-obsolescence-named-branch-A1.t Tue Oct 12 13:46:30 2021 +0300 @@ -20,7 +20,7 @@ .. new-state: .. .. * 2 changeset changeset on branch Z at the same location -.. * 2 changeset changeset on branch default superceeding the other ones +.. * 2 changeset changeset on branch default superseding the other ones .. .. expected-result: ..
--- a/tests/test-single-head-obsolescence-named-branch-A2.t Thu Aug 12 22:01:11 2021 +0200 +++ b/tests/test-single-head-obsolescence-named-branch-A2.t Tue Oct 12 13:46:30 2021 +0300 @@ -22,7 +22,7 @@ .. .. * 2 changeset changeset on branch Z at the same location .. * 1 changeset changeset on branch default unchanged -.. * 1 changeset changeset on branch default superceeding the other ones +.. * 1 changeset changeset on branch default superseding the other ones .. .. expected-result: ..
--- a/tests/test-single-head-obsolescence-named-branch-A3.t Thu Aug 12 22:01:11 2021 +0200 +++ b/tests/test-single-head-obsolescence-named-branch-A3.t Tue Oct 12 13:46:30 2021 +0300 @@ -10,7 +10,7 @@ This case is part of a series of tests checking this behavior. Category A: Involving obsolescence -TestCase 3: Full superceedig of a branch interleaved with another +TestCase 3: Full supersedig of a branch interleaved with another .. old-state: .. @@ -20,7 +20,7 @@ .. new-state: .. .. * 2 changeset changeset on branch Z at the same location -.. * 2 changeset changeset on branch default superceeding the other ones +.. * 2 changeset changeset on branch default superseding the other ones .. .. expected-result: ..
--- a/tests/test-single-head-obsolescence-topic-B1.t Thu Aug 12 22:01:11 2021 +0200 +++ b/tests/test-single-head-obsolescence-topic-B1.t Tue Oct 12 13:46:30 2021 +0300 @@ -20,7 +20,7 @@ .. new-state: .. .. * 2 changeset changeset on topic Y at the same location -.. * 2 changeset changeset on topic X superceeding the other ones +.. * 2 changeset changeset on topic X superseding the other ones .. .. expected-result: ..
--- a/tests/test-single-head-obsolescence-topic-B2.t Thu Aug 12 22:01:11 2021 +0200 +++ b/tests/test-single-head-obsolescence-topic-B2.t Tue Oct 12 13:46:30 2021 +0300 @@ -22,7 +22,7 @@ .. .. * 2 changeset changeset on topic Y at the same location .. * 1 changeset changeset on topic X unchanged -.. * 1 changeset changeset on topic X superceeding the other ones +.. * 1 changeset changeset on topic X superseding the other ones .. .. expected-result: ..
--- a/tests/test-single-head-obsolescence-topic-B3.t Thu Aug 12 22:01:11 2021 +0200 +++ b/tests/test-single-head-obsolescence-topic-B3.t Tue Oct 12 13:46:30 2021 +0300 @@ -10,7 +10,7 @@ This case is part of a series of tests checking this behavior. Category B: Involving obsolescence with topic -TestCase 3: Full superceedig of a branch interleaved with another +TestCase 3: Full supersedig of a branch interleaved with another .. old-state: .. @@ -20,7 +20,7 @@ .. new-state: .. .. * 2 changeset changeset on topic X at the same location -.. * 2 changeset changeset on topic Y superceeding the other ones +.. * 2 changeset changeset on topic Y superseding the other ones .. .. expected-result: ..
--- a/tests/test-split.t Thu Aug 12 22:01:11 2021 +0200 +++ b/tests/test-split.t Tue Oct 12 13:46:30 2021 +0300 @@ -21,7 +21,13 @@ > hg add "$1" > hg ci -m "add $1" $2 $3 > } - + $ cat > $TESTTMP/editor.sh << '__EOF__' + > NUM=$(cat "$TESTTMP/split-counter") + > NUM=`expr "$NUM" + 1` + > echo "$NUM" > "$TESTTMP/split-counter" + > echo "split$NUM" > "$1" + > __EOF__ + $ export HGEDITOR="\"sh\" \"$TESTTMP/editor.sh\"" Basic case, split a head $ hg init testsplit @@ -35,15 +41,8 @@ $ hg debugobsolete 1334a80b33c3f9873edab728fbbcf500eab61d2e d2fe56e71366c2c5376c89960c281395062c0619 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'} -To create commits with the number of split - $ echo 0 > num - $ cat > editor.sh << '__EOF__' - > NUM=$(cat num) - > NUM=`expr "$NUM" + 1` - > echo "$NUM" > num - > echo "split$NUM" > "$1" - > __EOF__ - $ export HGEDITOR="\"sh\" \"editor.sh\"" +Creating commits with the number of split + $ echo 0 > $TESTTMP/split-counter $ hg split << EOF > y > y @@ -82,7 +81,7 @@ +_d record this change to '_d'? [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'} @@ -417,7 +416,7 @@ parent: 18:26f72cfaf036 tip Works on mytopic branch: new-branch:mytopic - commit: 2 unknown (clean) + commit: (clean) update: (current) phases: 9 draft topic: mytopic @@ -540,7 +539,7 @@ new file mode 100644 examine changes to 'SPLIT2'? [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 @@ -756,8 +755,6 @@ $ hg status ? SPLIT3 ? SPLIT4 - ? editor.sh - ? num Test restricting the split to a subset of files ----------------------------------------------- @@ -821,7 +818,7 @@ new file mode 100644 examine changes to 'SPLIT3'? [Ynesfdaq?] y - no more change to split + no more changes to split $ hg status --change '.~2' A SPLIT2 $ hg status --change '.~1' @@ -850,7 +847,7 @@ new file mode 100644 examine changes to 'SPLIT3'? [Ynesfdaq?] y - no more change to split + no more changes to split $ hg status --change '.~1' A SPLIT2 A SPLIT3 @@ -881,7 +878,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 '.' @@ -914,7 +911,7 @@ adding SPLIT2 adding SPLIT3 adding SPLIT4 - no more change to split + no more changes to split $ hg status --change '.' A SPLIT2 A SPLIT3 @@ -927,7 +924,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 '.' @@ -944,7 +941,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 @@ -962,7 +959,7 @@ adding SPLIT2 adding SPLIT3 adding SPLIT4 - no more change to split + no more changes to split $ hg status --change '.' A SPLIT2 A SPLIT3 @@ -995,17 +992,8 @@ o 0:a5a1faba8d26 p (draft) -To create commits with the number of split - $ echo 0 > num - $ cat > editor.sh << '__EOF__' - > NUM=$(cat num) - > NUM=`expr "$NUM" + 1` - > echo "$NUM" > num - > echo "split$NUM" > "$1" - > __EOF__ - $ export HGEDITOR="\"sh\" \"editor.sh\"" - Splitting the revision 1 to SPLIT1 and SPLIT2 which contains file a and b resp: + $ echo 0 > $TESTTMP/split-counter $ hg split -r 1 <<EOF > y > y @@ -1040,7 +1028,7 @@ +b record this change to 'b'? [Ynesfdaq?] y - no more change to split + no more changes to split 1 new orphan changesets $ hg glog -p @@ -1141,17 +1129,8 @@ @@ -0,0 +1,1 @@ +c -To create commits with the number of split - $ echo 0 > num - $ cat > editor.sh << '__EOF__' - > NUM=$(cat num) - > NUM=`expr "$NUM" + 1` - > echo "$NUM" > num - > echo "split$NUM" > "$1" - > __EOF__ - $ export HGEDITOR="\"sh\" \"editor.sh\"" - Splitting + $ echo 0 > $TESTTMP/split-counter $ hg split -r . << EOF > y > y @@ -1209,15 +1188,6 @@ $ hg init discard-after-many $ cd discard-after-many - $ echo 0 > num - $ cat > editor.sh << '__EOF__' - > NUM=$(cat num) - > NUM=`expr "$NUM" + 1` - > echo "$NUM" > num - > echo "split$NUM" > "$1" - > __EOF__ - $ export HGEDITOR="\"sh\" \"editor.sh\"" - $ echo a > a $ echo b > b $ echo c > c @@ -1226,6 +1196,7 @@ XXX: this shouldn't ask to re-examine changes in b and definitely shouldn't revert b + $ echo 0 > $TESTTMP/split-counter $ hg split << EOF > f > d
--- a/tests/test-stablerange-branchpoint.t Thu Aug 12 22:01:11 2021 +0200 +++ b/tests/test-stablerange-branchpoint.t Tue Oct 12 13:46:30 2021 +0300 @@ -5,12 +5,26 @@ $ cat << EOF >> $HGRCPATH > [extensions] - > hgext3rd.evolve = + > evolve = > [ui] > logtemplate = "{rev} {node|short} {desc} {tags}\n" + > EOF + +#testcases basic-branchpoint branchpoint + +#if basic-branchpoint + $ cat << EOF >> $HGRCPATH + > [defaults] + > debugstablerange = --method basic-branchpoint + > EOF +#endif + +#if branchpoint + $ cat << EOF >> $HGRCPATH > [defaults] > debugstablerange = --method branchpoint > EOF +#endif Simple linear test ================== @@ -26,15 +40,14 @@ bebd167eb94d 5 c8d03c1b5e94 6 f69452c5b1af 7 - $ hg debugstablerange --verify --verbose --subranges --rev 1 + $ hg debugstablerange --verify --verbose --subranges --rev 1 | tee 1.range 66f7d451a68b-0 (1, 2, 2) [complete] - 1ea73414a91b-0 (0, 1, 1), 66f7d451a68b-1 (1, 2, 1) 1ea73414a91b-0 (0, 1, 1) [leaf] - 66f7d451a68b-1 (1, 2, 1) [leaf] - - $ hg debugstablerange --verify --verbose --subranges --rev 1 > 1.range bigger subset reuse most of the previous one - $ hg debugstablerange --verify --verbose --subranges --rev 4 + $ hg debugstablerange --verify --verbose --subranges --rev 4 | tee 4.range bebd167eb94d-0 (4, 5, 5) [complete] - 2dc09a01254d-0 (3, 4, 4), bebd167eb94d-4 (4, 5, 1) 2dc09a01254d-0 (3, 4, 4) [complete] - 66f7d451a68b-0 (1, 2, 2), 2dc09a01254d-2 (3, 4, 2) 2dc09a01254d-2 (3, 4, 2) [complete] - 01241442b3c2-2 (2, 3, 1), 2dc09a01254d-3 (3, 4, 1) @@ -44,7 +57,6 @@ 2dc09a01254d-3 (3, 4, 1) [leaf] - 66f7d451a68b-1 (1, 2, 1) [leaf] - bebd167eb94d-4 (4, 5, 1) [leaf] - - $ hg debugstablerange --verify --verbose --subranges --rev 4 > 4.range $ diff -u 1.range 4.range --- 1.range * (glob) +++ 4.range * (glob) @@ -63,7 +75,7 @@ Using a range not ending on 2**N boundary we fall back on 2**N as much as possible - $ hg debugstablerange --verify --verbose --subranges --rev 5 + $ hg debugstablerange --verify --verbose --subranges --rev 5 | tee 5.range c8d03c1b5e94-0 (5, 6, 6) [complete] - 2dc09a01254d-0 (3, 4, 4), c8d03c1b5e94-4 (5, 6, 2) 2dc09a01254d-0 (3, 4, 4) [complete] - 66f7d451a68b-0 (1, 2, 2), 2dc09a01254d-2 (3, 4, 2) 2dc09a01254d-2 (3, 4, 2) [complete] - 01241442b3c2-2 (2, 3, 1), 2dc09a01254d-3 (3, 4, 1) @@ -75,7 +87,6 @@ 66f7d451a68b-1 (1, 2, 1) [leaf] - bebd167eb94d-4 (4, 5, 1) [leaf] - c8d03c1b5e94-5 (5, 6, 1) [leaf] - - $ hg debugstablerange --verify --verbose --subranges --rev 5 > 5.range $ diff -u 4.range 5.range --- 4.range * (glob) +++ 5.range * (glob) @@ -96,7 +107,7 @@ Even two unperfect range overlap a lot - $ hg debugstablerange --verify --verbose --subranges --rev tip + $ hg debugstablerange --verify --verbose --subranges --rev tip | tee tip.range f69452c5b1af-0 (6, 7, 7) [complete] - 2dc09a01254d-0 (3, 4, 4), f69452c5b1af-4 (6, 7, 3) 2dc09a01254d-0 (3, 4, 4) [complete] - 66f7d451a68b-0 (1, 2, 2), 2dc09a01254d-2 (3, 4, 2) f69452c5b1af-4 (6, 7, 3) [complete] - c8d03c1b5e94-4 (5, 6, 2), f69452c5b1af-6 (6, 7, 1) @@ -110,7 +121,6 @@ bebd167eb94d-4 (4, 5, 1) [leaf] - c8d03c1b5e94-5 (5, 6, 1) [leaf] - f69452c5b1af-6 (6, 7, 1) [leaf] - - $ hg debugstablerange --verify --verbose --subranges --rev tip > tip.range $ diff -u 5.range tip.range --- 5.range * (glob) +++ tip.range * (glob) @@ -182,12 +192,11 @@ (left branch) - $ hg debugstablerange --verify --verbose --subranges --rev 'left~2' + $ hg debugstablerange --verify --verbose --subranges --rev 'left~2' | tee left-2.range 66f7d451a68b-0 (1, 2, 2) [complete] - 1ea73414a91b-0 (0, 1, 1), 66f7d451a68b-1 (1, 2, 1) 1ea73414a91b-0 (0, 1, 1) [leaf] - 66f7d451a68b-1 (1, 2, 1) [leaf] - - $ hg debugstablerange --verify --verbose --subranges --rev 'left~2' > left-2.range - $ hg debugstablerange --verify --verbose --subranges --rev left + $ hg debugstablerange --verify --verbose --subranges --rev left | tee left.range 2dc09a01254d-0 (3, 4, 4) [complete] - 66f7d451a68b-0 (1, 2, 2), 2dc09a01254d-2 (3, 4, 2) 2dc09a01254d-2 (3, 4, 2) [complete] - 01241442b3c2-2 (2, 3, 1), 2dc09a01254d-3 (3, 4, 1) 66f7d451a68b-0 (1, 2, 2) [complete] - 1ea73414a91b-0 (0, 1, 1), 66f7d451a68b-1 (1, 2, 1) @@ -195,7 +204,6 @@ 1ea73414a91b-0 (0, 1, 1) [leaf] - 2dc09a01254d-3 (3, 4, 1) [leaf] - 66f7d451a68b-1 (1, 2, 1) [leaf] - - $ hg debugstablerange --verify --verbose --subranges --rev 'left' > left.range $ diff -u left-2.range left.range --- left-2.range * (glob) +++ left.range * (glob) @@ -211,12 +219,11 @@ (right branch) - $ hg debugstablerange --verify --verbose --subranges --rev right~2 + $ hg debugstablerange --verify --verbose --subranges --rev right~2 | tee right-2.range e7bd5218ca15-0 (4, 2, 2) [complete] - 1ea73414a91b-0 (0, 1, 1), e7bd5218ca15-1 (4, 2, 1) 1ea73414a91b-0 (0, 1, 1) [leaf] - e7bd5218ca15-1 (4, 2, 1) [leaf] - - $ hg debugstablerange --verify --verbose --subranges --rev 'right~2' > right-2.range - $ hg debugstablerange --verify --verbose --subranges --rev right + $ hg debugstablerange --verify --verbose --subranges --rev right | tee right.range a2f58e9c1e56-0 (6, 4, 4) [complete] - e7bd5218ca15-0 (4, 2, 2), a2f58e9c1e56-2 (6, 4, 2) a2f58e9c1e56-2 (6, 4, 2) [complete] - 3a367db1fabc-2 (5, 3, 1), a2f58e9c1e56-3 (6, 4, 1) e7bd5218ca15-0 (4, 2, 2) [complete] - 1ea73414a91b-0 (0, 1, 1), e7bd5218ca15-1 (4, 2, 1) @@ -224,7 +231,6 @@ 3a367db1fabc-2 (5, 3, 1) [leaf] - a2f58e9c1e56-3 (6, 4, 1) [leaf] - e7bd5218ca15-1 (4, 2, 1) [leaf] - - $ hg debugstablerange --verify --verbose --subranges --rev 'right' > right.range $ diff -u right-2.range right.range --- right-2.range * (glob) +++ right.range * (glob) @@ -240,7 +246,7 @@ The merge reuse as much of the slicing created for one of the branch - $ hg debugstablerange --verify --verbose --subranges --rev merge + $ hg debugstablerange --verify --verbose --subranges --rev merge | tee merge.range 5f18015f9110-0 (7, 8, 8) [complete] - 2dc09a01254d-0 (3, 4, 4), 5f18015f9110-4 (7, 8, 4) 2dc09a01254d-0 (3, 4, 4) [complete] - 66f7d451a68b-0 (1, 2, 2), 2dc09a01254d-2 (3, 4, 2) 5f18015f9110-4 (7, 8, 4) [complete] - 3a367db1fabc-1 (5, 3, 2), 5f18015f9110-6 (7, 8, 2) @@ -256,7 +262,6 @@ 66f7d451a68b-1 (1, 2, 1) [leaf] - a2f58e9c1e56-3 (6, 4, 1) [leaf] - e7bd5218ca15-1 (4, 2, 1) [leaf] - - $ hg debugstablerange --verify --verbose --subranges --rev 'merge' > merge.range $ diff -u left.range merge.range --- left.range * (glob) +++ merge.range * (glob) @@ -367,14 +372,13 @@ (left branch) - $ hg debugstablerange --verify --verbose --subranges --rev 'left~2' + $ hg debugstablerange --verify --verbose --subranges --rev 'left~2' | tee left-2.range 01241442b3c2-0 (2, 3, 3) [complete] - 66f7d451a68b-0 (1, 2, 2), 01241442b3c2-2 (2, 3, 1) 66f7d451a68b-0 (1, 2, 2) [complete] - 1ea73414a91b-0 (0, 1, 1), 66f7d451a68b-1 (1, 2, 1) 01241442b3c2-2 (2, 3, 1) [leaf] - 1ea73414a91b-0 (0, 1, 1) [leaf] - 66f7d451a68b-1 (1, 2, 1) [leaf] - - $ hg debugstablerange --verify --verbose --subranges --rev 'left~2' > left-2.range - $ hg debugstablerange --verify --verbose --subranges --rev left + $ hg debugstablerange --verify --verbose --subranges --rev left | tee left.range bebd167eb94d-0 (4, 5, 5) [complete] - 2dc09a01254d-0 (3, 4, 4), bebd167eb94d-4 (4, 5, 1) 2dc09a01254d-0 (3, 4, 4) [complete] - 66f7d451a68b-0 (1, 2, 2), 2dc09a01254d-2 (3, 4, 2) 2dc09a01254d-2 (3, 4, 2) [complete] - 01241442b3c2-2 (2, 3, 1), 2dc09a01254d-3 (3, 4, 1) @@ -384,7 +388,6 @@ 2dc09a01254d-3 (3, 4, 1) [leaf] - 66f7d451a68b-1 (1, 2, 1) [leaf] - bebd167eb94d-4 (4, 5, 1) [leaf] - - $ hg debugstablerange --verify --verbose --subranges --rev 'left' > left.range $ diff -u left-2.range left.range --- left-2.range * (glob) +++ left.range * (glob) @@ -403,7 +406,7 @@ (right branch) - $ hg debugstablerange --verify --verbose --subranges --rev right~2 + $ hg debugstablerange --verify --verbose --subranges --rev right~2 | tee right-2.range 42b07e8da27d-0 (7, 4, 4) [complete] - de561312eff4-0 (5, 2, 2), 42b07e8da27d-2 (7, 4, 2) 42b07e8da27d-2 (7, 4, 2) [complete] - b9bc20507e0b-2 (6, 3, 1), 42b07e8da27d-3 (7, 4, 1) de561312eff4-0 (5, 2, 2) [complete] - 1ea73414a91b-0 (0, 1, 1), de561312eff4-1 (5, 2, 1) @@ -411,8 +414,7 @@ 42b07e8da27d-3 (7, 4, 1) [leaf] - b9bc20507e0b-2 (6, 3, 1) [leaf] - de561312eff4-1 (5, 2, 1) [leaf] - - $ hg debugstablerange --verify --verbose --subranges --rev 'right~2' > right-2.range - $ hg debugstablerange --verify --verbose --subranges --rev right + $ hg debugstablerange --verify --verbose --subranges --rev right | tee right.range f4b7da68b467-0 (9, 6, 6) [complete] - 42b07e8da27d-0 (7, 4, 4), f4b7da68b467-4 (9, 6, 2) 42b07e8da27d-0 (7, 4, 4) [complete] - de561312eff4-0 (5, 2, 2), 42b07e8da27d-2 (7, 4, 2) 42b07e8da27d-2 (7, 4, 2) [complete] - b9bc20507e0b-2 (6, 3, 1), 42b07e8da27d-3 (7, 4, 1) @@ -424,7 +426,6 @@ b9bc20507e0b-2 (6, 3, 1) [leaf] - de561312eff4-1 (5, 2, 1) [leaf] - f4b7da68b467-5 (9, 6, 1) [leaf] - - $ hg debugstablerange --verify --verbose --subranges --rev 'right' > right.range $ diff -u right-2.range right.range --- right-2.range * (glob) +++ right.range * (glob) @@ -448,7 +449,7 @@ We are still able to reuse one of the branch however - $ hg debugstablerange --verify --verbose --subranges --rev merge + $ hg debugstablerange --verify --verbose --subranges --rev merge | tee merge.range 8aca7f8c9bd2-0 (10, 11, 11) [complete] - bebd167eb94d-0 (4, 5, 5), 42b07e8da27d-1 (7, 4, 3), 8aca7f8c9bd2-8 (10, 11, 3) bebd167eb94d-0 (4, 5, 5) [complete] - 2dc09a01254d-0 (3, 4, 4), bebd167eb94d-4 (4, 5, 1) 2dc09a01254d-0 (3, 4, 4) [complete] - 66f7d451a68b-0 (1, 2, 2), 2dc09a01254d-2 (3, 4, 2) @@ -469,7 +470,6 @@ bebd167eb94d-4 (4, 5, 1) [leaf] - de561312eff4-1 (5, 2, 1) [leaf] - f4b7da68b467-5 (9, 6, 1) [leaf] - - $ hg debugstablerange --verify --verbose --subranges --rev 'merge' > merge.range $ diff -u left.range merge.range --- left.range * (glob) +++ merge.range * (glob) @@ -526,7 +526,7 @@ Range above the merge, reuse subrange from the merge - $ hg debugstablerange --verify --verbose --subranges --rev tip + $ hg debugstablerange --verify --verbose --subranges --rev tip | tee tip.range e6b8d5b46647-0 (12, 13, 13) [complete] - bebd167eb94d-0 (4, 5, 5), 42b07e8da27d-1 (7, 4, 3), e6b8d5b46647-8 (12, 13, 5) bebd167eb94d-0 (4, 5, 5) [complete] - 2dc09a01254d-0 (3, 4, 4), bebd167eb94d-4 (4, 5, 1) e6b8d5b46647-8 (12, 13, 5) [complete] - 485383494a89-8 (11, 12, 4), e6b8d5b46647-12 (12, 13, 1) @@ -551,7 +551,6 @@ de561312eff4-1 (5, 2, 1) [leaf] - e6b8d5b46647-12 (12, 13, 1) [leaf] - f4b7da68b467-5 (9, 6, 1) [leaf] - - $ hg debugstablerange --verify --verbose --subranges --rev 'tip' > tip.range $ diff -u merge.range tip.range --- merge.range * (glob) +++ tip.range * (glob)
--- a/tests/test-stablerange.t Thu Aug 12 22:01:11 2021 +0200 +++ b/tests/test-stablerange.t Tue Oct 12 13:46:30 2021 +0300 @@ -5,12 +5,33 @@ $ cat << EOF >> $HGRCPATH > [extensions] - > hgext3rd.evolve = + > evolve = > [ui] > logtemplate = "{rev} {node|short} {desc} {tags}\n" + > EOF + +#testcases default basic-mergepoint mergepoint + +#if default + $ cat << EOF >> $HGRCPATH > [defaults] > debugstablerange = --method default > EOF +#endif + +#if basic-mergepoint + $ cat << EOF >> $HGRCPATH + > [defaults] + > debugstablerange = --method basic-mergepoint + > EOF +#endif + +#if mergepoint + $ cat << EOF >> $HGRCPATH + > [defaults] + > debugstablerange = --method mergepoint + > EOF +#endif Simple linear test ================== @@ -26,15 +47,14 @@ bebd167eb94d 5 c8d03c1b5e94 6 f69452c5b1af 7 - $ hg debugstablerange --verify --verbose --subranges --rev 1 + $ hg debugstablerange --verify --verbose --subranges --rev 1 | tee 1.range 66f7d451a68b-0 (1, 2, 2) [complete] - 1ea73414a91b-0 (0, 1, 1), 66f7d451a68b-1 (1, 2, 1) 1ea73414a91b-0 (0, 1, 1) [leaf] - 66f7d451a68b-1 (1, 2, 1) [leaf] - - $ hg debugstablerange --verify --verbose --subranges --rev 1 > 1.range bigger subset reuse most of the previous one - $ hg debugstablerange --verify --verbose --subranges --rev 4 + $ hg debugstablerange --verify --verbose --subranges --rev 4 | tee 4.range bebd167eb94d-0 (4, 5, 5) [complete] - 2dc09a01254d-0 (3, 4, 4), bebd167eb94d-4 (4, 5, 1) 2dc09a01254d-0 (3, 4, 4) [complete] - 66f7d451a68b-0 (1, 2, 2), 2dc09a01254d-2 (3, 4, 2) 2dc09a01254d-2 (3, 4, 2) [complete] - 01241442b3c2-2 (2, 3, 1), 2dc09a01254d-3 (3, 4, 1) @@ -44,7 +64,6 @@ 2dc09a01254d-3 (3, 4, 1) [leaf] - 66f7d451a68b-1 (1, 2, 1) [leaf] - bebd167eb94d-4 (4, 5, 1) [leaf] - - $ hg debugstablerange --verify --verbose --subranges --rev 4 > 4.range $ diff -u 1.range 4.range --- 1.range * (glob) +++ 4.range * (glob) @@ -63,7 +82,7 @@ Using a range not ending on 2**N boundary we fall back on 2**N as much as possible - $ hg debugstablerange --verify --verbose --subranges --rev 5 + $ hg debugstablerange --verify --verbose --subranges --rev 5 | tee 5.range c8d03c1b5e94-0 (5, 6, 6) [complete] - 2dc09a01254d-0 (3, 4, 4), c8d03c1b5e94-4 (5, 6, 2) 2dc09a01254d-0 (3, 4, 4) [complete] - 66f7d451a68b-0 (1, 2, 2), 2dc09a01254d-2 (3, 4, 2) 2dc09a01254d-2 (3, 4, 2) [complete] - 01241442b3c2-2 (2, 3, 1), 2dc09a01254d-3 (3, 4, 1) @@ -75,7 +94,6 @@ 66f7d451a68b-1 (1, 2, 1) [leaf] - bebd167eb94d-4 (4, 5, 1) [leaf] - c8d03c1b5e94-5 (5, 6, 1) [leaf] - - $ hg debugstablerange --verify --verbose --subranges --rev 5 > 5.range $ diff -u 4.range 5.range --- 4.range * (glob) +++ 5.range * (glob) @@ -96,7 +114,7 @@ Even two unperfect range overlap a lot - $ hg debugstablerange --verify --verbose --subranges --rev tip + $ hg debugstablerange --verify --verbose --subranges --rev tip | tee tip.range f69452c5b1af-0 (6, 7, 7) [complete] - 2dc09a01254d-0 (3, 4, 4), f69452c5b1af-4 (6, 7, 3) 2dc09a01254d-0 (3, 4, 4) [complete] - 66f7d451a68b-0 (1, 2, 2), 2dc09a01254d-2 (3, 4, 2) f69452c5b1af-4 (6, 7, 3) [complete] - c8d03c1b5e94-4 (5, 6, 2), f69452c5b1af-6 (6, 7, 1) @@ -110,7 +128,6 @@ bebd167eb94d-4 (4, 5, 1) [leaf] - c8d03c1b5e94-5 (5, 6, 1) [leaf] - f69452c5b1af-6 (6, 7, 1) [leaf] - - $ hg debugstablerange --verify --verbose --subranges --rev tip > tip.range $ diff -u 5.range tip.range --- 5.range * (glob) +++ tip.range * (glob) @@ -182,12 +199,11 @@ (left branch) - $ hg debugstablerange --verify --verbose --subranges --rev 'left~2' + $ hg debugstablerange --verify --verbose --subranges --rev 'left~2' | tee left-2.range 66f7d451a68b-0 (1, 2, 2) [complete] - 1ea73414a91b-0 (0, 1, 1), 66f7d451a68b-1 (1, 2, 1) 1ea73414a91b-0 (0, 1, 1) [leaf] - 66f7d451a68b-1 (1, 2, 1) [leaf] - - $ hg debugstablerange --verify --verbose --subranges --rev 'left~2' > left-2.range - $ hg debugstablerange --verify --verbose --subranges --rev left + $ hg debugstablerange --verify --verbose --subranges --rev left | tee left.range 2dc09a01254d-0 (3, 4, 4) [complete] - 66f7d451a68b-0 (1, 2, 2), 2dc09a01254d-2 (3, 4, 2) 2dc09a01254d-2 (3, 4, 2) [complete] - 01241442b3c2-2 (2, 3, 1), 2dc09a01254d-3 (3, 4, 1) 66f7d451a68b-0 (1, 2, 2) [complete] - 1ea73414a91b-0 (0, 1, 1), 66f7d451a68b-1 (1, 2, 1) @@ -195,7 +211,6 @@ 1ea73414a91b-0 (0, 1, 1) [leaf] - 2dc09a01254d-3 (3, 4, 1) [leaf] - 66f7d451a68b-1 (1, 2, 1) [leaf] - - $ hg debugstablerange --verify --verbose --subranges --rev 'left' > left.range $ diff -u left-2.range left.range --- left-2.range * (glob) +++ left.range * (glob) @@ -211,12 +226,11 @@ (right branch) - $ hg debugstablerange --verify --verbose --subranges --rev right~2 + $ hg debugstablerange --verify --verbose --subranges --rev right~2 | tee right-2.range e7bd5218ca15-0 (4, 2, 2) [complete] - 1ea73414a91b-0 (0, 1, 1), e7bd5218ca15-1 (4, 2, 1) 1ea73414a91b-0 (0, 1, 1) [leaf] - e7bd5218ca15-1 (4, 2, 1) [leaf] - - $ hg debugstablerange --verify --verbose --subranges --rev 'right~2' > right-2.range - $ hg debugstablerange --verify --verbose --subranges --rev right + $ hg debugstablerange --verify --verbose --subranges --rev right | tee right.range a2f58e9c1e56-0 (6, 4, 4) [complete] - e7bd5218ca15-0 (4, 2, 2), a2f58e9c1e56-2 (6, 4, 2) a2f58e9c1e56-2 (6, 4, 2) [complete] - 3a367db1fabc-2 (5, 3, 1), a2f58e9c1e56-3 (6, 4, 1) e7bd5218ca15-0 (4, 2, 2) [complete] - 1ea73414a91b-0 (0, 1, 1), e7bd5218ca15-1 (4, 2, 1) @@ -224,7 +238,6 @@ 3a367db1fabc-2 (5, 3, 1) [leaf] - a2f58e9c1e56-3 (6, 4, 1) [leaf] - e7bd5218ca15-1 (4, 2, 1) [leaf] - - $ hg debugstablerange --verify --verbose --subranges --rev 'right' > right.range $ diff -u right-2.range right.range --- right-2.range * (glob) +++ right.range * (glob) @@ -240,7 +253,7 @@ The merge reuse as much of the slicing created for one of the branch - $ hg debugstablerange --verify --verbose --subranges --rev merge + $ hg debugstablerange --verify --verbose --subranges --rev merge | tee merge.range 5f18015f9110-0 (7, 8, 8) [complete] - 2dc09a01254d-0 (3, 4, 4), 5f18015f9110-4 (7, 8, 4) 2dc09a01254d-0 (3, 4, 4) [complete] - 66f7d451a68b-0 (1, 2, 2), 2dc09a01254d-2 (3, 4, 2) 5f18015f9110-4 (7, 8, 4) [complete] - 3a367db1fabc-1 (5, 3, 2), 5f18015f9110-6 (7, 8, 2) @@ -256,7 +269,6 @@ 66f7d451a68b-1 (1, 2, 1) [leaf] - a2f58e9c1e56-3 (6, 4, 1) [leaf] - e7bd5218ca15-1 (4, 2, 1) [leaf] - - $ hg debugstablerange --verify --verbose --subranges --rev 'merge' > merge.range $ diff -u left.range merge.range --- left.range * (glob) +++ merge.range * (glob) @@ -367,14 +379,13 @@ (left branch) - $ hg debugstablerange --verify --verbose --subranges --rev 'left~2' + $ hg debugstablerange --verify --verbose --subranges --rev 'left~2' | tee left-2.range 01241442b3c2-0 (2, 3, 3) [complete] - 66f7d451a68b-0 (1, 2, 2), 01241442b3c2-2 (2, 3, 1) 66f7d451a68b-0 (1, 2, 2) [complete] - 1ea73414a91b-0 (0, 1, 1), 66f7d451a68b-1 (1, 2, 1) 01241442b3c2-2 (2, 3, 1) [leaf] - 1ea73414a91b-0 (0, 1, 1) [leaf] - 66f7d451a68b-1 (1, 2, 1) [leaf] - - $ hg debugstablerange --verify --verbose --subranges --rev 'left~2' > left-2.range - $ hg debugstablerange --verify --verbose --subranges --rev left + $ hg debugstablerange --verify --verbose --subranges --rev left | tee left.range bebd167eb94d-0 (4, 5, 5) [complete] - 2dc09a01254d-0 (3, 4, 4), bebd167eb94d-4 (4, 5, 1) 2dc09a01254d-0 (3, 4, 4) [complete] - 66f7d451a68b-0 (1, 2, 2), 2dc09a01254d-2 (3, 4, 2) 2dc09a01254d-2 (3, 4, 2) [complete] - 01241442b3c2-2 (2, 3, 1), 2dc09a01254d-3 (3, 4, 1) @@ -384,7 +395,6 @@ 2dc09a01254d-3 (3, 4, 1) [leaf] - 66f7d451a68b-1 (1, 2, 1) [leaf] - bebd167eb94d-4 (4, 5, 1) [leaf] - - $ hg debugstablerange --verify --verbose --subranges --rev 'left' > left.range $ diff -u left-2.range left.range --- left-2.range * (glob) +++ left.range * (glob) @@ -403,7 +413,7 @@ (right branch) - $ hg debugstablerange --verify --verbose --subranges --rev right~2 + $ hg debugstablerange --verify --verbose --subranges --rev right~2 | tee right-2.range 42b07e8da27d-0 (7, 4, 4) [complete] - de561312eff4-0 (5, 2, 2), 42b07e8da27d-2 (7, 4, 2) 42b07e8da27d-2 (7, 4, 2) [complete] - b9bc20507e0b-2 (6, 3, 1), 42b07e8da27d-3 (7, 4, 1) de561312eff4-0 (5, 2, 2) [complete] - 1ea73414a91b-0 (0, 1, 1), de561312eff4-1 (5, 2, 1) @@ -411,8 +421,7 @@ 42b07e8da27d-3 (7, 4, 1) [leaf] - b9bc20507e0b-2 (6, 3, 1) [leaf] - de561312eff4-1 (5, 2, 1) [leaf] - - $ hg debugstablerange --verify --verbose --subranges --rev 'right~2' > right-2.range - $ hg debugstablerange --verify --verbose --subranges --rev right + $ hg debugstablerange --verify --verbose --subranges --rev right | tee right.range f4b7da68b467-0 (9, 6, 6) [complete] - 42b07e8da27d-0 (7, 4, 4), f4b7da68b467-4 (9, 6, 2) 42b07e8da27d-0 (7, 4, 4) [complete] - de561312eff4-0 (5, 2, 2), 42b07e8da27d-2 (7, 4, 2) 42b07e8da27d-2 (7, 4, 2) [complete] - b9bc20507e0b-2 (6, 3, 1), 42b07e8da27d-3 (7, 4, 1) @@ -424,7 +433,6 @@ b9bc20507e0b-2 (6, 3, 1) [leaf] - de561312eff4-1 (5, 2, 1) [leaf] - f4b7da68b467-5 (9, 6, 1) [leaf] - - $ hg debugstablerange --verify --verbose --subranges --rev 'right' > right.range $ diff -u right-2.range right.range --- right-2.range * (glob) +++ right.range * (glob) @@ -448,7 +456,7 @@ We are still able to reuse one of the branch however - $ hg debugstablerange --verify --verbose --subranges --rev merge + $ hg debugstablerange --verify --verbose --subranges --rev merge | tee merge.range 8aca7f8c9bd2-0 (10, 11, 11) [complete] - f4b7da68b467-0 (9, 6, 6), 01241442b3c2-1 (2, 3, 2), 8aca7f8c9bd2-8 (10, 11, 3) f4b7da68b467-0 (9, 6, 6) [complete] - 42b07e8da27d-0 (7, 4, 4), f4b7da68b467-4 (9, 6, 2) 42b07e8da27d-0 (7, 4, 4) [complete] - de561312eff4-0 (5, 2, 2), 42b07e8da27d-2 (7, 4, 2) @@ -469,7 +477,6 @@ bebd167eb94d-4 (4, 5, 1) [leaf] - de561312eff4-1 (5, 2, 1) [leaf] - f4b7da68b467-5 (9, 6, 1) [leaf] - - $ hg debugstablerange --verify --verbose --subranges --rev 'merge' > merge.range $ diff -u left.range merge.range --- left.range * (glob) +++ merge.range * (glob) @@ -527,7 +534,7 @@ Range above the merge, reuse subrange from the merge - $ hg debugstablerange --verify --verbose --subranges --rev tip + $ hg debugstablerange --verify --verbose --subranges --rev tip | tee tip.range e6b8d5b46647-0 (12, 13, 13) [complete] - f4b7da68b467-0 (9, 6, 6), 01241442b3c2-1 (2, 3, 2), e6b8d5b46647-8 (12, 13, 5) f4b7da68b467-0 (9, 6, 6) [complete] - 42b07e8da27d-0 (7, 4, 4), f4b7da68b467-4 (9, 6, 2) e6b8d5b46647-8 (12, 13, 5) [complete] - 485383494a89-8 (11, 12, 4), e6b8d5b46647-12 (12, 13, 1) @@ -552,7 +559,6 @@ de561312eff4-1 (5, 2, 1) [leaf] - e6b8d5b46647-12 (12, 13, 1) [leaf] - f4b7da68b467-5 (9, 6, 1) [leaf] - - $ hg debugstablerange --verify --verbose --subranges --rev 'tip' > tip.range $ diff -u merge.range tip.range --- merge.range * (glob) +++ tip.range * (glob)
--- a/tests/test-stablesort-branchpoint-criss-cross.t Thu Aug 12 22:01:11 2021 +0200 +++ b/tests/test-stablesort-branchpoint-criss-cross.t Tue Oct 12 13:46:30 2021 +0300 @@ -5,7 +5,7 @@ $ cat << EOF >> $HGRCPATH > [extensions] - > hgext3rd.evolve = + > evolve = > [ui] > logtemplate = "{rev} {node|short} {desc} {tags}\n" > [alias]
--- a/tests/test-stablesort-branchpoint.t Thu Aug 12 22:01:11 2021 +0200 +++ b/tests/test-stablesort-branchpoint.t Tue Oct 12 13:46:30 2021 +0300 @@ -5,15 +5,13 @@ $ cat << EOF >> $HGRCPATH > [extensions] - > hgext3rd.evolve = + > evolve = > [ui] > logtemplate = "{rev} {node|short} {desc} {tags}\n" > [alias] > showsort = debugstablesort --template="{node|short}\n" --method branchpoint > EOF - - $ checktopo () { > seen='null'; > for node in `hg showsort --rev "$1"`; do
--- a/tests/test-stablesort-criss-cross.t Thu Aug 12 22:01:11 2021 +0200 +++ b/tests/test-stablesort-criss-cross.t Tue Oct 12 13:46:30 2021 +0300 @@ -5,7 +5,7 @@ $ cat << EOF >> $HGRCPATH > [extensions] - > hgext3rd.evolve = + > evolve = > [ui] > logtemplate = "{rev} {node|short} {desc} {tags}\n" > [alias]
--- a/tests/test-stablesort.t Thu Aug 12 22:01:11 2021 +0200 +++ b/tests/test-stablesort.t Tue Oct 12 13:46:30 2021 +0300 @@ -5,7 +5,7 @@ $ cat << EOF >> $HGRCPATH > [extensions] - > hgext3rd.evolve = + > evolve = > [ui] > logtemplate = "{rev} {node|short} {desc} {tags}\n" > [alias] @@ -13,8 +13,6 @@ > showsorthead = debugstablesort --template="{node|short}\n" --method headondisk > EOF - - $ checktopo () { > seen='null'; > for node in `hg showsort --rev "$1"`; do
--- a/tests/test-topic-change.t Thu Aug 12 22:01:11 2021 +0200 +++ b/tests/test-topic-change.t Tue Oct 12 13:46:30 2021 +0300 @@ -4,8 +4,6 @@ $ . "$TESTDIR/testlib/topic_setup.sh" $ cat <<EOF >> $HGRCPATH > [experimental] - > # disable the new graph style until we drop 3.7 support - > graphstyle.missing = | > evolution=createmarkers, allowunstable > [phases] > publish=false @@ -143,7 +141,7 @@ $ hg glog -r . @ 20:c2d6b7df5dcf {foobar} | Added h () - | + ~ Changing topic in between the stack @@ -228,7 +226,7 @@ $ hg glog -r . @ 28:61470c956807 {wat} | Added h () - | + ~ Clear the current topic and amending @@ -237,7 +235,7 @@ $ hg glog -r . @ 29:b584fa49f42e {} | Added h () - | + ~ When the changeset does not has a topic but we have an active topic @@ -249,7 +247,7 @@ $ hg glog -r . @ 30:a24c31c35013 {watwat} | Added h () - | + ~ Testing changing topics on public changeset ------------------------------------------- @@ -304,8 +302,10 @@ active topic 'watwat' is now empty cleared topic on 1 changesets + $ hg log -r . -T '{rev}: {join(extras, " ")}\n' + 31: _rewrite_noise=[0-9a-f]+ amend_source=[0-9a-f]+ branch=default rebase_source=[0-9a-f]+ (re) $ hg glog - @ 31:c48d6d71b2d9 {} + @ 31:fb090538b75b {} | Added h (book) | o 26:7c76c271395f {bar} @@ -336,8 +336,10 @@ $ hg topic -r . movebook switching to topic movebook changed topic on 1 changesets to "movebook" + $ hg log -r . -T '{rev}: {join(extras, " ")}\n' + 32: _rewrite_noise=[0-9a-f]+ amend_source=[0-9a-f]+ branch=default rebase_source=[0-9a-f]+ topic=movebook (re) $ hg glog - @ 32:1b83d11095b9 {movebook} + @ 32:3955a85a6349 {movebook} | Added h (book bookboo) | o 26:7c76c271395f {bar} @@ -382,7 +384,7 @@ @ 33:894983f69e69 {watwat} | Added g () | - | * 32:1b83d11095b9 {movebook} + | * 32:3955a85a6349 {movebook} | | Added h (book bookboo) | | | x 26:7c76c271395f {bar}
--- a/tests/test-topic-debugcb.t Thu Aug 12 22:01:11 2021 +0200 +++ b/tests/test-topic-debugcb.t Tue Oct 12 13:46:30 2021 +0300 @@ -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
--- a/tests/test-topic-flow-publish-bare.t Thu Aug 12 22:01:11 2021 +0200 +++ b/tests/test-topic-flow-publish-bare.t Tue Oct 12 13:46:30 2021 +0300 @@ -367,8 +367,7 @@ Trying to push changeset without topic (would publish them) - $ mkcommit c_aM0 - $ hg phase --secret --force + $ mkcommit c_aM0 --secret $ hg push --config experimental.auto-publish=abort -r . pushing to $TESTTMP/bare-branch-server searching for changes
--- a/tests/test-topic-flow-publish-flag.t Thu Aug 12 22:01:11 2021 +0200 +++ b/tests/test-topic-flow-publish-flag.t Tue Oct 12 13:46:30 2021 +0300 @@ -5,6 +5,11 @@ $ . "$TESTDIR/testlib/topic_setup.sh" $ . "$TESTDIR/testlib/common.sh" + $ cat << EOF >> "$HGRCPATH" + > [alias] + > tgl = log --rev 'sort(\$1, "topo")' -GT '{rev}:{node|short} {desc} {phase} {branch} {topics}' + > EOF + testing hg push --publish flag ============================== @@ -35,7 +40,7 @@ adding manifests adding file changes added 1 changesets with 1 changes to 1 files - $ hg log --rev 'sort(all(), "topo")' -GT '{rev}:{node|short} {desc} {phase} {branch} {topics}' + $ hg tgl 'all()' @ 2:286d02a6e2a2 c_dB0 public default | o 1:134bc3852ad2 c_dA0 public default @@ -55,7 +60,7 @@ adding manifests adding file changes added 2 changesets with 2 changes to 2 files - $ hg log --rev 'sort(all(), "topo")' -GT '{rev}:{node|short} {desc} {phase} {branch} {topics}' + $ hg tgl 'all()' @ 4:c63e7dd93a91 c_dD0 public default | o 3:7d56a56d2547 c_dC0 public default @@ -84,7 +89,7 @@ adding manifests adding file changes added 2 changesets with 2 changes to 2 files (+1 heads) - $ hg log --rev 'sort(all(), "topo")' -GT '{rev}:{node|short} {desc} {phase} {branch} {topics}' + $ hg tgl 'all()' @ 6:45b23c834b6a c_oF0 public other | | o 5:5576ae39eaee c_dE0 public default @@ -110,7 +115,7 @@ adding manifests adding file changes added 1 changesets with 1 changes to 1 files - $ hg log --rev 'sort(all(), "topo")' -GT '{rev}:{node|short} {desc} {phase} {branch} {topics}' + $ hg tgl 'all()' @ 7:d293f74a1233 c_oG0 draft other | o 6:45b23c834b6a c_oF0 public other @@ -132,7 +137,7 @@ searching for changes no changes found [1] - $ hg log --rev 'sort(all(), "topo")' -GT '{rev}:{node|short} {desc} {phase} {branch} {topics}' + $ hg tgl 'all()' @ 7:d293f74a1233 c_oG0 public other | o 6:45b23c834b6a c_oF0 public other @@ -164,7 +169,7 @@ adding manifests adding file changes added 1 changesets with 1 changes to 1 files - $ hg log --rev 'sort(all(), "topo")' -GT '{rev}:{node|short} {desc} {phase} {branch} {topics}' + $ hg tgl 'all()' @ 9:fbf2be276221 c_dI0 public default | o 5:5576ae39eaee c_dE0 public default @@ -197,7 +202,7 @@ adding manifests adding file changes added 2 changesets with 2 changes to 2 files - $ hg log --rev 'sort(all(), "topo")' -GT '{rev}:{node|short} {desc} {phase} {branch} {topics}' + $ hg tgl 'all()' @ 10:ac4cf59f2aac c_dJ0 draft default | o 9:fbf2be276221 c_dI0 public default @@ -225,7 +230,7 @@ searching for changes no changes found [1] - $ hg log --rev 'sort(all(), "topo")' -GT '{rev}:{node|short} {desc} {phase} {branch} {topics}' + $ hg tgl 'all()' @ 10:ac4cf59f2aac c_dJ0 public default | o 9:fbf2be276221 c_dI0 public default @@ -257,7 +262,7 @@ searching for changes no changes found [1] - $ hg log --rev 'sort(all(), "topo")' -GT '{rev}:{node|short} {desc} {phase} {branch} {topics}' + $ hg tgl 'all()' @ 10:ac4cf59f2aac c_dJ0 public default | o 9:fbf2be276221 c_dI0 public default @@ -301,7 +306,7 @@ added 1 changesets with 1 changes to 1 files active topic 'topic_A' is now empty (use 'hg topic --clear' to clear it if needed) - $ hg log --rev 'sort(all(), "topo")' -GT '{rev}:{node|short} {desc} {phase} {branch} {topics}' + $ hg tgl 'all()' @ 11:d06fc4f891e8 c_dK0 public default | o 10:ac4cf59f2aac c_dJ0 public default @@ -351,7 +356,7 @@ adding manifests adding file changes added 1 changesets with 1 changes to 1 files (+1 heads) - $ hg log --rev 'sort(all(), "topo")' -GT '{rev}:{node|short} {desc} {phase} {branch} {topics}' + $ hg tgl 'all()' @ 13:0d144c8b6c8f c_dM0 public default | | o 12:3c73f6cabf07 c_dL0 draft default topic_A @@ -397,7 +402,7 @@ abort: push creates new remote head 4dcd0be9db96! (merge or see 'hg help push' for details about pushing new heads) [255] - $ hg log --rev 'sort(all(), "topo")' -GT '{rev}:{node|short} {desc} {phase} {branch} {topics}' + $ hg tgl 'all()' @ 14:4dcd0be9db96 c_dN0 draft default topic_B | | o 13:0d144c8b6c8f c_dM0 public default
--- a/tests/test-topic-flow-reject-untopiced.t Thu Aug 12 22:01:11 2021 +0200 +++ b/tests/test-topic-flow-reject-untopiced.t Tue Oct 12 13:46:30 2021 +0300 @@ -17,7 +17,7 @@ $ hg topic server marked working directory as topic: server $ for ch in a b c; do echo foo > $ch; hg ci -Aqm "Added "$ch; done - $ hg ph -p 0 + $ hg phase -p 0 $ hg log -G -T "{rev}:{node|short}\n{desc} {topics}" @ 2:a7b96f87a214
--- a/tests/test-topic-fold.t Thu Aug 12 22:01:11 2021 +0200 +++ b/tests/test-topic-fold.t Tue Oct 12 13:46:30 2021 +0300 @@ -1,18 +1,15 @@ test of the fold command ------------------------ + $ . $TESTDIR/testlib/common.sh $ cat >> $HGRCPATH <<EOF > [ui] > interactive = true > [extensions] + > evolve = + > topic = > EOF - $ echo "topic=$(echo $(dirname $TESTDIR))/hgext3rd/topic/" >> $HGRCPATH - $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH - $ mkcommit() { - > echo "$1" > "$1" - > hg add "$1" - > hg ci -m "add $1" $2 $3 - > } + $ logtopic() { > hg log -G -T "{rev}:{node}\ntopics: {topics}" > } @@ -30,11 +27,11 @@ (see 'hg help topics' for more information) $ mkcommit feature2 $ logtopic - @ 2:d76a6166b18c835be9a487c5e21c7d260f0a1676 + @ 2:6e0fb07fa151928b633485a01b6d815b27f5a26d | topics: myfeature - o 1:39e7a938055e87615edf675c24a10997ff05bb06 + o 1:95b29fc10be4e6343c8d344ad4354d6ff4098df1 | topics: myfeature - o 0:3e7df3b3b17c6deb4a1c70e790782fdf17af96a7 + o 0:ea207398892eb49e06441f10dda2a731f0450f20 topics: $ hg fold --exact -r "(tip~1)::" -m "folded" 2 changesets folded @@ -43,14 +40,14 @@ ### topic: myfeature ### target: default (branch) s1@ folded (current) - s0^ add ROOT (base) + s0^ ROOT (base) $ logtopic - @ 3:4fd43e5bdc443dc8489edffac19bd8f93ccf1a5c + @ 3:ba602426356f35854a83b02183d999749142443c | topics: myfeature - o 0:3e7df3b3b17c6deb4a1c70e790782fdf17af96a7 + o 0:ea207398892eb49e06441f10dda2a731f0450f20 topics: $ hg summary - parent: 3:4fd43e5bdc44 tip + parent: 3:ba602426356f tip folded branch: default:myfeature commit: (clean) @@ -73,13 +70,13 @@ active topic 'myotherfeature' grew its first changeset (see 'hg help topics' for more information) $ logtopic - @ 5:5ded4d6d578c37f339b0716de2e46e12ece7cbde + @ 5:85e76d22bde1cb5ce44b00fc91a88cb805c93b1b | topics: myotherfeature - o 4:bdf6950b9b5b7c6b377c8132667c73ec86d5734f + o 4:6508e0bfb6a188bb94d77c107f4e969291010b42 | topics: - o 3:4fd43e5bdc443dc8489edffac19bd8f93ccf1a5c + o 3:ba602426356f35854a83b02183d999749142443c | topics: myfeature - o 0:3e7df3b3b17c6deb4a1c70e790782fdf17af96a7 + o 0:ea207398892eb49e06441f10dda2a731f0450f20 topics: $ hg fold --exact -r "(tip~1)::" -m "folded 2" active topic 'myotherfeature' is now empty @@ -87,14 +84,14 @@ clearing empty topic "myotherfeature" 0 files updated, 0 files merged, 0 files removed, 0 files unresolved $ logtopic - @ 6:03da8f7238e9a4d708d6b8af402c91c68f271477 + @ 6:9fa327ea84f90ba000b75b90446680c993972df0 | topics: - o 3:4fd43e5bdc443dc8489edffac19bd8f93ccf1a5c + o 3:ba602426356f35854a83b02183d999749142443c | topics: myfeature - o 0:3e7df3b3b17c6deb4a1c70e790782fdf17af96a7 + o 0:ea207398892eb49e06441f10dda2a731f0450f20 topics: $ hg summary - parent: 6:03da8f7238e9 tip + parent: 6:9fa327ea84f9 tip folded 2 branch: default commit: (clean)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-topic-issue6500.t Tue Oct 12 13:46:30 2021 +0300 @@ -0,0 +1,44 @@ +KeyError: b'topic' on history-rewriting commands (issue6500) +https://bz.mercurial-scm.org/show_bug.cgi?id=6500 + + $ . $TESTDIR/testlib/common.sh + +Making sure we're not caching .topic() results for memctx or anything else that's not stored on-disk + + $ hg init issue6500-caching-memctx + $ cd issue6500-caching-memctx + + $ cat >> $HGRCPATH << EOF + > [extensions] + > evolve = + > topic = + > EOF + +for this test we need 2 changesets with amend_source, one with topic and one without + + $ hg topics foo + marked working directory as topic: foo + $ echo apple > a + $ hg ci -qAm 'apple' + $ echo apricot > a + $ hg ci --amend -m 'apricot' + +not using `hg topics --clear -r .` here because that would remove amend_source, see _changetopics() + + $ hg topics --clear + $ hg ci --amend -m 'no foo apricot' + + $ hg log --hidden -r 1+2 -T '{rev}: {join(extras, " ")}\n' + 1: amend_source=* branch=default topic=foo (glob) + 2: amend_source=* branch=default (glob) + +creating and handling 2 memctx instances (based on 1 and then 2) should work + + $ hg touch --hidden -r 1+2 --duplicate + switching to topic foo + +make sure extras stay the same + + $ hg log --hidden -r 3+4 -T '{rev}: {join(extras, " ")}\n' + 3: __touch-noise__=* amend_source=* branch=default topic=foo (glob) + 4: __touch-noise__=* amend_source=* branch=default (glob)
--- a/tests/test-topic-merge.t Thu Aug 12 22:01:11 2021 +0200 +++ b/tests/test-topic-merge.t Tue Oct 12 13:46:30 2021 +0300 @@ -82,7 +82,7 @@ Test that the merge is rejected if set to reject ================================================ -Actually, this also work with any unvalid value, but: +Actually, this also work with any invalid value, but: - the default value might change in the future, - this make sure we read the config right.
--- a/tests/test-topic-stack-data.t Thu Aug 12 22:01:11 2021 +0200 +++ b/tests/test-topic-stack-data.t Tue Oct 12 13:46:30 2021 +0300 @@ -11,13 +11,10 @@ > EOF $ cat <<EOF >> $HGRCPATH > [experimental] - > # disable the new graph style until we drop 3.7 support - > graphstyle.missing = | > # turn evolution on > evolution=all > EOF - $ mkcommit() { > echo "$1" > "$1" > hg add "$1"
--- a/tests/test-topic-stack.t Thu Aug 12 22:01:11 2021 +0200 +++ b/tests/test-topic-stack.t Tue Oct 12 13:46:30 2021 +0300 @@ -606,6 +606,9 @@ | o 0 default {} public c_a + $ hg log -r 'desc("c_D")' -T '{rev}: {join(extras, " ")}\n' + 17: _rewrite_noise=[0-9a-f]+ amend_source=[0-9a-f]+ branch=default topic=foobar (re) + XXX: The following should show single heads XXX: The behind count is weird, because the topic are interleaved. @@ -620,17 +623,17 @@ $ hg stack -v ### topic: foobar ### target: default (branch), 3 behind - s2(ea0f882ce093)@ c_e (current) + s2(5985c9f0df93)@ c_e (current) ^ c_h - s1(d2f548af67ab): c_D + s1(cab9d344b7b5): c_D s0(8522f9e3fee9)^ c_c (base) $ hg stack --debug ### topic: foobar ### target: default (branch), 3 behind - s2(ea0f882ce093a2ad63db49083c5cb98a24a9470e)@ c_e (current) + s2(5985c9f0df9331630a4f003f01d320303b8dcae1)@ c_e (current) ^ c_h - s1(d2f548af67ab55b08452a3e00a539319490fcd5b): c_D + s1(cab9d344b7b582ae7c125f0eae77c18c771c508d): c_D s0(8522f9e3fee92d4ec4e688ac3fbd2ee0f8fd5036)^ c_c (base) $ hg stack foo
--- a/tests/test-topic.t Thu Aug 12 22:01:11 2021 +0200 +++ b/tests/test-topic.t Tue Oct 12 13:46:30 2021 +0300 @@ -6,11 +6,6 @@ > [phases] > publish=false > EOF - $ cat <<EOF >> $HGRCPATH - > [experimental] - > # disable the new graph style until we drop 3.7 support - > graphstyle.missing = | - > EOF $ hg help -e topic topic extension - support for topic branches @@ -522,9 +517,9 @@ | o changeset: 4:fb147b0b417c | user: test - | date: Thu Jan 01 00:00:00 1970 +0000 - | summary: start on narf - | + ~ date: Thu Jan 01 00:00:00 1970 +0000 + summary: start on narf + $ hg push -f ../pinky -r query pushing to ../pinky @@ -552,16 +547,16 @@ | | o changeset: 5:0469d521db49 | | topic: fran - | | parent: 3:a53952faf762 - | | user: test - | | date: Thu Jan 01 00:00:00 1970 +0000 - | | summary: start on fran - | | - o | changeset: 4:fb147b0b417c - |/ user: test + | ~ parent: 3:a53952faf762 + | user: test | date: Thu Jan 01 00:00:00 1970 +0000 - | summary: start on narf + | summary: start on fran | + o changeset: 4:fb147b0b417c + | user: test + ~ date: Thu Jan 01 00:00:00 1970 +0000 + summary: start on narf + $ hg topics * query (1 changesets) @@ -633,16 +628,16 @@ | | o changeset: 5:0469d521db49 | | topic: fran - | | parent: 3:a53952faf762 - | | user: test - | | date: Thu Jan 01 00:00:00 1970 +0000 - | | summary: start on fran - | | - o | changeset: 4:fb147b0b417c - |/ user: test + | ~ parent: 3:a53952faf762 + | user: test | date: Thu Jan 01 00:00:00 1970 +0000 - | summary: start on narf + | summary: start on fran | + o changeset: 4:fb147b0b417c + | user: test + ~ date: Thu Jan 01 00:00:00 1970 +0000 + summary: start on narf + $ cd ../brain $ hg topics @@ -682,12 +677,12 @@ $ hg log -Gr 'draft()' o changeset: 9:0469d521db49 | tag: tip - | topic: fran - | parent: 3:a53952faf762 - | user: test - | date: Thu Jan 01 00:00:00 1970 +0000 - | summary: start on fran - | + ~ topic: fran + parent: 3:a53952faf762 + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: start on fran + query is not an open topic, so when we clear the current topic it'll fade out: @@ -701,12 +696,12 @@ $ hg log -r 'topic()' -G o changeset: 9:0469d521db49 | tag: tip - | topic: fran - | parent: 3:a53952faf762 - | user: test - | date: Thu Jan 01 00:00:00 1970 +0000 - | summary: start on fran - | + ~ topic: fran + parent: 3:a53952faf762 + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: start on fran + $ hg log -r 'not topic()' -G o changeset: 8:ae074045b7a7 |\ parent: 7:54c943c1c167 @@ -763,22 +758,22 @@ $ hg log -r 'topic("re:.ra.")' -G o changeset: 9:0469d521db49 | tag: tip - | topic: fran - | parent: 3:a53952faf762 - | user: test - | date: Thu Jan 01 00:00:00 1970 +0000 - | summary: start on fran - | + ~ topic: fran + parent: 3:a53952faf762 + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: start on fran + Exact match on fran: $ hg log -r 'topic(fran)' -G o changeset: 9:0469d521db49 | tag: tip - | topic: fran - | parent: 3:a53952faf762 - | user: test - | date: Thu Jan 01 00:00:00 1970 +0000 - | summary: start on fran - | + ~ topic: fran + parent: 3:a53952faf762 + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: start on fran + Match current topic: $ hg topic @@ -851,17 +846,17 @@ | | o changeset: 10:de75ec1bdbe8 | | parent: 8:ae074045b7a7 - | | user: test - | | date: Thu Jan 01 00:00:00 1970 +0000 - | | summary: non-topic - | | - o | changeset: 9:0469d521db49 - | | topic: fran - | | parent: 3:a53952faf762 - | | user: test - | | date: Thu Jan 01 00:00:00 1970 +0000 - | | summary: start on fran - | | + | ~ user: test + | date: Thu Jan 01 00:00:00 1970 +0000 + | summary: non-topic + | + o changeset: 9:0469d521db49 + | topic: fran + ~ parent: 3:a53952faf762 + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: start on fran + $ hg topics fran (1 changesets)
--- a/tests/test-touch.t Thu Aug 12 22:01:11 2021 +0200 +++ b/tests/test-touch.t Tue Oct 12 13:46:30 2021 +0300 @@ -5,7 +5,7 @@ > [alias] > glog = log -GT "{rev}: {desc}" > [extensions] - > hgext.rebase= + > rebase = > EOF $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH
--- a/tests/test-uncommit.t Thu Aug 12 22:01:11 2021 +0200 +++ b/tests/test-uncommit.t Tue Oct 12 13:46:30 2021 +0300 @@ -105,7 +105,7 @@ R g R m R n - $ hg man -r . + $ hg manifest -r . a aa b @@ -203,7 +203,7 @@ M d A e R n - $ hg man -r . + $ hg manifest -r . a b c
--- a/tests/test-unstability-resolution-result.t Thu Aug 12 22:01:11 2021 +0200 +++ b/tests/test-unstability-resolution-result.t Tue Oct 12 13:46:30 2021 +0300 @@ -9,7 +9,7 @@ $ cat >> $HGRCPATH <<EOF > [extensions] - > hgext.rebase= + > rebase = > EOF $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH
--- a/tests/test-unstable-orphan.t Thu Aug 12 22:01:11 2021 +0200 +++ b/tests/test-unstable-orphan.t Tue Oct 12 13:46:30 2021 +0300 @@ -51,7 +51,7 @@ o 0:135f39f4bd78@default(draft) add _a - $ hg evo --all --any --orphan + $ hg evolve --all --any --orphan move:[2] add _c atop:[3] bprime $ hg log -G @@ -102,7 +102,7 @@ o 0:135f39f4bd78@default(draft) add _a - $ hg evo --all --any --orphan + $ hg evolve --all --any --orphan move:[2] add _c atop:[6] add bsecondsplit2 $ hg log -G
--- a/tests/testlib/common.sh Thu Aug 12 22:01:11 2021 +0200 +++ b/tests/testlib/common.sh Tue Oct 12 13:46:30 2021 +0300 @@ -1,16 +1,18 @@ . $TESTDIR/testlib/pythonpath.sh mkcommit() { - echo "$1" > "$1" - hg add "$1" - hg ci -m "$1" + name="$1" + shift + echo "$name" > "$name" + hg add "$name" + hg ci -m "$name" "$@" } getid() { hg log --hidden --template '{node}\n' --rev "$1" } -cat >> $HGRCPATH <<EOF +cat >> $HGRCPATH << EOF [alias] -debugobsolete=debugobsolete -d '0 0' +glog = log -GT "{rev}:{node|short} {desc}\n ({bookmarks}) {phase} {instabilities}\n" EOF