Mercurial > hg
annotate tests/test-blackbox.t @ 26750:9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
Before this patch, external editor process for the commit log can't
view some in-memory changes (especially, of dirstate), because they
aren't written out until the end of transaction (or wlock).
This causes unexpected output of Mercurial commands spawned from that
editor process.
To make in-memory changes visible to external editor process, this
patch does:
- write (or schedule to write) in-memory dirstate changes, and
- set HG_PENDING environment variable, if:
- a transaction is running, and
- there are in-memory changes to be visible
"hg diff" spawned from external editor process for "hg qrefresh"
shows:
- "changes newly imported into the topmost" before 49148d7868df(*)
- "all changes recorded in the topmost by refreshing" after this patch
(*) 49148d7868df changed steps invoking editor process
Even though backward compatibility may be broken, the latter behavior
looks reasonable, because "hg diff" spawned from the editor process
consistently shows "what changes new revision records" regardless of
invocation context.
In fact, issue4378 itself should be resolved by 800e090e9c64, which
made 'repo.transaction()' write in-memory dirstate changes out
explicitly before starting transaction. It also made "hg qrefresh"
imply 'dirstate.write()' before external editor invocation in call
chain below.
- mq.queue.refresh
- strip.strip
- repair.strip
- localrepository.transaction
- dirstate.write
- localrepository.commit
- invoke external editor
Though, this patch has '(issue4378)' in own summary line to indicate
that issues like issue4378 should be fixed by this.
BTW, this patch adds '-m' option to a 'hg ci --amend' execution in
'test-commit-amend.t', to avoid invoking external editor process.
In this case, "unsure" states may be changed to "clean" according to
timestamp or so on. These changes should be written into pending file,
if external editor invocation is required,
Then, writing dirstate changes out breaks stability of test, because
it shows "transaction abort!/rollback completed" occasionally.
Aborting after editor process invocation while commands below may
cause similar instability of tests, too (AFAIK, there is no more such
one, at this revision)
- commit --amend
- without --message/--logfile
- import
- without --message/--logfile,
- without --no-commit,
- without --bypass,
- one of below, and
- patch has no description text, or
- with --edit
- aborting at the 1st patch, which adds or removes file(s)
- if it only changes existing files, status is checked only for
changed files by 'scmutil.matchfiles()', and transition from
"unsure" to "normal" in dirstate doesn't occur (= dirstate
isn't changed, and written out)
- aborting at the 2nd or later patch implies other pending
changes (e.g. changelog), and always causes showing
"transaction abort!/rollback completed"
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Sat, 17 Oct 2015 01:15:34 +0900 |
parents | e8f9dffca36f |
children | 949e8c626d19 |
rev | line source |
---|---|
18674
c61b49d059eb
blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff
changeset
|
1 setup |
c61b49d059eb
blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff
changeset
|
2 $ cat >> $HGRCPATH <<EOF |
c61b49d059eb
blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff
changeset
|
3 > [extensions] |
c61b49d059eb
blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff
changeset
|
4 > blackbox= |
24705
0ead0a07ed9c
tests: move mock blackbox extension into own file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
21031
diff
changeset
|
5 > mock=$TESTDIR/mockblackbox.py |
18766
64b5562550e2
blackbox: add backup bundle paths to blackbox logs
Durham Goode <durham@fb.com>
parents:
18720
diff
changeset
|
6 > mq= |
18674
c61b49d059eb
blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff
changeset
|
7 > EOF |
c61b49d059eb
blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff
changeset
|
8 $ hg init blackboxtest |
c61b49d059eb
blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff
changeset
|
9 $ cd blackboxtest |
c61b49d059eb
blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff
changeset
|
10 |
c61b49d059eb
blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff
changeset
|
11 command, exit codes, and duration |
c61b49d059eb
blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff
changeset
|
12 |
c61b49d059eb
blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff
changeset
|
13 $ echo a > a |
c61b49d059eb
blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff
changeset
|
14 $ hg add a |
c61b49d059eb
blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff
changeset
|
15 $ hg blackbox |
26185 | 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) | |
18674
c61b49d059eb
blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff
changeset
|
18 |
18677
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
19 incoming change tracking |
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
20 |
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
21 create two heads to verify that we only see one change in the log later |
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
22 $ hg commit -ma |
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
23 $ hg up null |
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
24 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
25 $ echo b > b |
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
26 $ hg commit -Amb |
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
27 adding b |
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
28 created new head |
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
29 |
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
30 clone, commit, pull |
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
31 $ hg clone . ../blackboxtest2 |
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
32 updating to branch default |
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
33 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
34 $ echo c > c |
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
35 $ hg commit -Amc |
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
36 adding c |
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
37 $ cd ../blackboxtest2 |
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
38 $ hg pull |
18719
9ad13296c581
tests: append glob to filename output when required for windows
Simon Heimberg <simohe@besonet.ch>
parents:
18677
diff
changeset
|
39 pulling from $TESTTMP/blackboxtest (glob) |
18677
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
40 searching for changes |
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
41 adding changesets |
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
42 adding manifests |
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
43 adding file changes |
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
44 added 1 changesets with 1 changes to 1 files |
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
45 (run 'hg update' to get a working copy) |
21031
05cfcecb3aef
branchmap: log events related to branch cache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
21030
diff
changeset
|
46 $ hg blackbox -l 5 |
26185 | 47 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 (*)> 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 (*)> pull exited 0 after * seconds (glob) | |
18677
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
52 |
18786
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
53 we must not cause a failure if we cannot write to the log |
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
54 |
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
55 $ hg rollback |
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
56 repository tip rolled back to revision 1 (undo pull) |
19082
63dda3c3bb11
blackbox: don't run permission tests on non-unix systems
Durham Goode <durham@fb.com>
parents:
19066
diff
changeset
|
57 |
20008
e54a078153f7
tests: skip tests that require not having root (issue4089)
Matt Mackall <mpm@selenic.com>
parents:
19229
diff
changeset
|
58 #if unix-permissions no-root |
18786
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
59 $ chmod 000 .hg/blackbox.log |
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
60 $ hg --debug incoming |
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
61 warning: cannot write to blackbox.log: Permission denied |
18836
a7d0ddc7540b
blackbox: fix a few check-code portability errors
Bryan O'Sullivan <bryano@fb.com>
parents:
18787
diff
changeset
|
62 comparing with $TESTTMP/blackboxtest (glob) |
18786
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
63 query 1; heads |
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
64 searching for changes |
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
65 all local heads known remotely |
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
66 changeset: 2:d02f48003e62c24e2659d97d30f2a83abe5d5d51 |
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
67 tag: tip |
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
68 phase: draft |
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
69 parent: 1:6563da9dcf87b1949716e38ff3e3dfaa3198eb06 |
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
70 parent: -1:0000000000000000000000000000000000000000 |
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
71 manifest: 2:ab9d46b053ebf45b7996f2922b9893ff4b63d892 |
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
72 user: test |
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
73 date: Thu Jan 01 00:00:00 1970 +0000 |
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
74 files+: c |
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
75 extra: branch=default |
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
76 description: |
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
77 c |
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
78 |
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
79 |
19082
63dda3c3bb11
blackbox: don't run permission tests on non-unix systems
Durham Goode <durham@fb.com>
parents:
19066
diff
changeset
|
80 #endif |
18786
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
81 $ hg pull |
18836
a7d0ddc7540b
blackbox: fix a few check-code portability errors
Bryan O'Sullivan <bryano@fb.com>
parents:
18787
diff
changeset
|
82 pulling from $TESTTMP/blackboxtest (glob) |
18786
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
83 searching for changes |
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
84 adding changesets |
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
85 adding manifests |
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
86 adding file changes |
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
87 added 1 changesets with 1 changes to 1 files |
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
88 (run 'hg update' to get a working copy) |
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
89 |
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
90 a failure reading from the log is fine |
20008
e54a078153f7
tests: skip tests that require not having root (issue4089)
Matt Mackall <mpm@selenic.com>
parents:
19229
diff
changeset
|
91 #if unix-permissions no-root |
18786
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
92 $ hg blackbox -l 3 |
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
93 abort: Permission denied: $TESTTMP/blackboxtest2/.hg/blackbox.log |
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
94 [255] |
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
95 |
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
96 $ chmod 600 .hg/blackbox.log |
19082
63dda3c3bb11
blackbox: don't run permission tests on non-unix systems
Durham Goode <durham@fb.com>
parents:
19066
diff
changeset
|
97 #endif |
18786
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
98 |
18766
64b5562550e2
blackbox: add backup bundle paths to blackbox logs
Durham Goode <durham@fb.com>
parents:
18720
diff
changeset
|
99 backup bundles get logged |
64b5562550e2
blackbox: add backup bundle paths to blackbox logs
Durham Goode <durham@fb.com>
parents:
18720
diff
changeset
|
100 |
64b5562550e2
blackbox: add backup bundle paths to blackbox logs
Durham Goode <durham@fb.com>
parents:
18720
diff
changeset
|
101 $ touch d |
64b5562550e2
blackbox: add backup bundle paths to blackbox logs
Durham Goode <durham@fb.com>
parents:
18720
diff
changeset
|
102 $ hg commit -Amd |
64b5562550e2
blackbox: add backup bundle paths to blackbox logs
Durham Goode <durham@fb.com>
parents:
18720
diff
changeset
|
103 adding d |
64b5562550e2
blackbox: add backup bundle paths to blackbox logs
Durham Goode <durham@fb.com>
parents:
18720
diff
changeset
|
104 created new head |
64b5562550e2
blackbox: add backup bundle paths to blackbox logs
Durham Goode <durham@fb.com>
parents:
18720
diff
changeset
|
105 $ hg strip tip |
64b5562550e2
blackbox: add backup bundle paths to blackbox logs
Durham Goode <durham@fb.com>
parents:
18720
diff
changeset
|
106 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
64b5562550e2
blackbox: add backup bundle paths to blackbox logs
Durham Goode <durham@fb.com>
parents:
18720
diff
changeset
|
107 saved backup bundle to $TESTTMP/blackboxtest2/.hg/strip-backup/*-backup.hg (glob) |
21031
05cfcecb3aef
branchmap: log events related to branch cache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
21030
diff
changeset
|
108 $ hg blackbox -l 5 |
26185 | 109 1970/01/01 00:00:00 bob (*)> strip tip (glob) |
110 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 (*)> updated base branch cache in ?.???? seconds (glob) | |
112 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 (*)> strip tip exited 0 after * seconds (glob) | |
18766
64b5562550e2
blackbox: add backup bundle paths to blackbox logs
Durham Goode <durham@fb.com>
parents:
18720
diff
changeset
|
114 |
18674
c61b49d059eb
blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff
changeset
|
115 extension and python hooks - use the eol extension for a pythonhook |
c61b49d059eb
blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff
changeset
|
116 |
c61b49d059eb
blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff
changeset
|
117 $ echo '[extensions]' >> .hg/hgrc |
c61b49d059eb
blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff
changeset
|
118 $ echo 'eol=' >> .hg/hgrc |
c61b49d059eb
blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff
changeset
|
119 $ echo '[hooks]' >> .hg/hgrc |
c61b49d059eb
blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff
changeset
|
120 $ echo 'update = echo hooked' >> .hg/hgrc |
c61b49d059eb
blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff
changeset
|
121 $ hg update |
26028
6fbe35588433
update: wlock the repo for the whole 'hg update' command
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24763
diff
changeset
|
122 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
18674
c61b49d059eb
blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff
changeset
|
123 hooked |
24706
5150b2b5b345
tests: move blackbox testing of tags to test-tags.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24705
diff
changeset
|
124 $ hg blackbox -l 5 |
26185 | 125 1970/01/01 00:00:00 bob (*)> update (glob) |
126 1970/01/01 00:00:00 bob (*)> writing .hg/cache/tags2-visible with 0 tags (glob) | |
127 1970/01/01 00:00:00 bob (*)> pythonhook-preupdate: hgext.eol.preupdate finished in * seconds (glob) | |
128 1970/01/01 00:00:00 bob (*)> exthook-update: echo hooked finished in * seconds (glob) | |
129 1970/01/01 00:00:00 bob (*)> update exited 0 after * seconds (glob) | |
18674
c61b49d059eb
blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff
changeset
|
130 |
19066
2cad301a7f06
blackbox: automatically rotate log files
Bryan O'Sullivan <bryano@fb.com>
parents:
18836
diff
changeset
|
131 log rotation |
2cad301a7f06
blackbox: automatically rotate log files
Bryan O'Sullivan <bryano@fb.com>
parents:
18836
diff
changeset
|
132 |
2cad301a7f06
blackbox: automatically rotate log files
Bryan O'Sullivan <bryano@fb.com>
parents:
18836
diff
changeset
|
133 $ echo '[blackbox]' >> .hg/hgrc |
2cad301a7f06
blackbox: automatically rotate log files
Bryan O'Sullivan <bryano@fb.com>
parents:
18836
diff
changeset
|
134 $ echo 'maxsize = 20 b' >> .hg/hgrc |
2cad301a7f06
blackbox: automatically rotate log files
Bryan O'Sullivan <bryano@fb.com>
parents:
18836
diff
changeset
|
135 $ echo 'maxfiles = 3' >> .hg/hgrc |
2cad301a7f06
blackbox: automatically rotate log files
Bryan O'Sullivan <bryano@fb.com>
parents:
18836
diff
changeset
|
136 $ hg status |
2cad301a7f06
blackbox: automatically rotate log files
Bryan O'Sullivan <bryano@fb.com>
parents:
18836
diff
changeset
|
137 $ hg status |
2cad301a7f06
blackbox: automatically rotate log files
Bryan O'Sullivan <bryano@fb.com>
parents:
18836
diff
changeset
|
138 $ hg status |
2cad301a7f06
blackbox: automatically rotate log files
Bryan O'Sullivan <bryano@fb.com>
parents:
18836
diff
changeset
|
139 $ hg tip -q |
24706
5150b2b5b345
tests: move blackbox testing of tags to test-tags.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24705
diff
changeset
|
140 2:d02f48003e62 |
19066
2cad301a7f06
blackbox: automatically rotate log files
Bryan O'Sullivan <bryano@fb.com>
parents:
18836
diff
changeset
|
141 $ ls .hg/blackbox.log* |
2cad301a7f06
blackbox: automatically rotate log files
Bryan O'Sullivan <bryano@fb.com>
parents:
18836
diff
changeset
|
142 .hg/blackbox.log |
2cad301a7f06
blackbox: automatically rotate log files
Bryan O'Sullivan <bryano@fb.com>
parents:
18836
diff
changeset
|
143 .hg/blackbox.log.1 |
2cad301a7f06
blackbox: automatically rotate log files
Bryan O'Sullivan <bryano@fb.com>
parents:
18836
diff
changeset
|
144 .hg/blackbox.log.2 |
2cad301a7f06
blackbox: automatically rotate log files
Bryan O'Sullivan <bryano@fb.com>
parents:
18836
diff
changeset
|
145 |
18674
c61b49d059eb
blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff
changeset
|
146 cleanup |
c61b49d059eb
blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff
changeset
|
147 $ cd .. |