Mercurial > public > mercurial-scm > hg
diff tests/test-record.t @ 20171:a765611e06dc
record: --user/-u now works with record when ui.username not set (issue3857)
The -u flag didn't work when ui.username was not set and resulted in an
abort message. This was fixed by checking for the 'user' key in the opts
dictionary. If the key is present, the step causing the exception is not
executed.
author | Prasoon Shukla <prasoon92.iitr@gmail.com> |
---|---|
date | Thu, 12 Dec 2013 12:25:56 +0530 |
parents | 5e4491c114b2 |
children | 061766323061 |
line wrap: on
line diff
--- a/tests/test-record.t Wed Dec 11 11:33:58 2013 -0600 +++ b/tests/test-record.t Thu Dec 12 12:25:56 2013 +0530 @@ -1277,5 +1277,25 @@ c +d +Test --user when ui.username not set + $ unset HGUSER + $ echo e >> subdir/f1 + $ hg record --config ui.username= -d '8 0' --user xyz -m "user flag" <<EOF + > y + > y + > EOF + diff --git a/subdir/f1 b/subdir/f1 + 1 hunks, 1 lines changed + examine changes to 'subdir/f1'? [Ynesfdaq?] + @@ -4,3 +4,4 @@ + b + c + d + +e + record this change to 'subdir/f1'? [Ynesfdaq?] + $ hg log --template '{author}\n' -l 1 + xyz + $ HGUSER="test" + $ export HGUSER $ cd ..