changeset 42076:f46c1a9b1bfe

tests: add test of for hash reference translation by `hg convert` The convert extension translates commit references in the commit message. We didn't have any explicit testing of this before, so let's add a test. Differential Revision: https://phab.mercurial-scm.org/D6212
author Martin von Zweigbergk <martinvonz@google.com>
date Fri, 05 Apr 2019 11:08:17 -0700
parents 456c37433c43
children b8c2dc367cc3
files tests/test-convert-hg-source.t
diffstat 1 files changed, 16 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-convert-hg-source.t	Fri Apr 05 18:36:43 2019 -0400
+++ b/tests/test-convert-hg-source.t	Fri Apr 05 11:08:17 2019 -0700
@@ -206,3 +206,19 @@
   a
   c
   d
+  $ cd ..
+
+  $ hg init commit-references
+  $ cd commit-references
+  $ echo a > a
+  $ hg ci -Aqm initial
+  $ echo b > b
+  $ hg ci -Aqm 'the previous commit was 1451231c8757'
+
+  $ cd ..
+  $ hg convert commit-references new-commit-references -q \
+  >     --config convert.hg.sourcename=yes
+  $ cd new-commit-references
+  $ hg log -T '{node|short} {desc}\n'
+  642508659503 the previous commit was c2491f685436
+  c2491f685436 initial