Mercurial > evolve
changeset 5878:04a1713c9ef5
branching: merge with stable
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Fri, 23 Apr 2021 11:55:42 +0200 |
parents | 1bd2c4f147e1 (diff) 44c20093fc0e (current diff) |
children | e24bdf74cf83 |
files | tests/test-discovery-obshashrange.t |
diffstat | 7 files changed, 44 insertions(+), 55 deletions(-) [+] |
line wrap: on
line diff
--- a/CHANGELOG Thu Apr 22 20:51:46 2021 +0800 +++ b/CHANGELOG Fri Apr 23 11:55:42 2021 +0200 @@ -4,7 +4,7 @@ 10.3.0 -- 2021-03-11 -------------------- - * doc: document stack as a substitue for MQ's qseries + * doc: document stack as a substitute for MQ's qseries * doc: document revsets provided by evolve extension * evolve: add a experimental.evolution.in-memory config for running evolve @@ -18,7 +18,7 @@ and `hg status` respectively * rewind: detect and abort on cases when we rewind to changesets that are - precessors / successors of each other + predecessors / successors of each other * rewind: when user gives only some parts of a fold, include the other parts as well, or abort if they are missing from local repo
--- a/hgext3rd/evolve/evolvecmd.py Thu Apr 22 20:51:46 2021 +0800 +++ b/hgext3rd/evolve/evolvecmd.py Fri Apr 23 11:55:42 2021 +0200 @@ -301,7 +301,7 @@ ui.write_err(hint) return (False, b".") - if not (divergent.mutable() and other.mutable()): + if not divergent.mutable(): # Public divergence: we keep public one to local side while merging # When public branch is behind to the mutable branch, for now we # relocate mutable cset to public one's side in every case. @@ -311,9 +311,8 @@ # # Otherwise, we are going to rebase the "behind" branch up to the new # brancmap level. - publicdiv = divergent if other.mutable() else other - resolutionparent = publicdiv.p1().rev() - evolvestate[b'public-divergent'] = publicdiv.node() + resolutionparent = divergent.p1().rev() + evolvestate[b'public-divergent'] = divergent.node() return (True, resolutionparent) otherp1 = succsotherp1 = other.p1().rev() @@ -448,10 +447,12 @@ ui.write_err(msg) return (False, b".") other = others[0] + evolvestate[b'orig-divergent'] = divergent.node() + if not other.mutable(): + divergent, other = other, divergent evolvestate[b'divergent'] = divergent.node() evolvestate[b'other-divergent'] = other.node() evolvestate[b'base'] = base.node() - evolvestate[b'orig-divergent'] = divergent.node() # sometimes we will relocate a node in case of different parents and we can # encounter conflicts after relocation is done while solving @@ -532,10 +533,7 @@ evolvestate[b'other-divergent'] = newother other = repo[newother] - localside, otherside = divergent, other - if not otherside.mutable(): - localside, otherside = other, divergent - _mergecontentdivergents(repo, progresscb, localside, otherside, base, + _mergecontentdivergents(repo, progresscb, divergent, other, base, evolvestate) res, newnode = _completecontentdivergent(ui, repo, progresscb, divergent, other, base, evolvestate) @@ -556,7 +554,7 @@ if newnode == publicdiv.node(): # case 2) pubstr = bytes(publicdiv) - othstr = bytes(otherside) + othstr = bytes(other) msg = _(b'content divergence resolution between %s ' b'(public) and %s has same content as %s, ' b'discarding %s\n') @@ -653,9 +651,6 @@ else: date = max(divergent.date(), other.date()) - localside, otherside = divergent, other - if not otherside.mutable(): - localside, otherside = other, divergent # We really want a new commit in order to avoid obsmarker cycles (otherwise # divergence resolutions done in separate repos may create markers in the # opposite directions). For that reason, we set ui.allowemptycommit and @@ -665,8 +660,8 @@ {(b'ui', b'allowemptycommit'): b'true'}, b'evolve' ): extra = { - b'divergence_source_local': localside.hex(), - b'divergence_source_other': otherside.hex() + b'divergence_source_local': divergent.hex(), + b'divergence_source_other': other.hex() } newnode = repo.commit(text=desc, user=user, date=date, extra=extra) new = repo[newnode] @@ -2076,10 +2071,7 @@ evolvestate[b'other-divergent'] = newother other = repo[newother] # continue the resolution by merging the content-divergent csets - localside, otherside = divergent, other - if not otherside.mutable(): - localside, otherside = other, divergent - _mergecontentdivergents(repo, progresscb, localside, otherside, + _mergecontentdivergents(repo, progresscb, divergent, other, base, evolvestate) if evolvestate[b'relocating-other']: @@ -2094,10 +2086,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/metadata.py Thu Apr 22 20:51:46 2021 +0800 +++ b/hgext3rd/evolve/metadata.py Fri Apr 23 11:55:42 2021 +0200 @@ -5,7 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. -__version__ = b'10.3.1.dev' +__version__ = b'10.4.0.dev' testedwith = b'4.6.2 4.7 4.8 4.9 5.0 5.1 5.2 5.3 5.4 5.5 5.6 5.7' minimumhgversion = b'4.6' buglink = b'https://bz.mercurial-scm.org/'
--- a/hgext3rd/topic/__init__.py Thu Apr 22 20:51:46 2021 +0800 +++ b/hgext3rd/topic/__init__.py Fri Apr 23 11:55:42 2021 +0200 @@ -232,7 +232,7 @@ b'topic.active': b'green', } -__version__ = b'0.22.1.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' minimumhgversion = b'4.6'
--- a/tests/test-evolve-public-content-divergent-corner-cases.t Thu Apr 22 20:51:46 2021 +0800 +++ b/tests/test-evolve-public-content-divergent-corner-cases.t Fri Apr 23 11:55:42 2021 +0200 @@ -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
--- a/tests/test-evolve-public-content-divergent-discard.t Thu Apr 22 20:51:46 2021 +0800 +++ b/tests/test-evolve-public-content-divergent-discard.t Fri Apr 23 11:55:42 2021 +0200 @@ -89,8 +89,8 @@ public $ hg evolve --content-divergent --any - merge:[3] added ch - with: [4] added c + merge:[4] added c + with: [3] added ch base: [2] added c 0 files updated, 0 files merged, 0 files removed, 0 files unresolved other divergent changeset 90522bccf499 has same content as local f7c1071f1e7c and differs by "description" only, discarding 90522bccf499 @@ -180,10 +180,10 @@ public $ hg evolve --content-divergent --any - merge:[4] added dh - with: [5] added d + merge:[5] added d + with: [4] added dh base: [3] added d - rebasing "divergent" content-divergent changeset 5acd58ef5066 on 155349b645be + rebasing "other" content-divergent changeset 5acd58ef5066 on 155349b645be 0 files updated, 0 files merged, 0 files removed, 0 files unresolved other divergent changeset ae3429430ef1 has same content as local e800202333a4 and differs by "description" only, discarding ae3429430ef1 content divergence resolution between e800202333a4 (public) and ae3429430ef1 has same content as e800202333a4, discarding ae3429430ef1 @@ -265,8 +265,8 @@ public $ hg evolve --content-divergent --any - merge:[3] added ch - with: [4] added c + merge:[4] added c + with: [3] added ch base: [2] added c merging ch warning: conflicts while merging ch! (edit, then use 'hg resolve --mark') @@ -379,10 +379,10 @@ public $ hg evolve --content-divergent --any - merge:[4] added dh - with: [5] added d + merge:[5] added d + with: [4] added dh base: [3] added d - rebasing "divergent" content-divergent changeset f89a8e2f86ac on 155349b645be + rebasing "other" content-divergent changeset f89a8e2f86ac on 155349b645be merging c warning: conflicts while merging c! (edit, then use 'hg resolve --mark') unresolved merge conflicts @@ -483,10 +483,10 @@ public $ hg evolve --content-divergent --any - merge:[4] added dh - with: [5] added d + merge:[5] added d + with: [4] added dh base: [3] added d - rebasing "divergent" content-divergent changeset db0b7bba0aae on 155349b645be + rebasing "other" content-divergent changeset db0b7bba0aae on 155349b645be merging dh warning: conflicts while merging dh! (edit, then use 'hg resolve --mark') 0 files updated, 0 files merged, 0 files removed, 1 files unresolved @@ -587,10 +587,10 @@ public $ hg evolve --content-divergent --any - merge:[4] added dh - with: [5] added d + merge:[5] added d + with: [4] added dh base: [3] added d - rebasing "divergent" content-divergent changeset 67b19bbd770f on 155349b645be + rebasing "other" content-divergent changeset 67b19bbd770f on 155349b645be merging c warning: conflicts while merging c! (edit, then use 'hg resolve --mark') unresolved merge conflicts
--- a/tests/test-evolve-public-content-divergent-main.t Thu Apr 22 20:51:46 2021 +0800 +++ b/tests/test-evolve-public-content-divergent-main.t Fri Apr 23 11:55:42 2021 +0200 @@ -353,10 +353,10 @@ public $ hg evolve --content-divergent --any --update - merge:[4] added d c e - with: [5] added d + merge:[5] added d + with: [4] added d c e base: [3] added d - rebasing "divergent" content-divergent changeset f31bcc378766 on 155349b645be + rebasing "other" content-divergent changeset f31bcc378766 on 155349b645be merging c warning: conflicts while merging c! (edit, then use 'hg resolve --mark') unresolved merge conflicts @@ -483,10 +483,10 @@ public $ hg evolve --content-divergent --any - merge:[4] added d - with: [5] added d + merge:[5] added d + with: [4] added d base: [3] added d - rebasing "divergent" content-divergent changeset 9411ad1fe615 on 155349b645be + rebasing "other" content-divergent changeset 9411ad1fe615 on 155349b645be merging d warning: conflicts while merging d! (edit, then use 'hg resolve --mark') 0 files updated, 0 files merged, 0 files removed, 1 files unresolved @@ -576,10 +576,10 @@ public $ hg evolve --content-divergent --any - merge:[4] added c e - with: [5] added d + merge:[5] added d + with: [4] added c e base: [3] added d - rebasing "divergent" content-divergent changeset 3c17c7afaf6e on 155349b645be + rebasing "other" content-divergent changeset 3c17c7afaf6e on 155349b645be merging c warning: conflicts while merging c! (edit, then use 'hg resolve --mark') unresolved merge conflicts