Show More
@@ -502,7 +502,8 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. |
@@ -2,6 +2,13 This code uses the ast module, which was | |||||
2 | this test on anything earlier. |
|
2 | this test on anything earlier. | |
3 | $ python -c 'import sys ; assert sys.version_info >= (2, 6)' || exit 80 |
|
3 | $ python -c 'import sys ; assert sys.version_info >= (2, 6)' || exit 80 | |
4 |
|
4 | |||
|
5 | Virtualenv has a habit of leaving BaseHTTPServer and other modules in | |||
|
6 | a place where the import checker is confused about their nature as | |||
|
7 | part of the stdlib. Skip the test if BaseHTTPServer's path isn't a | |||
|
8 | subpath of sys.prefix. | |||
|
9 | ||||
|
10 | $ python -c 'import sys, BaseHTTPServer; assert BaseHTTPServer.__file__.startswith(sys.prefix)' || exit 80 | |||
|
11 | ||||
5 | $ import_checker="$TESTDIR"/../contrib/import-checker.py |
|
12 | $ import_checker="$TESTDIR"/../contrib/import-checker.py | |
6 | Run the doctests from the import checker, and make sure |
|
13 | Run the doctests from the import checker, and make sure | |
7 | it's working correctly. |
|
14 | it's working correctly. |
@@ -1277,5 +1277,25 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