changeset 6379:c5848d8b664d

tests: make sure we properly store branch name in commit extras
author Anton Shestakov <av6@dwimlabs.net>
date Tue, 03 Jan 2023 15:58:51 +0400
parents 7089675fe6d3
children 130ad27064bc
files tests/test-split.t tests/test-stack-branch.t
diffstat 2 files changed, 14 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-split.t	Thu Dec 22 16:54:36 2022 +0400
+++ b/tests/test-split.t	Tue Jan 03 15:58:51 2023 +0400
@@ -489,6 +489,12 @@
   $ hg topic
    * mytopic (2 changesets)
 
+Check commit extras
+
+  $ hg log -r "tip~1::" -T '{rev}: {join(extras, " ")}\n'
+  19: branch=double//slash topic=mytopic
+  20: branch=double//slash topic=mytopic
+
 Test split the first commit on a branch
 
   $ touch SPLIT1 SPLIT2
--- a/tests/test-stack-branch.t	Thu Dec 22 16:54:36 2022 +0400
+++ b/tests/test-stack-branch.t	Tue Jan 03 15:58:51 2023 +0400
@@ -49,6 +49,14 @@
   o  0 double//slash {} draft c_a
   
 
+Commit extras have branch name without formatting
+-------------------------------------------------
+
+  $ hg log -r 1 -T '{rev}: {join(extras, " ")}\n'
+  1: branch=double//slash
+  $ hg log -r 5 -T '{rev}: {join(extras, " ")}\n'
+  5: branch=foo//bar
+
 Check that topic without any parent does not crash --list
 ---------------------------------------------------------