##// END OF EJS Templates
blackbox: flush output file descriptor...
timeless -
r28025:ab646827 default
parent child Browse files
Show More
@@ -112,6 +112,7 b' def wrapui(ui):'
112 try:
112 try:
113 blackbox.write('%s %s (%s)> %s' %
113 blackbox.write('%s %s (%s)> %s' %
114 (date, user, pid, formattedmsg))
114 (date, user, pid, formattedmsg))
115 blackbox.flush()
115 except IOError as err:
116 except IOError as err:
116 self.debug('warning: cannot write to blackbox.log: %s\n' %
117 self.debug('warning: cannot write to blackbox.log: %s\n' %
117 err.strerror)
118 err.strerror)
@@ -15,6 +15,7 b' command, exit codes, and duration'
15 $ hg blackbox
15 $ hg blackbox
16 1970/01/01 00:00:00 bob (*)> add a (glob)
16 1970/01/01 00:00:00 bob (*)> add a (glob)
17 1970/01/01 00:00:00 bob (*)> add a exited 0 after * seconds (glob)
17 1970/01/01 00:00:00 bob (*)> add a exited 0 after * seconds (glob)
18 1970/01/01 00:00:00 bob (*)> blackbox (glob)
18
19
19 incoming change tracking
20 incoming change tracking
20
21
@@ -43,12 +44,13 b' clone, commit, pull'
43 adding file changes
44 adding file changes
44 added 1 changesets with 1 changes to 1 files
45 added 1 changesets with 1 changes to 1 files
45 (run 'hg update' to get a working copy)
46 (run 'hg update' to get a working copy)
46 $ hg blackbox -l 5
47 $ hg blackbox -l 6
47 1970/01/01 00:00:00 bob (*)> pull (glob)
48 1970/01/01 00:00:00 bob (*)> pull (glob)
48 1970/01/01 00:00:00 bob (*)> updated served branch cache in * seconds (glob)
49 1970/01/01 00:00:00 bob (*)> updated served branch cache in * seconds (glob)
49 1970/01/01 00:00:00 bob (*)> wrote served branch cache with 1 labels and 2 nodes (glob)
50 1970/01/01 00:00:00 bob (*)> wrote served branch cache with 1 labels and 2 nodes (glob)
50 1970/01/01 00:00:00 bob (*)> 1 incoming changes - new heads: d02f48003e62 (glob)
51 1970/01/01 00:00:00 bob (*)> 1 incoming changes - new heads: d02f48003e62 (glob)
51 1970/01/01 00:00:00 bob (*)> pull exited 0 after * seconds (glob)
52 1970/01/01 00:00:00 bob (*)> pull exited 0 after * seconds (glob)
53 1970/01/01 00:00:00 bob (*)> blackbox -l 6 (glob)
52
54
53 we must not cause a failure if we cannot write to the log
55 we must not cause a failure if we cannot write to the log
54
56
@@ -104,12 +106,13 b' backup bundles get logged'
104 $ hg strip tip
106 $ hg strip tip
105 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
107 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
106 saved backup bundle to $TESTTMP/blackboxtest2/.hg/strip-backup/*-backup.hg (glob)
108 saved backup bundle to $TESTTMP/blackboxtest2/.hg/strip-backup/*-backup.hg (glob)
107 $ hg blackbox -l 5
109 $ hg blackbox -l 6
108 1970/01/01 00:00:00 bob (*)> strip tip (glob)
110 1970/01/01 00:00:00 bob (*)> strip tip (glob)
109 1970/01/01 00:00:00 bob (*)> saved backup bundle to $TESTTMP/blackboxtest2/.hg/strip-backup/*-backup.hg (glob)
111 1970/01/01 00:00:00 bob (*)> saved backup bundle to $TESTTMP/blackboxtest2/.hg/strip-backup/*-backup.hg (glob)
110 1970/01/01 00:00:00 bob (*)> updated base branch cache in * seconds (glob)
112 1970/01/01 00:00:00 bob (*)> updated base branch cache in * seconds (glob)
111 1970/01/01 00:00:00 bob (*)> wrote base branch cache with 1 labels and 2 nodes (glob)
113 1970/01/01 00:00:00 bob (*)> wrote base branch cache with 1 labels and 2 nodes (glob)
112 1970/01/01 00:00:00 bob (*)> strip tip exited 0 after * seconds (glob)
114 1970/01/01 00:00:00 bob (*)> strip tip exited 0 after * seconds (glob)
115 1970/01/01 00:00:00 bob (*)> blackbox -l 6 (glob)
113
116
114 extension and python hooks - use the eol extension for a pythonhook
117 extension and python hooks - use the eol extension for a pythonhook
115
118
@@ -120,12 +123,13 b' extension and python hooks - use the eol'
120 $ hg update
123 $ hg update
121 hooked
124 hooked
122 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
125 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
123 $ hg blackbox -l 5
126 $ hg blackbox -l 6
124 1970/01/01 00:00:00 bob (*)> update (glob)
127 1970/01/01 00:00:00 bob (*)> update (glob)
125 1970/01/01 00:00:00 bob (*)> writing .hg/cache/tags2-visible with 0 tags (glob)
128 1970/01/01 00:00:00 bob (*)> writing .hg/cache/tags2-visible with 0 tags (glob)
126 1970/01/01 00:00:00 bob (*)> pythonhook-preupdate: hgext.eol.preupdate finished in * seconds (glob)
129 1970/01/01 00:00:00 bob (*)> pythonhook-preupdate: hgext.eol.preupdate finished in * seconds (glob)
127 1970/01/01 00:00:00 bob (*)> exthook-update: echo hooked finished in * seconds (glob)
130 1970/01/01 00:00:00 bob (*)> exthook-update: echo hooked finished in * seconds (glob)
128 1970/01/01 00:00:00 bob (*)> update exited 0 after * seconds (glob)
131 1970/01/01 00:00:00 bob (*)> update exited 0 after * seconds (glob)
132 1970/01/01 00:00:00 bob (*)> blackbox -l 6 (glob)
129
133
130 log rotation
134 log rotation
131
135
@@ -146,6 +150,7 b' log rotation'
146 $ hg init blackboxtest3
150 $ hg init blackboxtest3
147 $ cd blackboxtest3
151 $ cd blackboxtest3
148 $ hg blackbox
152 $ hg blackbox
153 1970/01/01 00:00:00 bob (*)> blackbox (glob)
149 $ mv .hg/blackbox.log .hg/blackbox.log-
154 $ mv .hg/blackbox.log .hg/blackbox.log-
150 $ mkdir .hg/blackbox.log
155 $ mkdir .hg/blackbox.log
151 $ sed -e 's/\(.*test1.*\)/#\1/; s#\(.*commit2.*\)#os.rmdir(".hg/blackbox.log")\nos.rename(".hg/blackbox.log-", ".hg/blackbox.log")\n\1#' $TESTDIR/test-dispatch.py > ../test-dispatch.py
156 $ sed -e 's/\(.*test1.*\)/#\1/; s#\(.*commit2.*\)#os.rmdir(".hg/blackbox.log")\nos.rename(".hg/blackbox.log-", ".hg/blackbox.log")\n\1#' $TESTDIR/test-dispatch.py > ../test-dispatch.py
@@ -174,6 +179,7 b' log rotation'
174 $ hg blackbox
179 $ hg blackbox
175 1970/01/01 00:00:00 bob (*)> blackbox (glob)
180 1970/01/01 00:00:00 bob (*)> blackbox (glob)
176 1970/01/01 00:00:00 bob (*)> blackbox exited 0 after * seconds (glob)
181 1970/01/01 00:00:00 bob (*)> blackbox exited 0 after * seconds (glob)
182 1970/01/01 00:00:00 bob (*)> blackbox (glob)
177
183
178 cleanup
184 cleanup
179 $ cd ..
185 $ cd ..
@@ -67,11 +67,12 b' Hiding a non-tip changeset should change'
67 042eb6bfcc4909bad84a1cbf6eb1ddf0ab587d41 head2
67 042eb6bfcc4909bad84a1cbf6eb1ddf0ab587d41 head2
68 55482a6fb4b1881fa8f746fd52cf6f096bb21c89 test1
68 55482a6fb4b1881fa8f746fd52cf6f096bb21c89 test1
69
69
70 $ hg blackbox -l 4
70 $ hg blackbox -l 5
71 1970/01/01 00:00:00 bob (*)> tags (glob)
71 1970/01/01 00:00:00 bob (*)> tags (glob)
72 1970/01/01 00:00:00 bob (*)> 2/2 cache hits/lookups in * seconds (glob)
72 1970/01/01 00:00:00 bob (*)> 2/2 cache hits/lookups in * seconds (glob)
73 1970/01/01 00:00:00 bob (*)> writing .hg/cache/tags2-visible with 2 tags (glob)
73 1970/01/01 00:00:00 bob (*)> writing .hg/cache/tags2-visible with 2 tags (glob)
74 1970/01/01 00:00:00 bob (*)> tags exited 0 after * seconds (glob)
74 1970/01/01 00:00:00 bob (*)> tags exited 0 after * seconds (glob)
75 1970/01/01 00:00:00 bob (*)> blackbox -l 5 (glob)
75
76
76 Hiding another changeset should cause the filtered hash to change
77 Hiding another changeset should cause the filtered hash to change
77
78
@@ -86,11 +87,12 b' Hiding another changeset should cause th'
86 5 2942a772f72a444bef4bef13874d515f50fa27b6 2fce1eec33263d08a4d04293960fc73a555230e4
87 5 2942a772f72a444bef4bef13874d515f50fa27b6 2fce1eec33263d08a4d04293960fc73a555230e4
87 042eb6bfcc4909bad84a1cbf6eb1ddf0ab587d41 head2
88 042eb6bfcc4909bad84a1cbf6eb1ddf0ab587d41 head2
88
89
89 $ hg blackbox -l 4
90 $ hg blackbox -l 5
90 1970/01/01 00:00:00 bob (*)> tags (glob)
91 1970/01/01 00:00:00 bob (*)> tags (glob)
91 1970/01/01 00:00:00 bob (*)> 1/1 cache hits/lookups in * seconds (glob)
92 1970/01/01 00:00:00 bob (*)> 1/1 cache hits/lookups in * seconds (glob)
92 1970/01/01 00:00:00 bob (*)> writing .hg/cache/tags2-visible with 1 tags (glob)
93 1970/01/01 00:00:00 bob (*)> writing .hg/cache/tags2-visible with 1 tags (glob)
93 1970/01/01 00:00:00 bob (*)> tags exited 0 after * seconds (glob)
94 1970/01/01 00:00:00 bob (*)> tags exited 0 after * seconds (glob)
95 1970/01/01 00:00:00 bob (*)> blackbox -l 5 (glob)
94
96
95 Resolving tags on an unfiltered repo writes a separate tags cache
97 Resolving tags on an unfiltered repo writes a separate tags cache
96
98
@@ -106,8 +108,9 b' Resolving tags on an unfiltered repo wri'
106 55482a6fb4b1881fa8f746fd52cf6f096bb21c89 test1
108 55482a6fb4b1881fa8f746fd52cf6f096bb21c89 test1
107 d75775ffbc6bca1794d300f5571272879bd280da test2
109 d75775ffbc6bca1794d300f5571272879bd280da test2
108
110
109 $ hg blackbox -l 4
111 $ hg blackbox -l 5
110 1970/01/01 00:00:00 bob (*)> --hidden tags (glob)
112 1970/01/01 00:00:00 bob (*)> --hidden tags (glob)
111 1970/01/01 00:00:00 bob (*)> 2/2 cache hits/lookups in * seconds (glob)
113 1970/01/01 00:00:00 bob (*)> 2/2 cache hits/lookups in * seconds (glob)
112 1970/01/01 00:00:00 bob (*)> writing .hg/cache/tags2 with 3 tags (glob)
114 1970/01/01 00:00:00 bob (*)> writing .hg/cache/tags2 with 3 tags (glob)
113 1970/01/01 00:00:00 bob (*)> --hidden tags exited 0 after * seconds (glob)
115 1970/01/01 00:00:00 bob (*)> --hidden tags exited 0 after * seconds (glob)
116 1970/01/01 00:00:00 bob (*)> blackbox -l 5 (glob)
@@ -136,12 +136,13 b' Tag cache debug info written to blackbox'
136 $ rm -f .hg/cache/tags2-visible .hg/cache/hgtagsfnodes1
136 $ rm -f .hg/cache/tags2-visible .hg/cache/hgtagsfnodes1
137 $ hg identify
137 $ hg identify
138 b9154636be93 tip
138 b9154636be93 tip
139 $ hg blackbox -l 5
139 $ hg blackbox -l 6
140 1970/01/01 00:00:00 bob (*)> identify (glob)
140 1970/01/01 00:00:00 bob (*)> identify (glob)
141 1970/01/01 00:00:00 bob (*)> writing 48 bytes to cache/hgtagsfnodes1 (glob)
141 1970/01/01 00:00:00 bob (*)> writing 48 bytes to cache/hgtagsfnodes1 (glob)
142 1970/01/01 00:00:00 bob (*)> 0/1 cache hits/lookups in * seconds (glob)
142 1970/01/01 00:00:00 bob (*)> 0/1 cache hits/lookups in * seconds (glob)
143 1970/01/01 00:00:00 bob (*)> writing .hg/cache/tags2-visible with 1 tags (glob)
143 1970/01/01 00:00:00 bob (*)> writing .hg/cache/tags2-visible with 1 tags (glob)
144 1970/01/01 00:00:00 bob (*)> identify exited 0 after ?.?? seconds (glob)
144 1970/01/01 00:00:00 bob (*)> identify exited 0 after * seconds (glob)
145 1970/01/01 00:00:00 bob (*)> blackbox -l 6 (glob)
145
146
146 Failure to acquire lock results in no write
147 Failure to acquire lock results in no write
147
148
@@ -149,12 +150,13 b' Failure to acquire lock results in no wr'
149 $ echo 'foo:1' > .hg/wlock
150 $ echo 'foo:1' > .hg/wlock
150 $ hg identify
151 $ hg identify
151 b9154636be93 tip
152 b9154636be93 tip
152 $ hg blackbox -l 5
153 $ hg blackbox -l 6
153 1970/01/01 00:00:00 bob (*)> identify (glob)
154 1970/01/01 00:00:00 bob (*)> identify (glob)
154 1970/01/01 00:00:00 bob (*)> not writing .hg/cache/hgtagsfnodes1 because lock cannot be acquired (glob)
155 1970/01/01 00:00:00 bob (*)> not writing .hg/cache/hgtagsfnodes1 because lock cannot be acquired (glob)
155 1970/01/01 00:00:00 bob (*)> 0/1 cache hits/lookups in * seconds (glob)
156 1970/01/01 00:00:00 bob (*)> 0/1 cache hits/lookups in * seconds (glob)
156 1970/01/01 00:00:00 bob (*)> writing .hg/cache/tags2-visible with 1 tags (glob)
157 1970/01/01 00:00:00 bob (*)> writing .hg/cache/tags2-visible with 1 tags (glob)
157 1970/01/01 00:00:00 bob (*)> identify exited 0 after * seconds (glob)
158 1970/01/01 00:00:00 bob (*)> identify exited 0 after * seconds (glob)
159 1970/01/01 00:00:00 bob (*)> blackbox -l 6 (glob)
158
160
159 $ fnodescacheexists
161 $ fnodescacheexists
160 no fnodes cache
162 no fnodes cache
@@ -348,12 +350,13 b' Extra junk data at the end should get ov'
348 tip 5:8dbfe60eff30
350 tip 5:8dbfe60eff30
349 bar 1:78391a272241
351 bar 1:78391a272241
350
352
351 $ hg blackbox -l 5
353 $ hg blackbox -l 6
352 1970/01/01 00:00:00 bob (*)> tags (glob)
354 1970/01/01 00:00:00 bob (*)> tags (glob)
353 1970/01/01 00:00:00 bob (*)> writing 24 bytes to cache/hgtagsfnodes1 (glob)
355 1970/01/01 00:00:00 bob (*)> writing 24 bytes to cache/hgtagsfnodes1 (glob)
354 1970/01/01 00:00:00 bob (*)> 2/3 cache hits/lookups in * seconds (glob)
356 1970/01/01 00:00:00 bob (*)> 2/3 cache hits/lookups in * seconds (glob)
355 1970/01/01 00:00:00 bob (*)> writing .hg/cache/tags2-visible with 1 tags (glob)
357 1970/01/01 00:00:00 bob (*)> writing .hg/cache/tags2-visible with 1 tags (glob)
356 1970/01/01 00:00:00 bob (*)> tags exited 0 after * seconds (glob)
358 1970/01/01 00:00:00 bob (*)> tags exited 0 after * seconds (glob)
359 1970/01/01 00:00:00 bob (*)> blackbox -l 6 (glob)
357
360
358 #if unix-permissions no-root
361 #if unix-permissions no-root
359 Errors writing to .hgtags fnodes cache are silently ignored
362 Errors writing to .hgtags fnodes cache are silently ignored
@@ -368,12 +371,13 b' Errors writing to .hgtags fnodes cache a'
368 tip 6:b968051b5cf3
371 tip 6:b968051b5cf3
369 bar 1:78391a272241
372 bar 1:78391a272241
370
373
371 $ hg blackbox -l 5
374 $ hg blackbox -l 6
372 1970/01/01 00:00:00 bob (*)> tags (glob)
375 1970/01/01 00:00:00 bob (*)> tags (glob)
373 1970/01/01 00:00:00 bob (*)> couldn't write cache/hgtagsfnodes1: [Errno 13] Permission denied: '$TESTTMP/t2/.hg/cache/hgtagsfnodes1' (glob)
376 1970/01/01 00:00:00 bob (*)> couldn't write cache/hgtagsfnodes1: [Errno 13] Permission denied: '$TESTTMP/t2/.hg/cache/hgtagsfnodes1' (glob)
374 1970/01/01 00:00:00 bob (*)> 2/3 cache hits/lookups in * seconds (glob)
377 1970/01/01 00:00:00 bob (*)> 2/3 cache hits/lookups in * seconds (glob)
375 1970/01/01 00:00:00 bob (*)> writing .hg/cache/tags2-visible with 1 tags (glob)
378 1970/01/01 00:00:00 bob (*)> writing .hg/cache/tags2-visible with 1 tags (glob)
376 1970/01/01 00:00:00 bob (*)> tags exited 0 after * seconds (glob)
379 1970/01/01 00:00:00 bob (*)> tags exited 0 after * seconds (glob)
380 1970/01/01 00:00:00 bob (*)> blackbox -l 6 (glob)
377
381
378 $ chmod a+w .hg/cache/hgtagsfnodes1
382 $ chmod a+w .hg/cache/hgtagsfnodes1
379
383
@@ -382,12 +386,13 b' Errors writing to .hgtags fnodes cache a'
382 tip 6:b968051b5cf3
386 tip 6:b968051b5cf3
383 bar 1:78391a272241
387 bar 1:78391a272241
384
388
385 $ hg blackbox -l 5
389 $ hg blackbox -l 6
386 1970/01/01 00:00:00 bob (*)> tags (glob)
390 1970/01/01 00:00:00 bob (*)> tags (glob)
387 1970/01/01 00:00:00 bob (*)> writing 24 bytes to cache/hgtagsfnodes1 (glob)
391 1970/01/01 00:00:00 bob (*)> writing 24 bytes to cache/hgtagsfnodes1 (glob)
388 1970/01/01 00:00:00 bob (*)> 2/3 cache hits/lookups in * seconds (glob)
392 1970/01/01 00:00:00 bob (*)> 2/3 cache hits/lookups in * seconds (glob)
389 1970/01/01 00:00:00 bob (*)> writing .hg/cache/tags2-visible with 1 tags (glob)
393 1970/01/01 00:00:00 bob (*)> writing .hg/cache/tags2-visible with 1 tags (glob)
390 1970/01/01 00:00:00 bob (*)> tags exited 0 after * seconds (glob)
394 1970/01/01 00:00:00 bob (*)> tags exited 0 after * seconds (glob)
395 1970/01/01 00:00:00 bob (*)> blackbox -l 6 (glob)
391
396
392 $ f --size .hg/cache/hgtagsfnodes1
397 $ f --size .hg/cache/hgtagsfnodes1
393 .hg/cache/hgtagsfnodes1: size=168
398 .hg/cache/hgtagsfnodes1: size=168
@@ -410,11 +415,12 b" Stripping doesn't truncate the tags cach"
410 tip 4:0c192d7d5e6b
415 tip 4:0c192d7d5e6b
411 bar 1:78391a272241
416 bar 1:78391a272241
412
417
413 $ hg blackbox -l 4
418 $ hg blackbox -l 5
414 1970/01/01 00:00:00 bob (*)> writing 24 bytes to cache/hgtagsfnodes1 (glob)
419 1970/01/01 00:00:00 bob (*)> writing 24 bytes to cache/hgtagsfnodes1 (glob)
415 1970/01/01 00:00:00 bob (*)> 2/3 cache hits/lookups in * seconds (glob)
420 1970/01/01 00:00:00 bob (*)> 2/3 cache hits/lookups in * seconds (glob)
416 1970/01/01 00:00:00 bob (*)> writing .hg/cache/tags2-visible with 1 tags (glob)
421 1970/01/01 00:00:00 bob (*)> writing .hg/cache/tags2-visible with 1 tags (glob)
417 1970/01/01 00:00:00 bob (*)> tags exited 0 after * seconds (glob)
422 1970/01/01 00:00:00 bob (*)> tags exited 0 after * seconds (glob)
423 1970/01/01 00:00:00 bob (*)> blackbox -l 5 (glob)
418
424
419 $ f --size .hg/cache/hgtagsfnodes1
425 $ f --size .hg/cache/hgtagsfnodes1
420 .hg/cache/hgtagsfnodes1: size=120
426 .hg/cache/hgtagsfnodes1: size=120
@@ -426,12 +432,13 b" Stripping doesn't truncate the tags cach"
426 tip 5:035f65efb448
432 tip 5:035f65efb448
427 bar 1:78391a272241
433 bar 1:78391a272241
428
434
429 $ hg blackbox -l 5
435 $ hg blackbox -l 6
430 1970/01/01 00:00:00 bob (*)> tags (glob)
436 1970/01/01 00:00:00 bob (*)> tags (glob)
431 1970/01/01 00:00:00 bob (*)> writing 24 bytes to cache/hgtagsfnodes1 (glob)
437 1970/01/01 00:00:00 bob (*)> writing 24 bytes to cache/hgtagsfnodes1 (glob)
432 1970/01/01 00:00:00 bob (*)> 2/3 cache hits/lookups in * seconds (glob)
438 1970/01/01 00:00:00 bob (*)> 2/3 cache hits/lookups in * seconds (glob)
433 1970/01/01 00:00:00 bob (*)> writing .hg/cache/tags2-visible with 1 tags (glob)
439 1970/01/01 00:00:00 bob (*)> writing .hg/cache/tags2-visible with 1 tags (glob)
434 1970/01/01 00:00:00 bob (*)> tags exited 0 after * seconds (glob)
440 1970/01/01 00:00:00 bob (*)> tags exited 0 after * seconds (glob)
441 1970/01/01 00:00:00 bob (*)> blackbox -l 6 (glob)
435 $ f --size .hg/cache/hgtagsfnodes1
442 $ f --size .hg/cache/hgtagsfnodes1
436 .hg/cache/hgtagsfnodes1: size=144
443 .hg/cache/hgtagsfnodes1: size=144
437
444
General Comments 0
You need to be logged in to leave comments. Login now