Mercurial > evolve
changeset 5908:e24bdf74cf83
branching: merge with stable
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Sun, 25 Apr 2021 23:52:29 +0800 |
parents | 04a1713c9ef5 (diff) 355bd0f7354b (current diff) |
children | efdbbced2374 |
files | CHANGELOG hgext3rd/evolve/metadata.py hgext3rd/topic/__init__.py |
diffstat | 6 files changed, 44 insertions(+), 55 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext3rd/evolve/evolvecmd.py Sun Apr 25 23:50:21 2021 +0800 +++ b/hgext3rd/evolve/evolvecmd.py Sun Apr 25 23:52:29 2021 +0800 @@ -301,7 +301,7 @@ ui.write_err(hint) return (False, b".") - if not (divergent.mutable() and other.mutable()): + if not divergent.mutable(): # Public divergence: we keep public one to local side while merging # When public branch is behind to the mutable branch, for now we # relocate mutable cset to public one's side in every case. @@ -311,9 +311,8 @@ # # Otherwise, we are going to rebase the "behind" branch up to the new # brancmap level. - publicdiv = divergent if other.mutable() else other - resolutionparent = publicdiv.p1().rev() - evolvestate[b'public-divergent'] = publicdiv.node() + resolutionparent = divergent.p1().rev() + evolvestate[b'public-divergent'] = divergent.node() return (True, resolutionparent) otherp1 = succsotherp1 = other.p1().rev() @@ -448,10 +447,12 @@ ui.write_err(msg) return (False, b".") other = others[0] + evolvestate[b'orig-divergent'] = divergent.node() + if not other.mutable(): + divergent, other = other, divergent evolvestate[b'divergent'] = divergent.node() evolvestate[b'other-divergent'] = other.node() evolvestate[b'base'] = base.node() - evolvestate[b'orig-divergent'] = divergent.node() # sometimes we will relocate a node in case of different parents and we can # encounter conflicts after relocation is done while solving @@ -532,10 +533,7 @@ evolvestate[b'other-divergent'] = newother other = repo[newother] - localside, otherside = divergent, other - if not otherside.mutable(): - localside, otherside = other, divergent - _mergecontentdivergents(repo, progresscb, localside, otherside, base, + _mergecontentdivergents(repo, progresscb, divergent, other, base, evolvestate) res, newnode = _completecontentdivergent(ui, repo, progresscb, divergent, other, base, evolvestate) @@ -556,7 +554,7 @@ if newnode == publicdiv.node(): # case 2) pubstr = bytes(publicdiv) - othstr = bytes(otherside) + othstr = bytes(other) msg = _(b'content divergence resolution between %s ' b'(public) and %s has same content as %s, ' b'discarding %s\n') @@ -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 Sun Apr 25 23:50:21 2021 +0800 +++ b/hgext3rd/evolve/metadata.py Sun Apr 25 23:52:29 2021 +0800 @@ -5,7 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. -__version__ = b'10.3.2.dev' -testedwith = b'4.6.2 4.7 4.8 4.9 5.0 5.1 5.2 5.3 5.4 5.5 5.6 5.7 5.8' +__version__ = b'10.4.0.dev' +testedwith = b'4.6.2 4.7 4.8 4.9 5.0 5.1 5.2 5.3 5.4 5.5 5.6 5.7' minimumhgversion = b'4.6' buglink = b'https://bz.mercurial-scm.org/'
--- a/hgext3rd/topic/__init__.py Sun Apr 25 23:50:21 2021 +0800 +++ b/hgext3rd/topic/__init__.py Sun Apr 25 23:52:29 2021 +0800 @@ -232,9 +232,9 @@ b'topic.active': b'green', } -__version__ = b'0.22.2.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' +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/tests/test-evolve-public-content-divergent-corner-cases.t Sun Apr 25 23:50:21 2021 +0800 +++ b/tests/test-evolve-public-content-divergent-corner-cases.t Sun Apr 25 23:52:29 2021 +0800 @@ -388,10 +388,10 @@ $ hg evolve --content-divergent --any --update - merge:[4] added c e - with: [5] added d + merge:[5] added d + with: [4] added c e base: [3] added d - rebasing "divergent" content-divergent changeset e568fd1029bb on 155349b645be + rebasing "other" content-divergent changeset e568fd1029bb on 155349b645be merging c warning: conflicts while merging c! (edit, then use 'hg resolve --mark') unresolved merge conflicts
--- a/tests/test-evolve-public-content-divergent-discard.t Sun Apr 25 23:50:21 2021 +0800 +++ b/tests/test-evolve-public-content-divergent-discard.t Sun Apr 25 23:52:29 2021 +0800 @@ -89,8 +89,8 @@ public $ hg evolve --content-divergent --any - merge:[3] added ch - with: [4] added c + merge:[4] added c + with: [3] added ch base: [2] added c 0 files updated, 0 files merged, 0 files removed, 0 files unresolved other divergent changeset 90522bccf499 has same content as local f7c1071f1e7c and differs by "description" only, discarding 90522bccf499 @@ -180,10 +180,10 @@ public $ hg evolve --content-divergent --any - merge:[4] added dh - with: [5] added d + merge:[5] added d + with: [4] added dh base: [3] added d - rebasing "divergent" content-divergent changeset 5acd58ef5066 on 155349b645be + rebasing "other" content-divergent changeset 5acd58ef5066 on 155349b645be 0 files updated, 0 files merged, 0 files removed, 0 files unresolved other divergent changeset ae3429430ef1 has same content as local e800202333a4 and differs by "description" only, discarding ae3429430ef1 content divergence resolution between e800202333a4 (public) and ae3429430ef1 has same content as e800202333a4, discarding ae3429430ef1 @@ -265,8 +265,8 @@ public $ hg evolve --content-divergent --any - merge:[3] added ch - with: [4] added c + merge:[4] added c + with: [3] added ch base: [2] added c merging ch warning: conflicts while merging ch! (edit, then use 'hg resolve --mark') @@ -379,10 +379,10 @@ public $ hg evolve --content-divergent --any - merge:[4] added dh - with: [5] added d + merge:[5] added d + with: [4] added dh base: [3] added d - rebasing "divergent" content-divergent changeset f89a8e2f86ac on 155349b645be + rebasing "other" content-divergent changeset f89a8e2f86ac on 155349b645be merging c warning: conflicts while merging c! (edit, then use 'hg resolve --mark') unresolved merge conflicts @@ -483,10 +483,10 @@ public $ hg evolve --content-divergent --any - merge:[4] added dh - with: [5] added d + merge:[5] added d + with: [4] added dh base: [3] added d - rebasing "divergent" content-divergent changeset db0b7bba0aae on 155349b645be + rebasing "other" content-divergent changeset db0b7bba0aae on 155349b645be merging dh warning: conflicts while merging dh! (edit, then use 'hg resolve --mark') 0 files updated, 0 files merged, 0 files removed, 1 files unresolved @@ -587,10 +587,10 @@ public $ hg evolve --content-divergent --any - merge:[4] added dh - with: [5] added d + merge:[5] added d + with: [4] added dh base: [3] added d - rebasing "divergent" content-divergent changeset 67b19bbd770f on 155349b645be + rebasing "other" content-divergent changeset 67b19bbd770f on 155349b645be merging c warning: conflicts while merging c! (edit, then use 'hg resolve --mark') unresolved merge conflicts
--- a/tests/test-evolve-public-content-divergent-main.t Sun Apr 25 23:50:21 2021 +0800 +++ b/tests/test-evolve-public-content-divergent-main.t Sun Apr 25 23:52:29 2021 +0800 @@ -353,10 +353,10 @@ public $ hg evolve --content-divergent --any --update - merge:[4] added d c e - with: [5] added d + merge:[5] added d + with: [4] added d c e base: [3] added d - rebasing "divergent" content-divergent changeset f31bcc378766 on 155349b645be + rebasing "other" content-divergent changeset f31bcc378766 on 155349b645be merging c warning: conflicts while merging c! (edit, then use 'hg resolve --mark') unresolved merge conflicts @@ -483,10 +483,10 @@ public $ hg evolve --content-divergent --any - merge:[4] added d - with: [5] added d + merge:[5] added d + with: [4] added d base: [3] added d - rebasing "divergent" content-divergent changeset 9411ad1fe615 on 155349b645be + rebasing "other" content-divergent changeset 9411ad1fe615 on 155349b645be merging d warning: conflicts while merging d! (edit, then use 'hg resolve --mark') 0 files updated, 0 files merged, 0 files removed, 1 files unresolved @@ -576,10 +576,10 @@ public $ hg evolve --content-divergent --any - merge:[4] added c e - with: [5] added d + merge:[5] added d + with: [4] added c e base: [3] added d - rebasing "divergent" content-divergent changeset 3c17c7afaf6e on 155349b645be + rebasing "other" content-divergent changeset 3c17c7afaf6e on 155349b645be merging c warning: conflicts while merging c! (edit, then use 'hg resolve --mark') unresolved merge conflicts