Show More
@@ -130,6 +130,11 b' def wrapui(ui):' | |||||
130 | def track(self): |
|
130 | def track(self): | |
131 | return self.configlist('blackbox', 'track') |
|
131 | return self.configlist('blackbox', 'track') | |
132 |
|
132 | |||
|
133 | def debug(self, *msg, **opts): | |||
|
134 | super(blackboxui, self).debug(*msg, **opts) | |||
|
135 | if self.debugflag: | |||
|
136 | self.log('debug', '%s', ''.join(*msg)) | |||
|
137 | ||||
133 | def log(self, event, *msg, **opts): |
|
138 | def log(self, event, *msg, **opts): | |
134 | global lastui |
|
139 | global lastui | |
135 | super(blackboxui, self).log(event, *msg, **opts) |
|
140 | super(blackboxui, self).log(event, *msg, **opts) |
@@ -18,8 +18,8 b' def testdispatch(cmd):' | |||||
18 | f = open('foo', 'wb') |
|
18 | f = open('foo', 'wb') | |
19 | f.write('foo\n') |
|
19 | f.write('foo\n') | |
20 | f.close() |
|
20 | f.close() | |
21 | testdispatch("add foo") |
|
21 | testdispatch("--debug add foo") | |
22 | testdispatch("commit -m commit1 -d 2000-01-01 foo") |
|
22 | testdispatch("--debug commit -m commit1 -d 2000-01-01 foo") | |
23 |
|
23 | |||
24 | # append to file 'foo' and commit |
|
24 | # append to file 'foo' and commit | |
25 | f = open('foo', 'ab') |
|
25 | f = open('foo', 'ab') | |
@@ -29,8 +29,8 b' f.close()' | |||||
29 | os.rmdir(".hg/blackbox.log") |
|
29 | os.rmdir(".hg/blackbox.log") | |
30 | # replace it with the real blackbox.log file |
|
30 | # replace it with the real blackbox.log file | |
31 | os.rename(".hg/blackbox.log-", ".hg/blackbox.log") |
|
31 | os.rename(".hg/blackbox.log-", ".hg/blackbox.log") | |
32 | testdispatch("commit -m commit2 -d 2000-01-02 foo") |
|
32 | testdispatch("--debug commit -m commit2 -d 2000-01-02 foo") | |
33 |
|
33 | |||
34 | # check 88803a69b24 (fancyopts modified command table) |
|
34 | # check 88803a69b24 (fancyopts modified command table) | |
35 | testdispatch("log -r 0") |
|
35 | testdispatch("--debug log -r 0") | |
36 | testdispatch("log -r tip") |
|
36 | testdispatch("--debug log -r tip") |
@@ -193,37 +193,68 b' log rotation' | |||||
193 | > os.rename(".hg/blackbox.log-", ".hg/blackbox.log")\ |
|
193 | > os.rename(".hg/blackbox.log-", ".hg/blackbox.log")\ | |
194 | > \1#' $TESTDIR/test-dispatch.py > ../test-dispatch.py |
|
194 | > \1#' $TESTDIR/test-dispatch.py > ../test-dispatch.py | |
195 | $ $PYTHON $TESTDIR/blackbox-readonly-dispatch.py |
|
195 | $ $PYTHON $TESTDIR/blackbox-readonly-dispatch.py | |
196 | running: add foo |
|
196 | running: --debug add foo | |
|
197 | warning: cannot write to blackbox.log: Is a directory | |||
|
198 | adding foo | |||
197 | result: 0 |
|
199 | result: 0 | |
198 | running: commit -m commit1 -d 2000-01-01 foo |
|
200 | running: --debug commit -m commit1 -d 2000-01-01 foo | |
|
201 | warning: cannot write to blackbox.log: Is a directory | |||
|
202 | committing files: | |||
|
203 | foo | |||
|
204 | committing manifest | |||
|
205 | committing changelog | |||
|
206 | updating the branch cache | |||
|
207 | committed changeset 0:0e46349438790c460c5c9f7546bfcd39b267bbd2 | |||
199 | result: None |
|
208 | result: None | |
200 | running: commit -m commit2 -d 2000-01-02 foo |
|
209 | running: --debug commit -m commit2 -d 2000-01-02 foo | |
|
210 | committing files: | |||
|
211 | foo | |||
|
212 | committing manifest | |||
|
213 | committing changelog | |||
|
214 | updating the branch cache | |||
|
215 | committed changeset 1:45589e459b2edfbf3dbde7e01f611d2c1e7453d7 | |||
201 | result: None |
|
216 | result: None | |
202 | running: log -r 0 |
|
217 | running: --debug log -r 0 | |
203 | changeset: 0:0e4634943879 |
|
218 | changeset: 0:0e46349438790c460c5c9f7546bfcd39b267bbd2 | |
|
219 | phase: draft | |||
|
220 | parent: -1:0000000000000000000000000000000000000000 | |||
|
221 | parent: -1:0000000000000000000000000000000000000000 | |||
|
222 | manifest: 0:9091aa5df980aea60860a2e39c95182e68d1ddec | |||
204 | user: test |
|
223 | user: test | |
205 | date: Sat Jan 01 00:00:00 2000 +0000 |
|
224 | date: Sat Jan 01 00:00:00 2000 +0000 | |
206 | summary: commit1 |
|
225 | files+: foo | |
|
226 | extra: branch=default | |||
|
227 | description: | |||
|
228 | commit1 | |||
|
229 | ||||
207 |
|
230 | |||
208 | result: None |
|
231 | result: None | |
209 | running: log -r tip |
|
232 | running: --debug log -r tip | |
210 | changeset: 1:45589e459b2e |
|
233 | changeset: 1:45589e459b2edfbf3dbde7e01f611d2c1e7453d7 | |
211 | tag: tip |
|
234 | tag: tip | |
|
235 | phase: draft | |||
|
236 | parent: 0:0e46349438790c460c5c9f7546bfcd39b267bbd2 | |||
|
237 | parent: -1:0000000000000000000000000000000000000000 | |||
|
238 | manifest: 1:895aa9b7886f89dd017a6d62524e1f9180b04df9 | |||
212 | user: test |
|
239 | user: test | |
213 | date: Sun Jan 02 00:00:00 2000 +0000 |
|
240 | date: Sun Jan 02 00:00:00 2000 +0000 | |
214 | summary: commit2 |
|
241 | files: foo | |
|
242 | extra: branch=default | |||
|
243 | description: | |||
|
244 | commit2 | |||
|
245 | ||||
215 |
|
246 | |||
216 | result: None |
|
247 | result: None | |
217 | $ hg blackbox |
|
248 | $ hg blackbox | |
218 | 1970/01/01 00:00:00 bob @0e46349438790c460c5c9f7546bfcd39b267bbd2 (5000)> commit -m commit2 -d 2000-01-02 foo |
|
249 | 1970/01/01 00:00:00 bob @45589e459b2edfbf3dbde7e01f611d2c1e7453d7 (5000)> updating the branch cache | |
219 | 1970/01/01 00:00:00 bob @45589e459b2edfbf3dbde7e01f611d2c1e7453d7 (5000)> updated served branch cache in * seconds (glob) |
|
250 | 1970/01/01 00:00:00 bob @45589e459b2edfbf3dbde7e01f611d2c1e7453d7 (5000)> updated served branch cache in * seconds (glob) | |
220 | 1970/01/01 00:00:00 bob @45589e459b2edfbf3dbde7e01f611d2c1e7453d7 (5000)> wrote served branch cache with 1 labels and 1 nodes |
|
251 | 1970/01/01 00:00:00 bob @45589e459b2edfbf3dbde7e01f611d2c1e7453d7 (5000)> wrote served branch cache with 1 labels and 1 nodes | |
221 | 1970/01/01 00:00:00 bob @45589e459b2edfbf3dbde7e01f611d2c1e7453d7 (5000)> commit -m commit2 -d 2000-01-02 foo exited 0 after * seconds (glob) |
|
252 | 1970/01/01 00:00:00 bob @45589e459b2edfbf3dbde7e01f611d2c1e7453d7 (5000)> --debug commit -m commit2 -d 2000-01-02 foo exited 0 after *.?? seconds (glob) | |
222 | 1970/01/01 00:00:00 bob @45589e459b2edfbf3dbde7e01f611d2c1e7453d7 (5000)> log -r 0 |
|
253 | 1970/01/01 00:00:00 bob @45589e459b2edfbf3dbde7e01f611d2c1e7453d7 (5000)> --debug log -r 0 | |
223 | 1970/01/01 00:00:00 bob @45589e459b2edfbf3dbde7e01f611d2c1e7453d7 (5000)> writing .hg/cache/tags2-visible with 0 tags |
|
254 | 1970/01/01 00:00:00 bob @45589e459b2edfbf3dbde7e01f611d2c1e7453d7 (5000)> writing .hg/cache/tags2-visible with 0 tags | |
224 | 1970/01/01 00:00:00 bob @45589e459b2edfbf3dbde7e01f611d2c1e7453d7 (5000)> log -r 0 exited 0 after * seconds (glob) |
|
255 | 1970/01/01 00:00:00 bob @45589e459b2edfbf3dbde7e01f611d2c1e7453d7 (5000)> --debug log -r 0 exited 0 after *.?? seconds (glob) | |
225 | 1970/01/01 00:00:00 bob @45589e459b2edfbf3dbde7e01f611d2c1e7453d7 (5000)> log -r tip |
|
256 | 1970/01/01 00:00:00 bob @45589e459b2edfbf3dbde7e01f611d2c1e7453d7 (5000)> --debug log -r tip | |
226 | 1970/01/01 00:00:00 bob @45589e459b2edfbf3dbde7e01f611d2c1e7453d7 (5000)> log -r tip exited 0 after * seconds (glob) |
|
257 | 1970/01/01 00:00:00 bob @45589e459b2edfbf3dbde7e01f611d2c1e7453d7 (5000)> --debug log -r tip exited 0 after *.?? seconds (glob) | |
227 | 1970/01/01 00:00:00 bob @45589e459b2edfbf3dbde7e01f611d2c1e7453d7 (5000)> blackbox |
|
258 | 1970/01/01 00:00:00 bob @45589e459b2edfbf3dbde7e01f611d2c1e7453d7 (5000)> blackbox | |
228 |
|
259 | |||
229 | Test log recursion from dirty status check |
|
260 | Test log recursion from dirty status check |
General Comments 0
You need to be logged in to leave comments.
Login now