author | Matt Harbison <matt_harbison@yahoo.com> |
Tue, 15 Mar 2016 23:04:35 -0400 | |
changeset 28888 | d46dc68ec042 |
parent 28407 | 63da8bd0c65e |
child 29846 | 318e2b600b80 |
permissions | -rw-r--r-- |
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 |
28246 | 15 |
$ hg blackbox --config blackbox.dirty=True |
28245
caa2a0c6fbb7
blackbox: log working directory version
timeless <timeless@mozdev.org>
parents:
28242
diff
changeset
|
16 |
1970/01/01 00:00:00 bob @0000000000000000000000000000000000000000 (5000)> add a |
28247
d2c0527af364
blackbox: store the blackbox ui object instead of the log file
timeless <timeless@mozdev.org>
parents:
28246
diff
changeset
|
17 |
1970/01/01 00:00:00 bob @0000000000000000000000000000000000000000 (5000)> add a exited 0 after * seconds (glob) |
28246 | 18 |
1970/01/01 00:00:00 bob @0000000000000000000000000000000000000000+ (5000)> blackbox |
18674
c61b49d059eb
blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff
changeset
|
19 |
|
18677
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
20 |
incoming change tracking |
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
21 |
|
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
22 |
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
|
23 |
$ hg commit -ma |
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
24 |
$ hg up null |
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
25 |
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
|
26 |
$ echo b > b |
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
27 |
$ hg commit -Amb |
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
28 |
adding b |
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
29 |
created new head |
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
30 |
|
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
31 |
clone, commit, pull |
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
32 |
$ hg clone . ../blackboxtest2 |
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
33 |
updating to branch default |
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
34 |
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
|
35 |
$ echo c > c |
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
36 |
$ hg commit -Amc |
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
37 |
adding c |
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
38 |
$ cd ../blackboxtest2 |
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
39 |
$ hg pull |
18719
9ad13296c581
tests: append glob to filename output when required for windows
Simon Heimberg <simohe@besonet.ch>
parents:
18677
diff
changeset
|
40 |
pulling from $TESTTMP/blackboxtest (glob) |
18677
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
41 |
searching for changes |
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
42 |
adding changesets |
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
43 |
adding manifests |
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
44 |
adding file changes |
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
45 |
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
|
46 |
(run 'hg update' to get a working copy) |
28025
ab6468270b83
blackbox: flush output file descriptor
timeless <timeless@mozdev.org>
parents:
28024
diff
changeset
|
47 |
$ hg blackbox -l 6 |
28245
caa2a0c6fbb7
blackbox: log working directory version
timeless <timeless@mozdev.org>
parents:
28242
diff
changeset
|
48 |
1970/01/01 00:00:00 bob @6563da9dcf87b1949716e38ff3e3dfaa3198eb06 (5000)> pull |
caa2a0c6fbb7
blackbox: log working directory version
timeless <timeless@mozdev.org>
parents:
28242
diff
changeset
|
49 |
1970/01/01 00:00:00 bob @6563da9dcf87b1949716e38ff3e3dfaa3198eb06 (5000)> updated served branch cache in * seconds (glob) |
caa2a0c6fbb7
blackbox: log working directory version
timeless <timeless@mozdev.org>
parents:
28242
diff
changeset
|
50 |
1970/01/01 00:00:00 bob @6563da9dcf87b1949716e38ff3e3dfaa3198eb06 (5000)> wrote served branch cache with 1 labels and 2 nodes |
caa2a0c6fbb7
blackbox: log working directory version
timeless <timeless@mozdev.org>
parents:
28242
diff
changeset
|
51 |
1970/01/01 00:00:00 bob @6563da9dcf87b1949716e38ff3e3dfaa3198eb06 (5000)> 1 incoming changes - new heads: d02f48003e62 |
28247
d2c0527af364
blackbox: store the blackbox ui object instead of the log file
timeless <timeless@mozdev.org>
parents:
28246
diff
changeset
|
52 |
1970/01/01 00:00:00 bob @6563da9dcf87b1949716e38ff3e3dfaa3198eb06 (5000)> pull exited 0 after * seconds (glob) |
28245
caa2a0c6fbb7
blackbox: log working directory version
timeless <timeless@mozdev.org>
parents:
28242
diff
changeset
|
53 |
1970/01/01 00:00:00 bob @6563da9dcf87b1949716e38ff3e3dfaa3198eb06 (5000)> blackbox -l 6 |
18677
539210ed2069
blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents:
18674
diff
changeset
|
54 |
|
18786
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
55 |
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
|
56 |
|
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents:
18766
diff
changeset
|
57 |
$ hg rollback |
ed39a8f94e95
blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com> |