changeset 5859:1bd2c4f147e1

branching: merge stable into default
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Sun, 28 Mar 2021 10:20:34 +0200
parents 22f4ebf3f7d8 (diff) 5e62f3db141f (current diff)
children 04a1713c9ef5
files tests/test-discovery-obshashrange.t
diffstat 13 files changed, 65 insertions(+), 83 deletions(-) [+]
line wrap: on
line diff
--- a/CHANGELOG	Fri Mar 19 15:52:00 2021 +0800
+++ b/CHANGELOG	Sun Mar 28 10:20:34 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	Fri Mar 19 15:52:00 2021 +0800
+++ b/hgext3rd/evolve/evolvecmd.py	Sun Mar 28 10:20:34 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	Fri Mar 19 15:52:00 2021 +0800
+++ b/hgext3rd/evolve/metadata.py	Sun Mar 28 10:20:34 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/serverminitopic.py	Fri Mar 19 15:52:00 2021 +0800
+++ b/hgext3rd/serverminitopic.py	Sun Mar 28 10:20:34 2021 +0200
@@ -167,8 +167,12 @@
         else:
             # hg <= 4.9 (624d6683c705+b137a6793c51)
             _entries = self
-        new = self.__class__(_entries, self.tipnode, self.tiprev,
-                             self.filteredhash, self._closednodes)
+        args = (_entries, self.tipnode, self.tiprev, self.filteredhash,
+                self._closednodes)
+        if util.safehasattr(self, '_repo'):
+            # hg <= 5.7 (6266d19556ad)
+            args = (self._repo,) + args
+        new = self.__class__(*args)
         new.phaseshash = self.phaseshash
         return new
 
--- a/hgext3rd/topic/__init__.py	Fri Mar 19 15:52:00 2021 +0800
+++ b/hgext3rd/topic/__init__.py	Sun Mar 28 10:20:34 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/hgext3rd/topic/topicmap.py	Fri Mar 19 15:52:00 2021 +0800
+++ b/hgext3rd/topic/topicmap.py	Sun Mar 28 10:20:34 2021 +0200
@@ -173,8 +173,12 @@
         else:
             # hg <= 4.9 (624d6683c705+b137a6793c51)
             _entries = self
-        new = self.__class__(_entries, self.tipnode, self.tiprev,
-                             self.filteredhash, self._closednodes)
+        args = (_entries, self.tipnode, self.tiprev, self.filteredhash,
+                self._closednodes)
+        if util.safehasattr(self, '_repo'):
+            # hg <= 5.7 (6266d19556ad)
+            args = (self._repo,) + args
+        new = self.__class__(*args)
         new.phaseshash = self.phaseshash
         return new
 
--- a/tests/test-discovery-obshashrange.t	Fri Mar 19 15:52:00 2021 +0800
+++ b/tests/test-discovery-obshashrange.t	Sun Mar 28 10:20:34 2021 +0200
@@ -318,7 +318,7 @@
   * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> sending hello command (glob)
   * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> sending between command (glob)
   * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> remote: * (glob)
-  * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> remote: capabilities: _evoext_getbundle_obscommon _evoext_obshashrange_v1 batch branchmap bundle2=HG20%0Abookmarks%0Achangegroup%3D01%2C02%0Acheckheads%3Drelated%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Aobsmarkers%3DV0%2CV1%0Aphases%3Dheads%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps%0Arev-branch-cache%0Astream%3Dv2 changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (glob)
+  * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> remote: capabilities: _evoext_getbundle_obscommon _evoext_obshashrange_v1 batch branchmap bundle2=HG20%0Abookmarks%0Achangegroup%3D01%2C02%0Acheckheads%3Drelated%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Aobsmarkers%3DV0%2CV1%0Aphases%3Dheads%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps%0Astream%3Dv2 changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (glob)
   * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> remote: 1 (glob)
   * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> sending protocaps command (glob)
   * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> query 1; heads (glob)
--- a/tests/test-evolve-interrupted.t	Fri Mar 19 15:52:00 2021 +0800
+++ b/tests/test-evolve-interrupted.t	Sun Mar 28 10:20:34 2021 +0200
@@ -48,7 +48,7 @@
   transaction abort!
   rollback completed
   abort: precommit hook exited with status 1
-  [255]
+  [40]
   $ hg l
   @  2 apricot and blueberry
   
@@ -107,7 +107,7 @@
   transaction abort!
   rollback completed
   abort: precommit hook exited with status 1
-  [255]
+  [40]
   $ cat b
   banana
   $ hg evolve --stop
@@ -132,7 +132,7 @@
   transaction abort!
   rollback completed
   abort: precommit hook exited with status 1
-  [255]
+  [40]
   $ hg evolve --continue
   evolving 1:e0486f65907d "banana"
   working directory is now at bd5ec7dfc2af
--- a/tests/test-evolve-public-content-divergent-corner-cases.t	Fri Mar 19 15:52:00 2021 +0800
+++ b/tests/test-evolve-public-content-divergent-corner-cases.t	Sun Mar 28 10:20:34 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	Fri Mar 19 15:52:00 2021 +0800
+++ b/tests/test-evolve-public-content-divergent-discard.t	Sun Mar 28 10:20:34 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	Fri Mar 19 15:52:00 2021 +0800
+++ b/tests/test-evolve-public-content-divergent-main.t	Sun Mar 28 10:20:34 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
--- a/tests/test-prev-next.t	Fri Mar 19 15:52:00 2021 +0800
+++ b/tests/test-prev-next.t	Sun Mar 28 10:20:34 2021 +0200
@@ -431,7 +431,7 @@
   $ hg prev
   abort: conflicting changes
   (do you want --merge?)
-  [255]
+  [20]
 
   $ echo hi > bar
   $ hg prev
@@ -443,7 +443,7 @@
   $ hg next
   abort: conflicting changes
   (do you want --merge?)
-  [255]
+  [20]
 
 Test that --merge still works fine with commands.update.check set
 
@@ -454,7 +454,7 @@
   $ hg next
   abort: conflicting changes
   (do you want --merge?)
-  [255]
+  [20]
   $ hg next --merge
   merging bar
   warning: conflicts while merging bar! (edit, then use 'hg resolve --mark')
--- a/tests/test-pullbundle.t	Fri Mar 19 15:52:00 2021 +0800
+++ b/tests/test-pullbundle.t	Sun Mar 28 10:20:34 2021 +0200
@@ -40,7 +40,7 @@
   16 changesets found
   2 changesets found
   1 changesets found
-  bundle2-output-bundle: "HG20", 8 parts total
+  bundle2-output-bundle: "HG20", 7 parts total
   bundle2-output: start emission of HG20 stream
   bundle2-output: bundle parameter: 
   bundle2-output: start of parts
@@ -91,12 +91,6 @@
   bundle2-output: header chunk size: 18
   bundle2-output: payload chunk size: 24
   bundle2-output: closing payload chunk
-  bundle2-output: bundle part: "cache:rev-branch-cache"
-  bundle2-output-part: "cache:rev-branch-cache" (advisory) streamed payload
-  bundle2-output: part 7: "cache:rev-branch-cache"
-  bundle2-output: header chunk size: 29
-  bundle2-output: payload chunk size: 24719
-  bundle2-output: closing payload chunk
   bundle2-output: end of bundle
   bundle2-input: start processing of HG20 stream
   bundle2-input: reading bundle2 stream parameters
@@ -188,18 +182,9 @@
   bundle2-input: payload chunk size: 24
   bundle2-input: payload chunk size: 0
   bundle2-input-part: total payload size 24
-  bundle2-input: part header size: 29
-  bundle2-input: part type: "cache:rev-branch-cache"
-  bundle2-input: part id: "7"
-  bundle2-input: part parameters: 0
-  bundle2-input: found a handler for part cache:rev-branch-cache
-  bundle2-input-part: "cache:rev-branch-cache" (advisory) supported
-  bundle2-input: payload chunk size: 24719
-  bundle2-input: payload chunk size: 0
-  bundle2-input-part: total payload size 24719
   bundle2-input: part header size: 0
   bundle2-input: end of bundle2 stream
-  bundle2-input-bundle: 8 parts total
+  bundle2-input-bundle: 7 parts total
   checking for updated bookmarks
   updating the branch cache
   added 1235 changesets with 0 changes to 0 files