Mercurial > hg
comparison tests/test-blackbox.t @ 28245:caa2a0c6fbb7
blackbox: log working directory version
Without this, while you could see the list of commands run,
it wasn't possible to identify what they were doing, because commads
could rely on revsets (including remote input which varies over time).
author | timeless <timeless@mozdev.org> |
---|---|
date | Tue, 09 Feb 2016 19:16:06 +0000 |
parents | e8ad56d95fbb |
children | b862e793ec10 |
comparison
equal
deleted
inserted
replaced
28244:c17d7b1c40be | 28245:caa2a0c6fbb7 |
---|---|
10 | 10 |
11 command, exit codes, and duration | 11 command, exit codes, and duration |
12 | 12 |
13 $ echo a > a | 13 $ echo a > a |
14 $ hg add a | 14 $ hg add a |
15 $ hg id > /dev/null | |
15 $ hg blackbox | 16 $ hg blackbox |
16 1970/01/01 00:00:00 bob (5000)> add a | 17 1970/01/01 00:00:00 bob @0000000000000000000000000000000000000000 (5000)> add a |
17 1970/01/01 00:00:00 bob (5000)> add a exited 0 after * seconds (glob) | 18 1970/01/01 00:00:00 bob @(unknown) (5000)> add a exited 0 after * seconds (glob) |
18 1970/01/01 00:00:00 bob (5000)> blackbox | 19 1970/01/01 00:00:00 bob @0000000000000000000000000000000000000000 (5000)> id |
20 1970/01/01 00:00:00 bob @(unknown) (5000)> id exited 0 after * seconds (glob) | |
21 1970/01/01 00:00:00 bob @0000000000000000000000000000000000000000 (5000)> blackbox | |
19 | 22 |
20 incoming change tracking | 23 incoming change tracking |
21 | 24 |
22 create two heads to verify that we only see one change in the log later | 25 create two heads to verify that we only see one change in the log later |
23 $ hg commit -ma | 26 $ hg commit -ma |
43 adding manifests | 46 adding manifests |
44 adding file changes | 47 adding file changes |
45 added 1 changesets with 1 changes to 1 files | 48 added 1 changesets with 1 changes to 1 files |
46 (run 'hg update' to get a working copy) | 49 (run 'hg update' to get a working copy) |
47 $ hg blackbox -l 6 | 50 $ hg blackbox -l 6 |
48 1970/01/01 00:00:00 bob (5000)> pull | 51 1970/01/01 00:00:00 bob @6563da9dcf87b1949716e38ff3e3dfaa3198eb06 (5000)> pull |
49 1970/01/01 00:00:00 bob (5000)> updated served branch cache in * seconds (glob) | 52 1970/01/01 00:00:00 bob @6563da9dcf87b1949716e38ff3e3dfaa3198eb06 (5000)> updated served branch cache in * seconds (glob) |
50 1970/01/01 00:00:00 bob (5000)> wrote served branch cache with 1 labels and 2 nodes | 53 1970/01/01 00:00:00 bob @6563da9dcf87b1949716e38ff3e3dfaa3198eb06 (5000)> wrote served branch cache with 1 labels and 2 nodes |
51 1970/01/01 00:00:00 bob (5000)> 1 incoming changes - new heads: d02f48003e62 | 54 1970/01/01 00:00:00 bob @6563da9dcf87b1949716e38ff3e3dfaa3198eb06 (5000)> 1 incoming changes - new heads: d02f48003e62 |
52 1970/01/01 00:00:00 bob (5000)> pull exited 0 after * seconds (glob) | 55 1970/01/01 00:00:00 bob @(unknown) (5000)> pull exited 0 after * seconds (glob) |
53 1970/01/01 00:00:00 bob (5000)> blackbox -l 6 | 56 1970/01/01 00:00:00 bob @6563da9dcf87b1949716e38ff3e3dfaa3198eb06 (5000)> blackbox -l 6 |
54 | 57 |
55 we must not cause a failure if we cannot write to the log | 58 we must not cause a failure if we cannot write to the log |
56 | 59 |
57 $ hg rollback | 60 $ hg rollback |
58 repository tip rolled back to revision 1 (undo pull) | 61 repository tip rolled back to revision 1 (undo pull) |
105 created new head | 108 created new head |
106 $ hg strip tip | 109 $ hg strip tip |
107 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | 110 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
108 saved backup bundle to $TESTTMP/blackboxtest2/.hg/strip-backup/*-backup.hg (glob) | 111 saved backup bundle to $TESTTMP/blackboxtest2/.hg/strip-backup/*-backup.hg (glob) |
109 $ hg blackbox -l 6 | 112 $ hg blackbox -l 6 |
110 1970/01/01 00:00:00 bob (5000)> strip tip | 113 1970/01/01 00:00:00 bob @73f6ee326b27d820b0472f1a825e3a50f3dc489b (5000)> strip tip |
111 1970/01/01 00:00:00 bob (5000)> saved backup bundle to $TESTTMP/blackboxtest2/.hg/strip-backup/73f6ee326b27-7612e004-backup.hg (glob) | 114 1970/01/01 00:00:00 bob @6563da9dcf87b1949716e38ff3e3dfaa3198eb06 (5000)> saved backup bundle to $TESTTMP/blackboxtest2/.hg/strip-backup/73f6ee326b27-7612e004-backup.hg |
112 1970/01/01 00:00:00 bob (5000)> updated base branch cache in * seconds (glob) | 115 1970/01/01 00:00:00 bob @6563da9dcf87b1949716e38ff3e3dfaa3198eb06 (5000)> updated base branch cache in * seconds (glob) |
113 1970/01/01 00:00:00 bob (5000)> wrote base branch cache with 1 labels and 2 nodes | 116 1970/01/01 00:00:00 bob @6563da9dcf87b1949716e38ff3e3dfaa3198eb06 (5000)> wrote base branch cache with 1 labels and 2 nodes |
114 1970/01/01 00:00:00 bob (5000)> strip tip exited 0 after * seconds (glob) | 117 1970/01/01 00:00:00 bob @(unknown) (5000)> strip tip exited 0 after * seconds (glob) |
115 1970/01/01 00:00:00 bob (5000)> blackbox -l 6 | 118 1970/01/01 00:00:00 bob @6563da9dcf87b1949716e38ff3e3dfaa3198eb06 (5000)> blackbox -l 6 |
116 | 119 |
117 extension and python hooks - use the eol extension for a pythonhook | 120 extension and python hooks - use the eol extension for a pythonhook |
118 | 121 |
119 $ echo '[extensions]' >> .hg/hgrc | 122 $ echo '[extensions]' >> .hg/hgrc |
120 $ echo 'eol=' >> .hg/hgrc | 123 $ echo 'eol=' >> .hg/hgrc |
123 $ hg update | 126 $ hg update |
124 hooked | 127 hooked |
125 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | 128 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
126 1 other heads for branch "default" | 129 1 other heads for branch "default" |
127 $ hg blackbox -l 6 | 130 $ hg blackbox -l 6 |
128 1970/01/01 00:00:00 bob (5000)> update | 131 1970/01/01 00:00:00 bob @6563da9dcf87b1949716e38ff3e3dfaa3198eb06 (5000)> update |
129 1970/01/01 00:00:00 bob (5000)> writing .hg/cache/tags2-visible with 0 tags | 132 1970/01/01 00:00:00 bob @6563da9dcf87b1949716e38ff3e3dfaa3198eb06 (5000)> writing .hg/cache/tags2-visible with 0 tags |
130 1970/01/01 00:00:00 bob (5000)> pythonhook-preupdate: hgext.eol.preupdate finished in * seconds (glob) | 133 1970/01/01 00:00:00 bob @6563da9dcf87b1949716e38ff3e3dfaa3198eb06 (5000)> pythonhook-preupdate: hgext.eol.preupdate finished in * seconds (glob) |
131 1970/01/01 00:00:00 bob (5000)> exthook-update: echo hooked finished in * seconds (glob) | 134 1970/01/01 00:00:00 bob @d02f48003e62c24e2659d97d30f2a83abe5d5d51 (5000)> exthook-update: echo hooked finished in * seconds (glob) |
132 1970/01/01 00:00:00 bob (5000)> update exited 0 after * seconds (glob) | 135 1970/01/01 00:00:00 bob @(unknown) (5000)> update exited 0 after * seconds (glob) |
133 1970/01/01 00:00:00 bob (5000)> blackbox -l 6 | 136 1970/01/01 00:00:00 bob @d02f48003e62c24e2659d97d30f2a83abe5d5d51 (5000)> blackbox -l 6 |
134 | 137 |
135 log rotation | 138 log rotation |
136 | 139 |
137 $ echo '[blackbox]' >> .hg/hgrc | 140 $ echo '[blackbox]' >> .hg/hgrc |
138 $ echo 'maxsize = 20 b' >> .hg/hgrc | 141 $ echo 'maxsize = 20 b' >> .hg/hgrc |
149 $ cd .. | 152 $ cd .. |
150 | 153 |
151 $ hg init blackboxtest3 | 154 $ hg init blackboxtest3 |
152 $ cd blackboxtest3 | 155 $ cd blackboxtest3 |
153 $ hg blackbox | 156 $ hg blackbox |
154 1970/01/01 00:00:00 bob (5000)> blackbox | 157 1970/01/01 00:00:00 bob @0000000000000000000000000000000000000000 (5000)> blackbox |
155 $ mv .hg/blackbox.log .hg/blackbox.log- | 158 $ mv .hg/blackbox.log .hg/blackbox.log- |
156 $ mkdir .hg/blackbox.log | 159 $ mkdir .hg/blackbox.log |
157 $ 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 | 160 $ 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 |
158 $ python ../test-dispatch.py | 161 $ python ../test-dispatch.py |
159 running: add foo | 162 running: add foo |
176 date: Sun Jan 02 00:00:00 2000 +0000 | 179 date: Sun Jan 02 00:00:00 2000 +0000 |
177 summary: commit2 | 180 summary: commit2 |
178 | 181 |
179 result: None | 182 result: None |
180 $ hg blackbox | 183 $ hg blackbox |
181 1970/01/01 00:00:00 bob (5000)> blackbox | 184 1970/01/01 00:00:00 bob @0000000000000000000000000000000000000000 (5000)> blackbox |
182 1970/01/01 00:00:00 bob (5000)> blackbox exited 0 after * seconds (glob) | 185 1970/01/01 00:00:00 bob @(unknown) (5000)> blackbox exited 0 after * seconds (glob) |
183 1970/01/01 00:00:00 bob (5000)> blackbox | 186 1970/01/01 00:00:00 bob @45589e459b2edfbf3dbde7e01f611d2c1e7453d7 (5000)> blackbox |
184 | 187 |
185 cleanup | 188 cleanup |
186 $ cd .. | 189 $ cd .. |