Mercurial > evolve
changeset 5987:e97fbded40a5
branching: merge stable into default
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Fri, 06 Aug 2021 00:04:46 +0200 |
parents | 8a7ad6ba2654 (current diff) 5578f21b43c1 (diff) |
children | ef73f0d2232d |
files | CHANGELOG hgext3rd/evolve/__init__.py hgext3rd/evolve/cmdrewrite.py hgext3rd/evolve/compat.py hgext3rd/evolve/evolvecmd.py hgext3rd/evolve/rewriteutil.py hgext3rd/topic/__init__.py tests/test-discovery-obshashrange-cache.t tests/test-discovery-obshashrange.t tests/test-topic.t tests/test-touch.t |
diffstat | 13 files changed, 317 insertions(+), 184 deletions(-) [+] |
line wrap: on
line diff
--- a/CHANGELOG Sat Jun 19 22:13:13 2021 +0300 +++ b/CHANGELOG Fri Aug 06 00:04:46 2021 +0200 @@ -11,11 +11,25 @@ they were replaced by --orphan, --content-divergent and --phase-divergent respectively a long time ago +10.3.3 - in progress +-------------------- + +topic (0.22.3) + + * topic: correctly update from public commits with a (now hidden) topic + when hg update is called without any revision (issue6553) + + 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/hgext3rd/evolve/cmdrewrite.py Sat Jun 19 22:13:13 2021 +0300 +++ b/hgext3rd/evolve/cmdrewrite.py Fri Aug 06 00:04:46 2021 +0200 @@ -340,52 +340,6 @@ newid = repo.commitctx(new) return newid -# TODO: call core's version once we've dropped support for hg <= 4.9 -def movedirstate(repo, newctx, match=None): - """Move the dirstate to newctx and adjust it as necessary. - - A matcher can be provided as an optimization. It is probably a bug to pass - a matcher that doesn't match all the differences between the parent of the - working copy and newctx. - """ - oldctx = repo[b'.'] - ds = repo.dirstate - dscopies = dict(ds.copies()) - ds.setparents(newctx.node(), node.nullid) - s = newctx.status(oldctx, match=match) - for f in s.modified: - if ds[f] == b'r': - # modified + removed -> removed - continue - ds.normallookup(f) - - for f in s.added: - if ds[f] == b'r': - # added + removed -> unknown - ds.drop(f) - elif ds[f] != b'a': - ds.add(f) - - for f in s.removed: - if ds[f] == b'a': - # removed + added -> normal - ds.normallookup(f) - elif ds[f] != b'r': - ds.remove(f) - - # Merge old parent and old working dir copies - oldcopies = copies.pathcopies(newctx, oldctx, match) - oldcopies.update(dscopies) - newcopies = { - dst: oldcopies.get(src, src) - for dst, src in oldcopies.items() - } - # Adjust the dirstate copies - for dst, src in newcopies.items(): - if src not in newctx or dst in newctx or ds[dst] != b'a': - src = None - ds.copy(src, dst) - @eh.command( b'uncommit', [(b'a', b'all', None, _(b'uncommit all changes when no arguments given')), @@ -515,7 +469,7 @@ compat.clean_update(repo[newid]) else: with repo.dirstate.parentchange(), compat.parentchange(repo): - movedirstate(repo, repo[newid], match) + compat.movedirstate(repo, repo[newid], match) if not repo[newid].files(): ui.warn(_(b"new changeset is empty\n")) ui.status(_(b"(use 'hg prune .' to remove it)\n")) @@ -734,11 +688,8 @@ if opts.get('note'): metadata[b'note'] = opts['note'] - updates = allctx[:] - if p2 is not None and root.p2() != p2: - updates.append(p2) commitopts = pycompat.byteskwargs(commitopts) - newid, unusedvariable = rewriteutil.rewrite(repo, root, updates, + newid, unusedvariable = rewriteutil.rewrite(repo, root, head, [root.p1().node(), p2.node()], @@ -854,13 +805,10 @@ commitopts['message'] = b"\n".join(msgs) commitopts['edit'] = True - updates = allctx[:] - if p2 is not None and (root.p2() != p2 or not opts['fold']): - updates.append(p2) if not commitopts['fold'] and not commitopts['date']: commitopts['date'] = root.date() commitopts = pycompat.byteskwargs(commitopts) - newid, created = rewriteutil.rewrite(repo, root, updates, head, + newid, created = rewriteutil.rewrite(repo, root, head, [root.p1().node(), p2.node()], commitopts=commitopts) @@ -1365,11 +1313,8 @@ if choice == b'duplicate': duplicate = True - updates = [] - if len(ctx.parents()) > 1: - updates = ctx.parents() extradict = {b'extra': extra} - new, unusedvariable = rewriteutil.rewrite(repo, ctx, updates, ctx, + new, unusedvariable = rewriteutil.rewrite(repo, ctx, ctx, [p1, p2], commitopts=extradict) # store touched version to help potential children
--- a/hgext3rd/evolve/compat.py Sat Jun 19 22:13:13 2021 +0300 +++ b/hgext3rd/evolve/compat.py Fri Aug 06 00:04:46 2021 +0200 @@ -12,11 +12,13 @@ from mercurial import ( cmdutil, context, - copies, + copies as copiesmod, + dirstate, error, hg, logcmdutil, merge as mergemod, + node, obsolete, pycompat, registrar, @@ -97,7 +99,7 @@ except AttributeError: bmrevset = scmutil.bookmarkrevs -hg48 = util.safehasattr(copies, 'stringutil') +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 @@ -106,6 +108,7 @@ gets in and once we drop support for 4.6, this should be removed.""" from mercurial import pathutil + copies = copiesmod # In certain scenarios (e.g. graft, update or rebase), base can be # overridden We still need to know a real common ancestor in this case We @@ -356,7 +359,7 @@ # hg <= 4.9 (7694b685bb10) fixupstreamed = util.safehasattr(scmutil, 'movedirstate') if not fixupstreamed: - copies._fullcopytracing = fixedcopytracing + copiesmod._fullcopytracing = fixedcopytracing # help category compatibility # hg <= 4.7 (c303d65d2e34) @@ -467,3 +470,52 @@ def check_incompatible_arguments(opts, first, others): for other in others: check_at_most_one_arg(opts, first, other) + +if util.safehasattr(dirstate.dirstate, 'set_clean'): + movedirstate = scmutil.movedirstate +else: # hg <= 5.8 (8a50fb0784a9) + # TODO: call core's version once we've dropped support for hg <= 4.9 + def movedirstate(repo, newctx, match=None): + """Move the dirstate to newctx and adjust it as necessary. + + A matcher can be provided as an optimization. It is probably a bug to pass + a matcher that doesn't match all the differences between the parent of the + working copy and newctx. + """ + oldctx = repo[b'.'] + ds = repo.dirstate + dscopies = dict(ds.copies()) + ds.setparents(newctx.node(), node.nullid) + s = newctx.status(oldctx, match=match) + for f in s.modified: + if ds[f] == b'r': + # modified + removed -> removed + continue + ds.normallookup(f) + + for f in s.added: + if ds[f] == b'r': + # added + removed -> unknown + ds.drop(f) + elif ds[f] != b'a': + ds.add(f) + + for f in s.removed: + if ds[f] == b'a': + # removed + added -> normal + ds.normallookup(f) + elif ds[f] != b'r': + ds.remove(f) + + # Merge old parent and old working dir copies + oldcopies = copiesmod.pathcopies(newctx, oldctx, match) + oldcopies.update(dscopies) + newcopies = { + dst: oldcopies.get(src, src) + for dst, src in oldcopies.items() + } + # Adjust the dirstate copies + for dst, src in newcopies.items(): + if src not in newctx or dst in newctx or ds[dst] != b'a': + src = None + ds.copy(src, dst)
--- a/hgext3rd/evolve/evolvecmd.py Sat Jun 19 22:13:13 2021 +0300 +++ b/hgext3rd/evolve/evolvecmd.py Fri Aug 06 00:04:46 2021 +0200 @@ -37,7 +37,6 @@ from mercurial.i18n import _ from . import ( - cmdrewrite, compat, exthelper, rewriteutil, @@ -616,7 +615,7 @@ otherdiv = other if other.mutable() else divergent with repo.dirstate.parentchange(), compat.parentchange(repo): - cmdrewrite.movedirstate(repo, repo[publicnode]) + compat.movedirstate(repo, repo[publicnode]) # check if node to be committed has changes same as public one s = publicdiv.status() if not (s.added or s.removed or s.deleted or s.modified): @@ -629,7 +628,7 @@ return (True, publicnode) with repo.dirstate.parentchange(), compat.parentchange(repo): - cmdrewrite.movedirstate(repo, repo[resparent]) + compat.movedirstate(repo, repo[resparent]) # merge the branches mergebranches(repo, divergent, other, base)
--- a/hgext3rd/evolve/rewind.py Sat Jun 19 22:13:13 2021 +0300 +++ b/hgext3rd/evolve/rewind.py Fri Aug 06 00:04:46 2021 +0200 @@ -368,12 +368,9 @@ p2 = ctx.p2().node() p2 = rewindmap.get(p2, p2) - updates = [] - if len(ctx.parents()) > 1: - updates = ctx.parents() commitopts = {b'extra': extra, b'date': ctx.date()} - new, unusedvariable = rewriteutil.rewrite(unfi, ctx, updates, ctx, + new, unusedvariable = rewriteutil.rewrite(unfi, ctx, ctx, [p1, p2], commitopts=commitopts)
--- a/hgext3rd/evolve/rewriteutil.py Sat Jun 19 22:13:13 2021 +0300 +++ b/hgext3rd/evolve/rewriteutil.py Fri Aug 06 00:04:46 2021 +0200 @@ -19,6 +19,7 @@ error, hg, lock as lockmod, + mergeutil, node, obsolete, obsutil, @@ -213,12 +214,28 @@ revs = sorted(revs) return repomarks, revs -def rewrite(repo, old, updates, head, newbases, commitopts): +try: + from mercural import mergestate + mergestate.memmergestate + hasmemmergestate = True +except (ImportError, AttributeError): + # hg <= 5.5 (19590b126764) + hasmemmergestate = False + +def rewrite(repo, old, head, newbases, commitopts): """Return (nodeid, created) where nodeid is the identifier of the changeset generated by the rewrite process, and created is True if nodeid was actually created. If created is False, nodeid references a changeset existing before the rewrite call. """ + # Until there was memmergestate, in-memory would clear the on-disk + # mergestate and use that. We don't want that to happen, so we'll require + # users of old Mercurial versions to run `hg touch` etc without + # mergestate. + if not hasmemmergestate: + ms = compat.mergestate.read(repo) + mergeutil.checkunresolved(ms) + wlock = lock = tr = None try: wlock = repo.wlock() @@ -227,39 +244,6 @@ base = old.p1() updatebookmarks = bookmarksupdater(repo, old.node(), tr) - # commit a new version of the old changeset, including the update - # collect all files which might be affected - files = set(old.files()) - for u in updates: - files.update(u.files()) - - # Recompute copies (avoid recording a -> b -> a) - copied = copies.pathcopies(base, head) - - # prune files which were reverted by the updates - def samefile(f): - if f in head.manifest(): - a = head.filectx(f) - if f in base.manifest(): - b = base.filectx(f) - return (a.data() == b.data() - and a.flags() == b.flags()) - else: - return False - else: - return f not in base.manifest() - files = [f for f in files if not samefile(f)] - # commit version of these files as defined by head - headmf = head.manifest() - - def filectxfn(repo, ctx, path): - if path in headmf: - fctx = head[path] - flags = fctx.flags() - mctx = compat.memfilectx(repo, ctx, fctx, flags, copied, path) - return mctx - return None - message = cmdutil.logmessage(repo.ui, commitopts) if not message: message = old.description() @@ -272,20 +256,25 @@ extra = dict(commitopts.get(b'extra', old.extra())) extra[b'branch'] = head.branch() - new = context.memctx(repo, - parents=newbases, - text=message, - files=files, - filectxfn=filectxfn, - user=user, - date=date, - extra=extra) - + wctx = context.overlayworkingctx(repo) + wctx.setbase(base) + compat._update(repo, + head.node(), + branchmerge=False, + force=True, + wc=wctx) + for pctx in head.parents(): + for dst, src in copies.pathcopies(pctx, head).items(): + wctx[dst].markcopied(src) + new = wctx.tomemctx(text=message, + parents=newbases, + date=date, + extra=extra, + user=user) if commitopts.get(b'edit'): new._text = cmdutil.commitforceeditor(repo, new, []) revcount = len(repo) newid = repo.commitctx(new) - new = repo[newid] created = len(repo) != revcount updatebookmarks(newid)
--- a/hgext3rd/topic/__init__.py Sat Jun 19 22:13:13 2021 +0300 +++ b/hgext3rd/topic/__init__.py Fri Aug 06 00:04:46 2021 +0200 @@ -86,17 +86,17 @@ * everything pushed become public (the default):: - [phase] + [phases] publish = yes * nothing push turned public:: - [phase] + [phases] publish = no * topic branches are not published, changeset without topic are:: - [phase] + [phases] publish = no [experimental] topic.publish-bare-branch = yes
--- a/hgext3rd/topic/destination.py Sat Jun 19 22:13:13 2021 +0300 +++ b/hgext3rd/topic/destination.py Fri Aug 06 00:04:46 2021 +0200 @@ -10,7 +10,6 @@ from . import ( common, topicmap, - constants, ) from .evolvebits import builddependencies @@ -69,7 +68,7 @@ topic = repo.currenttopic if topic: revs = repo.revs(b'.::topic(%s)', topic) - elif constants.extrakey in repo[b'.'].extra(): + elif repo[b'.'].topic(): revs = [] else: return None, None, None
--- a/tests/test-discovery-obshashrange-cache.t Sat Jun 19 22:13:13 2021 +0300 +++ b/tests/test-discovery-obshashrange-cache.t Fri Aug 06 00:04:46 2021 +0200 @@ -119,7 +119,7 @@ clear cache - $ rm -rf main/.hg/cache/evoext + $ rm main/.hg/cache/evoext* pull nothing @@ -134,7 +134,6 @@ $ f -s main/.hg/cache/evoext* main/.hg/cache/evoext-depthcache-00: size=88 main/.hg/cache/evoext-firstmerge-00: size=88 - main/.hg/cache/evoext-obscache-00: size=72 main/.hg/cache/evoext-stablesortcache-00: size=92 main/.hg/cache/evoext_obshashrange_v2.sqlite: size=?* (glob) main/.hg/cache/evoext_stablerange_v2.sqlite: size=?* (glob) @@ -144,7 +143,7 @@ clear cache - $ rm -rf main/.hg/cache/evoext + $ rm main/.hg/cache/evoext* push nothing
--- a/tests/test-discovery-obshashrange.t Sat Jun 19 22:13:13 2021 +0300 +++ b/tests/test-discovery-obshashrange.t Fri Aug 06 00:04:46 2021 +0200 @@ -136,9 +136,9 @@ * @0000000000000000000000000000000000000000 (*)> debugobshashrange --subranges --rev tip (glob) * @0000000000000000000000000000000000000000 (*)> updated evo-ext-depthcache in *.???? seconds (8r) (glob) * @0000000000000000000000000000000000000000 (*)> updated evo-ext-stablerange-mergepoint in *.???? seconds (8r) (glob) - 1970/01/01 00:00:00 * @0000000000000000000000000000000000000000 (*)> updated evo-ext-obshashrange in *.???? seconds (8r, 5o) (glob) - 1970/01/01 00:00:00 * @0000000000000000000000000000000000000000 (*)> updated evo-ext-stablesort in *.???? seconds (8r) (glob) - 1970/01/01 00:00:00 * @0000000000000000000000000000000000000000 (*)> updated evo-ext-firstmerge in *.???? seconds (8r) (glob) + * @0000000000000000000000000000000000000000 (*)> updated evo-ext-obshashrange in *.???? seconds (8r, 5o) (glob) + * @0000000000000000000000000000000000000000 (*)> updated evo-ext-stablesort in *.???? seconds (8r) (glob) + * @0000000000000000000000000000000000000000 (*)> updated evo-ext-firstmerge in *.???? seconds (8r) (glob) * @0000000000000000000000000000000000000000 (*)> debugobshashrange --subranges --rev tip exited 0 after *.?? seconds (glob) * @0000000000000000000000000000000000000000 (*)> -R server serve --stdio (glob) * @0000000000000000000000000000000000000000 (*)> -R server serve --stdio exited 0 after *.?? seconds (glob) @@ -230,11 +230,11 @@ received listkey for "phases": 58 bytes $ hg -R ../server blackbox * @0000000000000000000000000000000000000000 (*)> -R server serve --stdio (glob) - 1970/01/01 00:00:00 * @0000000000000000000000000000000000000000 (*)> updated evo-ext-firstmerge in *.???? seconds (1r) (glob) + * @0000000000000000000000000000000000000000 (*)> updated evo-ext-firstmerge in *.???? seconds (1r) (glob) * @0000000000000000000000000000000000000000 (*)> updated evo-ext-depthcache in *.???? seconds (1r) (glob) - 1970/01/01 00:00:00 * @0000000000000000000000000000000000000000 (*)> updated evo-ext-stablesort in *.???? seconds (1r) (glob) + * @0000000000000000000000000000000000000000 (*)> updated evo-ext-stablesort in *.???? seconds (1r) (glob) * @0000000000000000000000000000000000000000 (*)> updated evo-ext-stablerange-mergepoint in *.???? seconds (1r) (glob) - 1970/01/01 00:00:00 * @0000000000000000000000000000000000000000 (*)> updated evo-ext-obshashrange in *.???? seconds (1r, 1o) (glob) + * @0000000000000000000000000000000000000000 (*)> updated evo-ext-obshashrange in *.???? seconds (1r, 1o) (glob) * @0000000000000000000000000000000000000000 (*)> obscache is out of date, falling back to slower obsstore version (glob) * @0000000000000000000000000000000000000000 (*)> updated evo-ext-obscache in *.???? seconds (1r, 1o) (glob) * @0000000000000000000000000000000000000000 (*)> 1 incoming changes - new heads: 45f8b879de92 (glob) @@ -323,12 +323,12 @@ * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> received listkey for "namespaces": 40 bytes (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-depthcache in *.???? seconds (6r) (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-stablerange-mergepoint in *.???? seconds (6r) (glob) - 1970/01/01 00:00:00 * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-obshashrange in *.???? seconds (6r, 4o) (glob) + * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-obshashrange in *.???? seconds (6r, 4o) (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> query 0; add more sample (target 100, current 1) (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> query 0; sample size is 9, largest range 5 (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> sending evoext_obshashrange_v1 command (glob) - 1970/01/01 00:00:00 * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-stablesort in *.???? seconds (6r) (glob) - 1970/01/01 00:00:00 * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-firstmerge in *.???? seconds (6r) (glob) + * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-stablesort in *.???? seconds (6r) (glob) + * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-firstmerge in *.???? seconds (6r) (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> obsdiscovery, 0/5 mismatch - 1 obshashrange queries in *.???? seconds (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> obsdiscovery, 0/5 mismatch - 1 obshashrange queries in *.???? seconds (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> checking for updated bookmarks (glob) @@ -421,7 +421,7 @@ * @0000000000000000000000000000000000000000 (*)> updated evo-ext-obscache in *.???? seconds (0r, 1o) (glob) * @0000000000000000000000000000000000000000 (*)> -R ../server debugobsolete bbbbbbb2222222222bbbbbbbbbbbbb2222222222 bebd167eb94d257ace0e814aeb98e6972ed2970d exited 0 after *.?? seconds (glob) * @0000000000000000000000000000000000000000 (*)> -R server serve --stdio (glob) - 1970/01/01 00:00:00 * @0000000000000000000000000000000000000000 (*)> obshashcache clean - new markers affect 3 changeset and cached ranges (glob) + * @0000000000000000000000000000000000000000 (*)> obshashcache clean - new markers affect 3 changeset and cached ranges (glob) * @0000000000000000000000000000000000000000 (*)> updated evo-ext-obshashrange in *.???? seconds (0r, 4o) (glob) * @0000000000000000000000000000000000000000 (*)> -R server serve --stdio exited 0 after *.?? seconds (glob) * @0000000000000000000000000000000000000000 (*)> -R ../server blackbox (glob) @@ -517,12 +517,12 @@ * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> debugobsolete --rev ::6 exited 0 after *.?? seconds (glob) (windows !) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> debugobshashrange --subranges --rev 'heads(all())' (glob) (no-windows !) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> debugobshashrange --subranges --rev "heads(all())" (glob) (windows !) - 1970/01/01 00:00:00 * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-depthcache in *.???? seconds (2r) (glob) - 1970/01/01 00:00:00 * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-stablerange-mergepoint in *.???? seconds (2r) (glob) + * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-depthcache in *.???? seconds (2r) (glob) + * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-stablerange-mergepoint in *.???? seconds (2r) (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> obshashcache clean - new markers affect 2 changeset and cached ranges (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-obshashrange in *.???? seconds (2r, 3o) (glob) - 1970/01/01 00:00:00 * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-stablesort in *.???? seconds (2r) (glob) - 1970/01/01 00:00:00 * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-firstmerge in *.???? seconds (2r) (glob) + * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-stablesort in *.???? seconds (2r) (glob) + * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-firstmerge in *.???? seconds (2r) (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> debugobshashrange --subranges --rev "heads(all())" exited 0 after *.?? seconds (glob) (windows !) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> debugobshashrange --subranges --rev 'heads(all())' exited 0 after *.?? seconds (glob) (no-windows !) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> pull -r f69452c5b1af6cbaaa56ef50cf94fff5bcc6ca23 (glob) @@ -700,15 +700,15 @@ OBSEXC: request obsmarkers for 1 common nodes 1 new obsolescence markers $ hg blackbox - 1970/01/01 00:00:00 * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> debugobshashrange --subranges --rev "heads(all())" (glob) (windows !) - 1970/01/01 00:00:00 * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> debugobshashrange --subranges --rev 'heads(all())' (glob) (no-windows !) - 1970/01/01 00:00:00 * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> obshashcache clean - new markers affect 2 changeset and cached ranges (glob) - 1970/01/01 00:00:00 * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-obshashrange in *.???? seconds (0r, 1o) (glob) - 1970/01/01 00:00:00 * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> debugobshashrange --subranges --rev "heads(all())" exited 0 after *.?? seconds (glob) (windows !) - 1970/01/01 00:00:00 * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> debugobshashrange --subranges --rev 'heads(all())' exited 0 after *.?? seconds (glob) (no-windows !) + * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> debugobshashrange --subranges --rev "heads(all())" (glob) (windows !) + * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> debugobshashrange --subranges --rev 'heads(all())' (glob) (no-windows !) + * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> obshashcache clean - new markers affect 2 changeset and cached ranges (glob) + * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-obshashrange in *.???? seconds (0r, 1o) (glob) + * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> debugobshashrange --subranges --rev "heads(all())" exited 0 after *.?? seconds (glob) (windows !) + * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> debugobshashrange --subranges --rev 'heads(all())' exited 0 after *.?? seconds (glob) (no-windows !) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> pull -r bebd167eb94d257ace0e814aeb98e6972ed2970d (glob) - 1970/01/01 00:00:00 * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> obsdiscovery, 1/5 mismatch - 1 obshashrange queries in *.???? seconds (glob) - 1970/01/01 00:00:00 * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-obscache in *.???? seconds (0r, 1o) (glob) + * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> obsdiscovery, 1/5 mismatch - 1 obshashrange queries in *.???? seconds (glob) + * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-obscache in *.???? seconds (0r, 1o) (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> pull -r bebd167eb94d257ace0e814aeb98e6972ed2970d exited 0 after *.?? seconds (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> blackbox (glob) $ rm .hg/blackbox.log @@ -763,15 +763,15 @@ OBSEXC: request obsmarkers for 1 common nodes 1 new obsolescence markers $ hg blackbox - 1970/01/01 00:00:00 * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> debugobshashrange --subranges --rev "heads(all())" (glob) (windows !) - 1970/01/01 00:00:00 * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> debugobshashrange --subranges --rev 'heads(all())' (glob) (no-windows !) - 1970/01/01 00:00:00 * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> obshashcache clean - new markers affect 2 changeset and cached ranges (glob) - 1970/01/01 00:00:00 * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-obshashrange in *.???? seconds (0r, 1o) (glob) - 1970/01/01 00:00:00 * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> debugobshashrange --subranges --rev "heads(all())" exited 0 after *.?? seconds (glob) (windows !) - 1970/01/01 00:00:00 * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> debugobshashrange --subranges --rev 'heads(all())' exited 0 after *.?? seconds (glob) (no-windows !) + * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> debugobshashrange --subranges --rev "heads(all())" (glob) (windows !) + * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> debugobshashrange --subranges --rev 'heads(all())' (glob) (no-windows !) + * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> obshashcache clean - new markers affect 2 changeset and cached ranges (glob) + * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-obshashrange in *.???? seconds (0r, 1o) (glob) + * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> debugobshashrange --subranges --rev "heads(all())" exited 0 after *.?? seconds (glob) (windows !) + * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> debugobshashrange --subranges --rev 'heads(all())' exited 0 after *.?? seconds (glob) (no-windows !) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> pull -r bebd167eb94d257ace0e814aeb98e6972ed2970d (glob) - 1970/01/01 00:00:00 * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> obsdiscovery, 1/5 mismatch - 1 obshashrange queries in *.???? seconds (glob) - 1970/01/01 00:00:00 * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-obscache in *.???? seconds (0r, 1o) (glob) + * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> obsdiscovery, 1/5 mismatch - 1 obshashrange queries in *.???? seconds (glob) + * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-obscache in *.???? seconds (0r, 1o) (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> pull -r bebd167eb94d257ace0e814aeb98e6972ed2970d exited 0 after *.?? seconds (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> blackbox (glob) $ rm .hg/blackbox.log @@ -826,15 +826,15 @@ OBSEXC: request obsmarkers for 1 common nodes 1 new obsolescence markers $ hg blackbox - 1970/01/01 00:00:00 * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> debugobshashrange --subranges --rev "heads(all())" (glob) (windows !) - 1970/01/01 00:00:00 * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> debugobshashrange --subranges --rev 'heads(all())' (glob) (no-windows !) - 1970/01/01 00:00:00 * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> obshashcache clean - new markers affect 2 changeset and cached ranges (glob) - 1970/01/01 00:00:00 * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-obshashrange in *.???? seconds (0r, 1o) (glob) - 1970/01/01 00:00:00 * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> debugobshashrange --subranges --rev "heads(all())" exited 0 after *.?? seconds (glob) (windows !) - 1970/01/01 00:00:00 * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> debugobshashrange --subranges --rev 'heads(all())' exited 0 after *.?? seconds (glob) (no-windows !) - 1970/01/01 00:00:00 * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> pull -r bebd167eb94d257ace0e814aeb98e6972ed2970d (glob) - 1970/01/01 00:00:00 * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> obsdiscovery, 1/5 mismatch - 1 obshashrange queries in *.???? seconds (glob) - 1970/01/01 00:00:00 * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-obscache in *.???? seconds (0r, 1o) (glob) + * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> debugobshashrange --subranges --rev "heads(all())" (glob) (windows !) + * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> debugobshashrange --subranges --rev 'heads(all())' (glob) (no-windows !) + * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> obshashcache clean - new markers affect 2 changeset and cached ranges (glob) + * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-obshashrange in *.???? seconds (0r, 1o) (glob) + * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> debugobshashrange --subranges --rev "heads(all())" exited 0 after *.?? seconds (glob) (windows !) + * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> debugobshashrange --subranges --rev 'heads(all())' exited 0 after *.?? seconds (glob) (no-windows !) + * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> pull -r bebd167eb94d257ace0e814aeb98e6972ed2970d (glob) + * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> obsdiscovery, 1/5 mismatch - 1 obshashrange queries in *.???? seconds (glob) + * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-obscache in *.???? seconds (0r, 1o) (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> pull -r bebd167eb94d257ace0e814aeb98e6972ed2970d exited 0 after *.?? seconds (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> blackbox (glob) $ rm .hg/blackbox.log @@ -876,18 +876,18 @@ $ hg blackbox * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> debugobshashrange --subranges --rev 'heads(all())' (glob) (no-windows !) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> debugobshashrange --subranges --rev "heads(all())" (glob) (windows !) - 1970/01/01 00:00:00 * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> obshashcache clean - new markers affect 2 changeset and cached ranges (glob) - 1970/01/01 00:00:00 * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-obshashrange in *.???? seconds (0r, 1o) (glob) + * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> obshashcache clean - new markers affect 2 changeset and cached ranges (glob) + * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-obshashrange in *.???? seconds (0r, 1o) (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> debugobshashrange --subranges --rev 'heads(all())' exited 0 after *.?? seconds (glob) (no-windows !) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> debugobshashrange --subranges --rev "heads(all())" exited 0 after *.?? seconds (glob) (windows !) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> pull (glob) - 1970/01/01 00:00:00 * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> obsdiscovery, 0/8 mismatch - 1 obshashrange queries in *.???? seconds (glob) - 1970/01/01 00:00:00 * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-obscache in *.???? seconds (1r, 1o) (glob) - 1970/01/01 00:00:00 * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> 1 incoming changes - new heads: 4de32a90b66c (glob) + * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> obsdiscovery, 0/8 mismatch - 1 obshashrange queries in *.???? seconds (glob) + * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-obscache in *.???? seconds (1r, 1o) (glob) + * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> 1 incoming changes - new heads: 4de32a90b66c (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> pull exited 0 after *.?? seconds (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> rollback (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> strip detected, evo-ext-obscache cache reset (glob) - 1970/01/01 00:00:00 * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-obscache in *.???? seconds (8r, 15o) (glob) + * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-obscache in *.???? seconds (8r, 15o) (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> rollback exited 0 after *.?? seconds (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> blackbox (glob) $ rm .hg/blackbox.log @@ -926,9 +926,9 @@ * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> debugobshashrange --subranges --rev 'heads(all())' exited 0 after *.?? seconds (glob) (no-windows !) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> debugobshashrange --subranges --rev "heads(all())" exited 0 after *.?? seconds (glob) (windows !) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> pull (glob) - 1970/01/01 00:00:00 * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> obsdiscovery, 0/8 mismatch - 1 obshashrange queries in *.???? seconds (glob) - 1970/01/01 00:00:00 * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-obscache in *.???? seconds (1r, 1o) (glob) - 1970/01/01 00:00:00 * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> 1 incoming changes - new heads: 4de32a90b66c (glob) + * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> obsdiscovery, 0/8 mismatch - 1 obshashrange queries in *.???? seconds (glob) + * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-obscache in *.???? seconds (1r, 1o) (glob) + * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> 1 incoming changes - new heads: 4de32a90b66c (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> pull exited 0 after *.?? seconds (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> blackbox (glob) $ rm .hg/blackbox.log @@ -1032,18 +1032,18 @@ * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> debugobshashrange --subranges --rev 'heads(all())' (glob) (no-windows !) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> debugobshashrange --subranges --rev "heads(all())" (glob) (windows !) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> writing .hg/cache/tags2-visible with 0 tags (glob) - 1970/01/01 00:00:00 * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-depthcache in *.???? seconds (1r) (glob) - 1970/01/01 00:00:00 * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-stablerange-mergepoint in *.???? seconds (1r) (glob) - 1970/01/01 00:00:00 * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-obshashrange in *.???? seconds (1r, 1o) (glob) - 1970/01/01 00:00:00 * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-stablesort in *.???? seconds (1r) (glob) - 1970/01/01 00:00:00 * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-firstmerge in *.???? seconds (1r) (glob) + * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-depthcache in *.???? seconds (1r) (glob) + * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-stablerange-mergepoint in *.???? seconds (1r) (glob) + * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-obshashrange in *.???? seconds (1r, 1o) (glob) + * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-stablesort in *.???? seconds (1r) (glob) + * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-firstmerge in *.???? seconds (1r) (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> debugobshashrange --subranges --rev "heads(all())" exited 0 after *.?? seconds (glob) (windows !) - 1970/01/01 00:00:00 * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> debugobshashrange --subranges --rev 'heads(all())' exited 0 after *.?? seconds (glob) (no-windows !) + * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> debugobshashrange --subranges --rev 'heads(all())' exited 0 after *.?? seconds (glob) (no-windows !) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> log -G (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> log -G exited 0 after *.?? seconds (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> --config "extensions.strip=" strip -r "desc(\"foo\")" (glob) (windows !) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> --config 'extensions.strip=' strip -r 'desc("foo")' (glob) (no-windows !) - 1970/01/01 00:00:00 * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> saved backup bundle to $TESTTMP/client/.hg/strip-backup/45f8b879de92-94c82517-backup.hg (glob) + * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> saved backup bundle to $TESTTMP/client/.hg/strip-backup/45f8b879de92-94c82517-backup.hg (glob) * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> strip detected, evo-ext-obscache cache reset (glob) * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> updated evo-ext-obscache in *.???? seconds (5r, 11o) (glob) * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> updated evo-ext-obscache in *.???? seconds (3r, 0o) (glob) @@ -1058,14 +1058,14 @@ * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> updated evo-ext-depthcache in *.???? seconds (8r) (glob) * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> updated evo-ext-stablerange-mergepoint in *.???? seconds (8r) (glob) * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> strip detected, evo-ext-obshashrange cache reset (glob) - 1970/01/01 00:00:00 * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> updated evo-ext-obshashrange in *.???? seconds (8r, 11o) (glob) + * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> updated evo-ext-obshashrange in *.???? seconds (8r, 11o) (glob) * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> strip detected, evo-ext-stablesort cache reset (glob) * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> updated evo-ext-stablesort in *.???? seconds (8r) (glob) * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> strip detected, evo-ext-firstmerge cache reset (glob) * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> updated evo-ext-firstmerge in *.???? seconds (8r) (glob) * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> obsdiscovery, 1/8 mismatch - 1 obshashrange queries in *.???? seconds (glob) - 1970/01/01 00:00:00 * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> updated evo-ext-obscache in *.???? seconds (1r, 5o) (glob) - 1970/01/01 00:00:00 * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> 1 incoming changes - new heads: 45f8b879de92 (glob) + * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> updated evo-ext-obscache in *.???? seconds (1r, 5o) (glob) + * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> 1 incoming changes - new heads: 45f8b879de92 (glob) * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> pull exited 0 after *.?? seconds (glob) * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> log -G (glob) * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> writing .hg/cache/tags2-visible with 0 tags (glob)
--- a/tests/test-topic-dest.t Sat Jun 19 22:13:13 2021 +0300 +++ b/tests/test-topic-dest.t Fri Aug 06 00:04:46 2021 +0200 @@ -489,12 +489,27 @@ o 0 () c_alpha +Testing that default destination for update is not ignoring phases +https://bz.mercurial-scm.org/show_bug.cgi?id=6553 + + $ hg phase --rev 'desc("Huc")' --public + + $ hg up 'desc("Huc")^' + 1 files updated, 0 files merged, 1 files removed, 0 files unresolved + $ hg up + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + updated to "efbc6aa717fb: Huc" + 1 other heads for branch "default" + Default destination for histedit ================================ -By default histedit should edit with the current topic only -(even when based on other draft +By default histedit should edit changesets with the current topic only +(even when based on other draft changesets) + $ hg up elephant + switching to topic elephant + 2 files updated, 0 files merged, 1 files removed, 0 files unresolved $ hg phase 'desc(c_zeta)' 11: draft $ HGEDITOR=cat hg histedit | grep pick
--- a/tests/test-topic.t Sat Jun 19 22:13:13 2021 +0300 +++ b/tests/test-topic.t Fri Aug 06 00:04:46 2021 +0200 @@ -91,17 +91,17 @@ * everything pushed become public (the default): - [phase] + [phases] publish = yes * nothing push turned public: - [phase] + [phases] publish = no * topic branches are not published, changeset without topic are: - [phase] + [phases] publish = no [experimental] topic.publish-bare-branch = yes
--- a/tests/test-touch.t Sat Jun 19 22:13:13 2021 +0300 +++ b/tests/test-touch.t Fri Aug 06 00:04:46 2021 +0200 @@ -212,6 +212,113 @@ $ cd .. +Check that touching a merge commit doesn't lose file changes (issue 6416) + + $ hg init issue-6416 + $ cd issue-6416 + $ echo base > base + $ hg ci -Aqm base + $ echo left1 > left1 + $ hg ci -Aqm left1 + $ echo left2 > left2 + $ hg ci -Aqm left2 + $ hg up 0 -q + $ echo right1 > right1 + $ hg ci -Aqm right1 + $ echo right2 > right2 + $ hg ci -Aqm right2 + $ hg up 2 -q + $ hg merge 4 -q + $ hg ci -m merge + $ hg touch tip + $ hg glog --hidden + @ 6: merge + |\ + +---x 5: merge + | |/ + | o 4: right2 + | | + | o 3: right1 + | | + o | 2: left2 + | | + o | 1: left1 + |/ + o 0: base + + $ hg glog --hidden --rev 'min(desc("merge"))' --rev 'max(desc("merge"))' + @ 6: merge + |\ + ~ ~ + x 5: merge + |\ + ~ ~ + $ hg status --hidden --change 'min(desc("merge"))' + A right1 + A right2 + $ hg status --hidden --change 'max(desc("merge"))' + A right1 + A right2 + $ hg status --hidden --rev 'min(desc("merge"))' --rev 'max(desc("merge"))' + $ cd .. + +Check that touching a merge commit doesn't lose copies + + $ hg init merge-copies + $ cd merge-copies + $ echo base > base + $ hg ci -Aqm base + $ echo left > left + $ hg cp base copy-on-left + $ hg ci -Aqm left + $ hg up 0 -q + $ echo right > right + $ hg cp base copy-on-right + $ hg ci -Aqm right + $ hg up 1 -q + $ hg merge 2 -q + $ hg cp left merge-copy-left + $ hg cp right merge-copy-right + $ hg ci -m merge + $ hg touch tip + $ hg glog --hidden + @ 4: merge + |\ + +---x 3: merge + | |/ + | o 2: right + | | + o | 1: left + |/ + o 0: base + + $ hg glog --hidden --rev 'min(desc("merge"))' --rev 'max(desc("merge"))' + @ 4: merge + |\ + ~ ~ + x 3: merge + |\ + ~ ~ + $ hg debugpathcopies 'min(desc("base"))' 'min(desc("merge"))' + base -> copy-on-left + base -> copy-on-right + $ hg debugpathcopies 'min(desc("base"))' 'max(desc("merge"))' + base -> copy-on-left + base -> copy-on-right + $ hg debugpathcopies 'min(desc("left"))' 'min(desc("merge"))' + base -> copy-on-right + left -> merge-copy-left + $ hg debugpathcopies 'min(desc("left"))' 'max(desc("merge"))' + base -> copy-on-right + left -> merge-copy-left + $ hg debugpathcopies 'min(desc("right"))' 'min(desc("merge"))' + base -> copy-on-left + right -> merge-copy-right + $ hg debugpathcopies 'min(desc("right"))' 'max(desc("merge"))' + base -> copy-on-left + right -> merge-copy-right + $ cd .. + Make sure touch doesn't fail to warn about divergence (issue6107) $ hg init touchdiv @@ -236,3 +343,20 @@ 1 new content-divergent changesets $ cd .. + +Touch preserves copies + + $ hg init copies + $ cd copies + $ echo a > a + $ hg ci -Aqm a + $ hg cp a b + $ hg ci -Aqm 'copy a to b' + $ hg status --copies --change . + A b + a + $ hg touch + $ hg status --copies --change . + A b + a + $ cd ..