diff tests/test-evolve.t @ 5695:8c7de8f8bb42

evolve: respect command-templates.oneline-summary if configured Mercurial has a new `command-templates.oneline-summary` config that is respected by `hg rebase`, `hg phabsend`, and the bundled version of `hg split`. This patch makes `hg evolve` also respect it. Unlike the upstream commands, I let `hg evolve` use the existing template by default. The reason I didn't change the default is that we have a different template when topics are enabled and it's unclear how that should work with the default from upstream. So at least for now, the user will have to explicitly set the new config if they want it to apply to `hg evolve`.
author Martin von Zweigbergk <martinvonz@google.com>
date Fri, 30 Oct 2020 13:42:51 -0700
parents e5d91fd1f319
children bf8638b5c526
line wrap: on
line diff
--- a/tests/test-evolve.t	Thu Oct 29 15:11:20 2020 -0700
+++ b/tests/test-evolve.t	Fri Oct 30 13:42:51 2020 -0700
@@ -460,6 +460,23 @@
 
 (/ninja)
 
+command-templates.oneline-summary is respected when evolving orphan
+
+  $ hg evolve -n --config 'command-templates.oneline-summary = custom {rev} {desc}'
+  move:custom 8 dansk 2!
+  atop:custom 10 dansk!
+  hg rebase -r 569625323d3e -d 9975c016fe7b
+  skipping 8163b3ed62c7, consider including orphan ancestors
+
+command-templates.oneline-summary is respected when evolving/updating working copy
+
+  $ hg co -q 7
+  working directory parent is obsolete! (aca219761afb)
+  $ hg evolve --no-all --config 'command-templates.oneline-summary = custom {rev} {desc}'
+  update:custom 10 dansk!
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  working directory is now at 9975c016fe7b
+
   $ hg evolve --all --traceback
   move:[8] dansk 2!
   atop:[10] dansk!