Show More
@@ -502,7 +502,8 b' def dorecord(ui, repo, commitfunc, cmdsu' | |||||
502 | cmdsuggest) |
|
502 | cmdsuggest) | |
503 |
|
503 | |||
504 | # make sure username is set before going interactive |
|
504 | # make sure username is set before going interactive | |
505 | ui.username() |
|
505 | if not opts.get('user'): | |
|
506 | ui.username() # raise exception, username not provided | |||
506 |
|
507 | |||
507 | def recordfunc(ui, repo, message, match, opts): |
|
508 | def recordfunc(ui, repo, message, match, opts): | |
508 | """This is generic record driver. |
|
509 | """This is generic record driver. |
@@ -1277,5 +1277,25 b' Ignore win32text deprecation warning for' | |||||
1277 | c |
|
1277 | c | |
1278 | +d |
|
1278 | +d | |
1279 |
|
1279 | |||
|
1280 | Test --user when ui.username not set | |||
|
1281 | $ unset HGUSER | |||
|
1282 | $ echo e >> subdir/f1 | |||
|
1283 | $ hg record --config ui.username= -d '8 0' --user xyz -m "user flag" <<EOF | |||
|
1284 | > y | |||
|
1285 | > y | |||
|
1286 | > EOF | |||
|
1287 | diff --git a/subdir/f1 b/subdir/f1 | |||
|
1288 | 1 hunks, 1 lines changed | |||
|
1289 | examine changes to 'subdir/f1'? [Ynesfdaq?] | |||
|
1290 | @@ -4,3 +4,4 @@ | |||
|
1291 | b | |||
|
1292 | c | |||
|
1293 | d | |||
|
1294 | +e | |||
|
1295 | record this change to 'subdir/f1'? [Ynesfdaq?] | |||
|
1296 | $ hg log --template '{author}\n' -l 1 | |||
|
1297 | xyz | |||
|
1298 | $ HGUSER="test" | |||
|
1299 | $ export HGUSER | |||
1280 |
|
1300 | |||
1281 |
$ |
|
1301 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now