Show More
@@ -14,9 +14,6 b' def testdispatch(cmd):' | |||
|
14 | 14 | result = dispatch.dispatch(req) |
|
15 | 15 | print("result: %r" % (result,)) |
|
16 | 16 | |
|
17 | testdispatch("init test1") | |
|
18 | os.chdir('test1') | |
|
19 | ||
|
20 | 17 | # create file 'foo', add and commit |
|
21 | 18 | f = open('foo', 'wb') |
|
22 | 19 | f.write('foo\n') |
@@ -28,6 +25,10 b' testdispatch("commit -m commit1 -d 2000-' | |||
|
28 | 25 | f = open('foo', 'ab') |
|
29 | 26 | f.write('bar\n') |
|
30 | 27 | f.close() |
|
28 | # remove blackbox.log directory (proxy for readonly log file) | |
|
29 | os.rmdir(".hg/blackbox.log") | |
|
30 | # replace it with the real blackbox.log file | |
|
31 | os.rename(".hg/blackbox.log-", ".hg/blackbox.log") | |
|
31 | 32 | testdispatch("commit -m commit2 -d 2000-01-02 foo") |
|
32 | 33 | |
|
33 | 34 | # check 88803a69b24 (fancyopts modified command table) |
@@ -157,7 +157,7 b' log rotation' | |||
|
157 | 157 | $ sed -e 's/\(.*test1.*\)/#\1/; s#\(.*commit2.*\)#os.rmdir(".hg/blackbox.log")\ |
|
158 | 158 | > os.rename(".hg/blackbox.log-", ".hg/blackbox.log")\ |
|
159 | 159 | > \1#' $TESTDIR/test-dispatch.py > ../test-dispatch.py |
|
160 |
$ python |
|
|
160 | $ python $TESTDIR/blackbox-readonly-dispatch.py | |
|
161 | 161 | running: add foo |
|
162 | 162 | result: 0 |
|
163 | 163 | running: commit -m commit1 -d 2000-01-01 foo |
General Comments 0
You need to be logged in to leave comments.
Login now