Patchwork D12020: rebase: set custom conflict label for base commit

login
register
mail settings
Submitter phabricator
Date Jan. 21, 2022, 11:37 p.m.
Message ID <differential-rev-PHID-DREV-pc3muv4wwtwzkspw2dzu-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/50345/
State New
Headers show

Comments

phabricator - Jan. 21, 2022, 11:37 p.m.
martinvonz created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D12020

AFFECTED FILES
  hgext/rebase.py
  tests/test-rebase-collapse.t
  tests/test-rebase-conflicts.t
  tests/test-sparse.t

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/tests/test-sparse.t b/tests/test-sparse.t
--- a/tests/test-sparse.t
+++ b/tests/test-sparse.t
@@ -211,11 +211,11 @@ 
   hide
 
   $ cat hide
-  <<<<<<< dest:   39278f7c08a9 - test: two
+  <<<<<<< dest:             39278f7c08a9 - test: two
   y
   =======
   z
-  >>>>>>> source: b91df4f39e75 - test: edit hide
+  >>>>>>> source:           b91df4f39e75 - test: edit hide
 
 Verify aborting a rebase cleans up temporary files
 
diff --git a/tests/test-rebase-conflicts.t b/tests/test-rebase-conflicts.t
--- a/tests/test-rebase-conflicts.t
+++ b/tests/test-rebase-conflicts.t
@@ -372,13 +372,13 @@ 
   +++ b/a	* (glob)
   @@ -1,2 +1,8 @@
    a
-  +<<<<<<< dest:   328e4ab1f7cc ab - test: ab
+  +<<<<<<< dest:             328e4ab1f7cc ab - test: ab
    b
-  +||||||| base:   cb9a9f314b8b - test: a
+  +||||||| parent of source: cb9a9f314b8b - test: a
   +=======
   +b
   +c
-  +>>>>>>> source: 7bc217434fc1 - test: abc
+  +>>>>>>> source:           7bc217434fc1 - test: abc
 
 Test rebase with obsstore turned on and off (issue5606)
 
diff --git a/tests/test-rebase-collapse.t b/tests/test-rebase-collapse.t
--- a/tests/test-rebase-collapse.t
+++ b/tests/test-rebase-collapse.t
@@ -717,13 +717,13 @@ 
   o  0: 4a2df7238c3b 'A'
   
   $ cat A
-  <<<<<<< dest:   82b8abf9c185 D - test: D
+  <<<<<<< dest:             82b8abf9c185 D - test: D
   D
-  ||||||| base:   4a2df7238c3b A - test: A
+  ||||||| parent of source: 4a2df7238c3b A - test: A
   A
   =======
   B
-  >>>>>>> source: f899f3910ce7 B - test: B
+  >>>>>>> source:           f899f3910ce7 B - test: B
   $ echo BC > A
   $ hg resolve -m
   (no more unresolved files)
@@ -745,13 +745,13 @@ 
   o  0: 4a2df7238c3b 'A'
   
   $ cat A
-  <<<<<<< dest:   82b8abf9c185 D - test: D
+  <<<<<<< dest:             82b8abf9c185 D - test: D
   BC
-  ||||||| base:   f899f3910ce7 B - test: B
+  ||||||| parent of source: f899f3910ce7 B - test: B
   B
   =======
   C
-  >>>>>>> source: 63668d570d21 C tip - test: C
+  >>>>>>> source:           63668d570d21 C tip - test: C
   $ echo BD > A
   $ hg resolve -m
   (no more unresolved files)
diff --git a/hgext/rebase.py b/hgext/rebase.py
--- a/hgext/rebase.py
+++ b/hgext/rebase.py
@@ -1544,7 +1544,7 @@ 
         force=True,
         ancestor=base,
         mergeancestor=mergeancestor,
-        labels=[b'dest', b'source'],
+        labels=[b'dest', b'source', b'parent of source'],
         wc=wctx,
     )
     wctx.setparents(p1ctx.node(), repo[p2].node())