test-amend: add a test for amend with no configured username (issue4211)
authorMatt Harbison <matt_harbison@yahoo.com>
Tue, 28 Oct 2014 23:18:56 -0400
changeset 1142 9d85fd6e1474
parent 1141 ca17770d2ee9
child 1143 160fd06312fc
test-amend: add a test for amend with no configured username (issue4211)
tests/test-amend.t
--- a/tests/test-amend.t	Sat Nov 01 13:48:34 2014 +0000
+++ b/tests/test-amend.t	Tue Oct 28 23:18:56 2014 -0400
@@ -103,3 +103,16 @@
   $ hg amend -l logfile.txt
   $ hg log -r . -T "{desc}\n"
   logfile message
+
+# Make sure we don't get reparented to -1 with no username (issue4211)
+  $ HGUSER=
+  $ hg amend -e --config ui.username= -m "empty user"
+  abort: no username supplied
+  (use "hg config --edit" to set your username)
+  [255]
+  $ hg sum
+  parent: 8:* tip (glob)
+   logfile message
+  branch: foo
+  commit: 1 unknown (clean)
+  update: (current)