annotate tests/test-blackbox.t @ 51492:2e8a88e5809f

branchcache: stop writing more branchcache file on disk than needed Before this change, we were unconditionally writing a branchmap file for the filter level passed to `update_disk`. This is actually counter productive if no update were needed for this filter level. In many case, the branch cache for a filter level is identical to its parent "subset" and it is better to simply keep the subset update and reuse it every time instead of having to do identical work for similar subset. So we change the `update_disk` method to only write a file when that filter level differ from its parent. This removes many cases where identical files were written, requiring multiple boring update in the test suite. The only notable changes is the change to `test-strip-branch-cache.t`, this case was checking a scenario that no longer reproduce the bug as writing less branchmap file result in less stalled cache on disk. Strictly speaking, we could create a more convoluted scenario that create a similar issue. However the next changeset would also cover that scenario so we directly updated that test case to a "no longer buggy" state.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Sun, 10 Mar 2024 04:53:17 +0100
parents 7e5be4a7cda7
children 82c1a388e86a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
18674
c61b49d059eb blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff changeset
1 setup
38016
81ca0fd348e3 tests: test failure reporting in blackbox code
Martin von Zweigbergk <martinvonz@google.com>
parents: 37995
diff changeset
2
81ca0fd348e3 tests: test failure reporting in blackbox code
Martin von Zweigbergk <martinvonz@google.com>
parents: 37995
diff changeset
3 $ cat > myextension.py <<EOF
81ca0fd348e3 tests: test failure reporting in blackbox code
Martin von Zweigbergk <martinvonz@google.com>
parents: 37995
diff changeset
4 > from mercurial import error, registrar
81ca0fd348e3 tests: test failure reporting in blackbox code
Martin von Zweigbergk <martinvonz@google.com>
parents: 37995
diff changeset
5 > cmdtable = {}
81ca0fd348e3 tests: test failure reporting in blackbox code
Martin von Zweigbergk <martinvonz@google.com>
parents: 37995
diff changeset
6 > command = registrar.command(cmdtable)
81ca0fd348e3 tests: test failure reporting in blackbox code
Martin von Zweigbergk <martinvonz@google.com>
parents: 37995
diff changeset
7 > @command(b'crash', [], b'hg crash')
81ca0fd348e3 tests: test failure reporting in blackbox code
Martin von Zweigbergk <martinvonz@google.com>
parents: 37995
diff changeset
8 > def crash(ui, *args, **kwargs):
81ca0fd348e3 tests: test failure reporting in blackbox code
Martin von Zweigbergk <martinvonz@google.com>
parents: 37995
diff changeset
9 > raise Exception("oops")
42581
bb135a784b70 abort: added logic for of hg abort
Taapas Agrawal <taapas2897@gmail.com>
parents: 41730
diff changeset
10 > @command(b'abortcmd', [], b'hg abortcmd')
38023
c3fd9a0f8277 dispatch: mask negative exit code recorded in blackbox log
Yuya Nishihara <yuya@tcha.org>
parents: 38022
diff changeset
11 > def abort(ui, *args, **kwargs):
c3fd9a0f8277 dispatch: mask negative exit code recorded in blackbox log
Yuya Nishihara <yuya@tcha.org>
parents: 38022
diff changeset
12 > raise error.Abort(b"oops")
38016
81ca0fd348e3 tests: test failure reporting in blackbox code
Martin von Zweigbergk <martinvonz@google.com>
parents: 37995
diff changeset
13 > EOF
81ca0fd348e3 tests: test failure reporting in blackbox code
Martin von Zweigbergk <martinvonz@google.com>
parents: 37995
diff changeset
14 $ abspath=`pwd`/myextension.py
81ca0fd348e3 tests: test failure reporting in blackbox code
Martin von Zweigbergk <martinvonz@google.com>
parents: 37995
diff changeset
15
18674
c61b49d059eb blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff changeset
16 $ cat >> $HGRCPATH <<EOF
c61b49d059eb blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff changeset
17 > [extensions]
c61b49d059eb blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff changeset
18 > blackbox=
24705
0ead0a07ed9c tests: move mock blackbox extension into own file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 21031
diff changeset
19 > mock=$TESTDIR/mockblackbox.py
18766
64b5562550e2 blackbox: add backup bundle paths to blackbox logs
Durham Goode <durham@fb.com>
parents: 18720
diff changeset
20 > mq=
38016
81ca0fd348e3 tests: test failure reporting in blackbox code
Martin von Zweigbergk <martinvonz@google.com>
parents: 37995
diff changeset
21 > myextension=$TESTTMP/myextension.py
29846
318e2b600b80 blackbox: also log alias expansions
Augie Fackler <augie@google.com>
parents: 28888
diff changeset
22 > [alias]
318e2b600b80 blackbox: also log alias expansions
Augie Fackler <augie@google.com>
parents: 28888
diff changeset
23 > confuse = log --limit 3
34298
25e1a8876cc0 tests: add a test for blackbox with nested alias configurations
Augie Fackler <augie@google.com>
parents: 34297
diff changeset
24 > so-confusing = confuse --style compact
18674
c61b49d059eb blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff changeset
25 > EOF
38016
81ca0fd348e3 tests: test failure reporting in blackbox code
Martin von Zweigbergk <martinvonz@google.com>
parents: 37995
diff changeset
26
18674
c61b49d059eb blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff changeset
27 $ hg init blackboxtest
c61b49d059eb blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff changeset
28 $ cd blackboxtest
c61b49d059eb blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff changeset
29
c61b49d059eb blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff changeset
30 command, exit codes, and duration
c61b49d059eb blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff changeset
31
c61b49d059eb blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff changeset
32 $ echo a > a
c61b49d059eb blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff changeset
33 $ hg add a
28246
b862e793ec10 blackbox: log dirty state
timeless <timeless@mozdev.org>
parents: 28245
diff changeset
34 $ hg blackbox --config blackbox.dirty=True
48574
abbecb5cd6f3 blackbox: change year in logs to ISO 8601 format
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 48573
diff changeset
35 1970-01-01 00:00:00.000 bob @0000000000000000000000000000000000000000 (5000)> init blackboxtest exited 0 after * seconds (glob)
abbecb5cd6f3 blackbox: change year in logs to ISO 8601 format
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 48573
diff changeset
36 1970-01-01 00:00:00.000 bob @0000000000000000000000000000000000000000 (5000)> add a
abbecb5cd6f3 blackbox: change year in logs to ISO 8601 format
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 48573
diff changeset
37 1970-01-01 00:00:00.000 bob @0000000000000000000000000000000000000000 (5000)> add a exited 0 after * seconds (glob)
abbecb5cd6f3 blackbox: change year in logs to ISO 8601 format
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 48573
diff changeset
38 1970-01-01 00:00:00.000 bob @0000000000000000000000000000000000000000+ (5000)> blackbox --config *blackbox.dirty=True* (glob)
18674
c61b49d059eb blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff changeset
39
38016
81ca0fd348e3 tests: test failure reporting in blackbox code
Martin von Zweigbergk <martinvonz@google.com>
parents: 37995
diff changeset
40 failure exit code
81ca0fd348e3 tests: test failure reporting in blackbox code
Martin von Zweigbergk <martinvonz@google.com>
parents: 37995
diff changeset
41 $ rm ./.hg/blackbox.log
81ca0fd348e3 tests: test failure reporting in blackbox code
Martin von Zweigbergk <martinvonz@google.com>
parents: 37995
diff changeset
42 $ hg add non-existent
81ca0fd348e3 tests: test failure reporting in blackbox code
Martin von Zweigbergk <martinvonz@google.com>
parents: 37995
diff changeset
43 non-existent: $ENOENT$
81ca0fd348e3 tests: test failure reporting in blackbox code
Martin von Zweigbergk <martinvonz@google.com>
parents: 37995
diff changeset
44 [1]
81ca0fd348e3 tests: test failure reporting in blackbox code
Martin von Zweigbergk <martinvonz@google.com>
parents: 37995
diff changeset
45 $ hg blackbox
48574
abbecb5cd6f3 blackbox: change year in logs to ISO 8601 format
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 48573
diff changeset
46 1970-01-01 00:00:00.000 bob @0000000000000000000000000000000000000000 (5000)> add non-existent
abbecb5cd6f3 blackbox: change year in logs to ISO 8601 format
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 48573
diff changeset
47 1970-01-01 00:00:00.000 bob @0000000000000000000000000000000000000000 (5000)> add non-existent exited 1 after * seconds (glob)
abbecb5cd6f3 blackbox: change year in logs to ISO 8601 format
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 48573
diff changeset
48 1970-01-01 00:00:00.000 bob @0000000000000000000000000000000000000000 (5000)> blackbox
38016
81ca0fd348e3 tests: test failure reporting in blackbox code
Martin von Zweigbergk <martinvonz@google.com>
parents: 37995
diff changeset
49
38023
c3fd9a0f8277 dispatch: mask negative exit code recorded in blackbox log
Yuya Nishihara <yuya@tcha.org>
parents: 38022
diff changeset
50 abort exit code
c3fd9a0f8277 dispatch: mask negative exit code recorded in blackbox log
Yuya Nishihara <yuya@tcha.org>
parents: 38022
diff changeset
51 $ rm ./.hg/blackbox.log
42581
bb135a784b70 abort: added logic for of hg abort
Taapas Agrawal <taapas2897@gmail.com>
parents: 41730
diff changeset
52 $ hg abortcmd 2> /dev/null
38023
c3fd9a0f8277 dispatch: mask negative exit code recorded in blackbox log
Yuya Nishihara <yuya@tcha.org>
parents: 38022
diff changeset
53 [255]
c3fd9a0f8277 dispatch: mask negative exit code recorded in blackbox log
Yuya Nishihara <yuya@tcha.org>
parents: 38022
diff changeset
54 $ hg blackbox -l 2
48574
abbecb5cd6f3 blackbox: change year in logs to ISO 8601 format
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 48573
diff changeset
55 1970-01-01 00:00:00.000 bob @0000000000000000000000000000000000000000 (5000)> abortcmd exited 255 after * seconds (glob)
abbecb5cd6f3 blackbox: change year in logs to ISO 8601 format
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 48573
diff changeset
56 1970-01-01 00:00:00.000 bob @0000000000000000000000000000000000000000 (5000)> blackbox -l 2
38023
c3fd9a0f8277 dispatch: mask negative exit code recorded in blackbox log
Yuya Nishihara <yuya@tcha.org>
parents: 38022
diff changeset
57
38016
81ca0fd348e3 tests: test failure reporting in blackbox code
Martin von Zweigbergk <martinvonz@google.com>
parents: 37995
diff changeset
58 unhandled exception
81ca0fd348e3 tests: test failure reporting in blackbox code
Martin von Zweigbergk <martinvonz@google.com>
parents: 37995
diff changeset
59 $ rm ./.hg/blackbox.log
43803
e6cda6efb12a tests: expect return status 255 on exception for test-blackbox.t with chg
Kyle Lippincott <spectral@google.com>
parents: 43802
diff changeset
60 #if chg
e6cda6efb12a tests: expect return status 255 on exception for test-blackbox.t with chg
Kyle Lippincott <spectral@google.com>
parents: 43802
diff changeset
61 (chg exits 255 because it fails to receive an exit code)
e6cda6efb12a tests: expect return status 255 on exception for test-blackbox.t with chg
Kyle Lippincott <spectral@google.com>
parents: 43802
diff changeset
62 $ hg crash 2>/dev/null
e6cda6efb12a tests: expect return status 255 on exception for test-blackbox.t with chg
Kyle Lippincott <spectral@google.com>
parents: 43802
diff changeset
63 [255]
e6cda6efb12a tests: expect return status 255 on exception for test-blackbox.t with chg
Kyle Lippincott <spectral@google.com>
parents: 43802
diff changeset
64 #else
e6cda6efb12a tests: expect return status 255 on exception for test-blackbox.t with chg
Kyle Lippincott <spectral@google.com>
parents: 43802
diff changeset
65 (hg exits 1 because Python default exit code for uncaught exception is 1)
e6cda6efb12a tests: expect return status 255 on exception for test-blackbox.t with chg
Kyle Lippincott <spectral@google.com>
parents: 43802
diff changeset
66 $ hg crash 2>/dev/null
38016
81ca0fd348e3 tests: test failure reporting in blackbox code
Martin von Zweigbergk <martinvonz@google.com>
parents: 37995
diff changeset
67 [1]
43803
e6cda6efb12a tests: expect return status 255 on exception for test-blackbox.t with chg
Kyle Lippincott <spectral@google.com>
parents: 43802
diff changeset
68 #endif
38016
81ca0fd348e3 tests: test failure reporting in blackbox code
Martin von Zweigbergk <martinvonz@google.com>
parents: 37995
diff changeset
69 $ hg blackbox -l 2
48574
abbecb5cd6f3 blackbox: change year in logs to ISO 8601 format
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 48573
diff changeset
70 1970-01-01 00:00:00.000 bob @0000000000000000000000000000000000000000 (5000)> crash exited 1 after * seconds (glob)
abbecb5cd6f3 blackbox: change year in logs to ISO 8601 format
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 48573
diff changeset
71 1970-01-01 00:00:00.000 bob @0000000000000000000000000000000000000000 (5000)> blackbox -l 2
38016
81ca0fd348e3 tests: test failure reporting in blackbox code
Martin von Zweigbergk <martinvonz@google.com>
parents: 37995
diff changeset
72
29846
318e2b600b80 blackbox: also log alias expansions
Augie Fackler <augie@google.com>
parents: 28888
diff changeset
73 alias expansion is logged
34297
7f02fb920121 tests: clean up blackbox test around aliases a little bit
Augie Fackler <augie@google.com>
parents: 34276
diff changeset
74 $ rm ./.hg/blackbox.log
29846
318e2b600b80 blackbox: also log alias expansions
Augie Fackler <augie@google.com>
parents: 28888
diff changeset
75 $ hg confuse
318e2b600b80 blackbox: also log alias expansions
Augie Fackler <augie@google.com>
parents: 28888
diff changeset
76 $ hg blackbox
48574
abbecb5cd6f3 blackbox: change year in logs to ISO 8601 format
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 48573
diff changeset
77 1970-01-01 00:00:00.000 bob @0000000000000000000000000000000000000000 (5000)> confuse
abbecb5cd6f3 blackbox: change year in logs to ISO 8601 format
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 48573
diff changeset
78 1970-01-01 00:00:00.000 bob @0000000000000000000000000000000000000000 (5000)> alias 'confuse' expands to 'log --limit 3'
abbecb5cd6f3 blackbox: change year in logs to ISO 8601 format
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 48573
diff changeset
79 1970-01-01 00:00:00.000 bob @0000000000000000000000000000000000000000 (5000)> confuse exited 0 after * seconds (glob)
abbecb5cd6f3 blackbox: change year in logs to ISO 8601 format
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 48573
diff changeset
80 1970-01-01 00:00:00.000 bob @0000000000000000000000000000000000000000 (5000)> blackbox
29846
318e2b600b80 blackbox: also log alias expansions
Augie Fackler <augie@google.com>
parents: 28888
diff changeset
81
34298
25e1a8876cc0 tests: add a test for blackbox with nested alias configurations
Augie Fackler <augie@google.com>
parents: 34297
diff changeset
82 recursive aliases work correctly
25e1a8876cc0 tests: add a test for blackbox with nested alias configurations
Augie Fackler <augie@google.com>
parents: 34297
diff changeset
83 $ rm ./.hg/blackbox.log
25e1a8876cc0 tests: add a test for blackbox with nested alias configurations
Augie Fackler <augie@google.com>
parents: 34297
diff changeset
84 $ hg so-confusing
25e1a8876cc0 tests: add a test for blackbox with nested alias configurations
Augie Fackler <augie@google.com>
parents: 34297
diff changeset
85 $ hg blackbox
48574
abbecb5cd6f3 blackbox: change year in logs to ISO 8601 format
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 48573
diff changeset
86 1970-01-01 00:00:00.000 bob @0000000000000000000000000000000000000000 (5000)> so-confusing
abbecb5cd6f3 blackbox: change year in logs to ISO 8601 format
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 48573
diff changeset
87 1970-01-01 00:00:00.000 bob @0000000000000000000000000000000000000000 (5000)> alias 'so-confusing' expands to 'confuse --style compact'
abbecb5cd6f3 blackbox: change year in logs to ISO 8601 format
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 48573
diff changeset
88 1970-01-01 00:00:00.000 bob @0000000000000000000000000000000000000000 (5000)> alias 'confuse' expands to 'log --limit 3'
abbecb5cd6f3 blackbox: change year in logs to ISO 8601 format
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 48573
diff changeset
89 1970-01-01 00:00:00.000 bob @0000000000000000000000000000000000000000 (5000)> so-confusing exited 0 after * seconds (glob)
abbecb5cd6f3 blackbox: change year in logs to ISO 8601 format
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 48573
diff changeset
90 1970-01-01 00:00:00.000 bob @0000000000000000000000000000000000000000 (5000)> blackbox
34298
25e1a8876cc0 tests: add a test for blackbox with nested alias configurations
Augie Fackler <augie@google.com>
parents: 34297
diff changeset
91
40439
25f1c7bd649d blackbox: add configitem for format of log timestamps
Matt DeVore <matvore@google.com>
parents: 40369
diff changeset
92 custom date format
25f1c7bd649d blackbox: add configitem for format of log timestamps
Matt DeVore <matvore@google.com>
parents: 40369
diff changeset
93 $ rm ./.hg/blackbox.log
25f1c7bd649d blackbox: add configitem for format of log timestamps
Matt DeVore <matvore@google.com>
parents: 40369
diff changeset
94 $ hg --config blackbox.date-format='%Y-%m-%d @ %H:%M:%S' \
25f1c7bd649d blackbox: add configitem for format of log timestamps
Matt DeVore <matvore@google.com>
parents: 40369
diff changeset
95 > --config devel.default-date='1334347993 0' --traceback status
25f1c7bd649d blackbox: add configitem for format of log timestamps
Matt DeVore <matvore@google.com>
parents: 40369
diff changeset
96 A a
25f1c7bd649d blackbox: add configitem for format of log timestamps
Matt DeVore <matvore@google.com>
parents: 40369
diff changeset
97 $ hg blackbox
40442
d69cf134bd50 tests: glob over a single quote vs double quote difference on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 40439
diff changeset
98 2012-04-13 @ 20:13:13 bob @0000000000000000000000000000000000000000 (5000)> --config *blackbox.date-format=%Y-%m-%d @ %H:%M:%S* --config *devel.default-date=1334347993 0* --traceback status (glob)
d69cf134bd50 tests: glob over a single quote vs double quote difference on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 40439
diff changeset
99 2012-04-13 @ 20:13:13 bob @0000000000000000000000000000000000000000 (5000)> --config *blackbox.date-format=%Y-%m-%d @ %H:%M:%S* --config *devel.default-date=1334347993 0* --traceback status exited 0 after * seconds (glob)
48574
abbecb5cd6f3 blackbox: change year in logs to ISO 8601 format
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 48573
diff changeset
100 1970-01-01 00:00:00.000 bob @0000000000000000000000000000000000000000 (5000)> blackbox
40439
25f1c7bd649d blackbox: add configitem for format of log timestamps
Matt DeVore <matvore@google.com>
parents: 40369
diff changeset
101
18677
539210ed2069 blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents: 18674
diff changeset
102 incoming change tracking
539210ed2069 blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents: 18674
diff changeset
103
539210ed2069 blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents: 18674
diff changeset
104 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
105 $ hg commit -ma
539210ed2069 blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents: 18674
diff changeset
106 $ hg up null
539210ed2069 blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents: 18674
diff changeset
107 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
108 $ echo b > b
539210ed2069 blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents: 18674
diff changeset
109 $ hg commit -Amb
539210ed2069 blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents: 18674
diff changeset
110 adding b
539210ed2069 blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents: 18674
diff changeset
111 created new head
539210ed2069 blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents: 18674
diff changeset
112
539210ed2069 blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents: 18674
diff changeset
113 clone, commit, pull
539210ed2069 blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents: 18674
diff changeset
114 $ hg clone . ../blackboxtest2
539210ed2069 blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents: 18674
diff changeset
115 updating to branch default
539210ed2069 blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents: 18674
diff changeset
116 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
117 $ echo c > c
539210ed2069 blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents: 18674
diff changeset
118 $ hg commit -Amc
539210ed2069 blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents: 18674
diff changeset
119 adding c
539210ed2069 blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents: 18674
diff changeset
120 $ cd ../blackboxtest2
539210ed2069 blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents: 18674
diff changeset
121 $ hg pull
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35034
diff changeset
122 pulling from $TESTTMP/blackboxtest
18677
539210ed2069 blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents: 18674
diff changeset
123 searching for changes
539210ed2069 blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents: 18674
diff changeset
124 adding changesets
539210ed2069 blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents: 18674
diff changeset
125 adding manifests
539210ed2069 blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents: 18674
diff changeset
126 adding file changes
539210ed2069 blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents: 18674
diff changeset
127 added 1 changesets with 1 changes to 1 files
34661
eb586ed5d8ce transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 34299
diff changeset
128 new changesets d02f48003e62
18677
539210ed2069 blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents: 18674
diff changeset
129 (run 'hg update' to get a working copy)
51492
2e8a88e5809f branchcache: stop writing more branchcache file on disk than needed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50725
diff changeset
130 $ hg blackbox -l 4
48574
abbecb5cd6f3 blackbox: change year in logs to ISO 8601 format
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 48573
diff changeset
131 1970-01-01 00:00:00.000 bob @6563da9dcf87b1949716e38ff3e3dfaa3198eb06 (5000)> wrote branch cache (served) with 1 labels and 2 nodes
abbecb5cd6f3 blackbox: change year in logs to ISO 8601 format
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 48573
diff changeset
132 1970-01-01 00:00:00.000 bob @6563da9dcf87b1949716e38ff3e3dfaa3198eb06 (5000)> 1 incoming changes - new heads: d02f48003e62
abbecb5cd6f3 blackbox: change year in logs to ISO 8601 format
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 48573
diff changeset
133 1970-01-01 00:00:00.000 bob @6563da9dcf87b1949716e38ff3e3dfaa3198eb06 (5000)> pull exited 0 after * seconds (glob)
51492
2e8a88e5809f branchcache: stop writing more branchcache file on disk than needed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50725
diff changeset
134 1970-01-01 00:00:00.000 bob @6563da9dcf87b1949716e38ff3e3dfaa3198eb06 (5000)> blackbox -l 4
18677
539210ed2069 blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents: 18674
diff changeset
135
18786
ed39a8f94e95 blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents: 18766
diff changeset
136 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
137
ed39a8f94e95 blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents: 18766
diff changeset
138 $ hg rollback
ed39a8f94e95 blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents: 18766
diff changeset
139 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
140
28024
142891ab6e89 tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents: 26752
diff changeset
141 $ mv .hg/blackbox.log .hg/blackbox.log-
142891ab6e89 tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents: 26752
diff changeset
142 $ mkdir .hg/blackbox.log
18786
ed39a8f94e95 blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents: 18766
diff changeset
143 $ hg --debug incoming
28024
142891ab6e89 tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents: 26752
diff changeset
144 warning: cannot write to blackbox.log: * (glob)
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35034
diff changeset
145 comparing with $TESTTMP/blackboxtest
18786
ed39a8f94e95 blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents: 18766
diff changeset
146 query 1; heads
ed39a8f94e95 blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents: 18766
diff changeset
147 searching for changes
42884
775224e26d74 discovery: replace "heads" by "changesets" in a output note (BC)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42615
diff changeset
148 all local changesets known remotely
18786
ed39a8f94e95 blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents: 18766
diff changeset
149 changeset: 2:d02f48003e62c24e2659d97d30f2a83abe5d5d51
ed39a8f94e95 blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents: 18766
diff changeset
150 tag: tip
ed39a8f94e95 blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents: 18766
diff changeset
151 phase: draft
ed39a8f94e95 blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents: 18766
diff changeset
152 parent: 1:6563da9dcf87b1949716e38ff3e3dfaa3198eb06
ed39a8f94e95 blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents: 18766
diff changeset
153 parent: -1:0000000000000000000000000000000000000000
ed39a8f94e95 blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents: 18766
diff changeset
154 manifest: 2:ab9d46b053ebf45b7996f2922b9893ff4b63d892
ed39a8f94e95 blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents: 18766
diff changeset
155 user: test
ed39a8f94e95 blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents: 18766
diff changeset
156 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
157 files+: c
ed39a8f94e95 blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents: 18766
diff changeset
158 extra: branch=default
ed39a8f94e95 blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents: 18766
diff changeset
159 description:
ed39a8f94e95 blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents: 18766
diff changeset
160 c
ed39a8f94e95 blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents: 18766
diff changeset
161
ed39a8f94e95 blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents: 18766
diff changeset
162
ed39a8f94e95 blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents: 18766
diff changeset
163 $ hg pull
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35034
diff changeset
164 pulling from $TESTTMP/blackboxtest
18786
ed39a8f94e95 blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents: 18766
diff changeset
165 searching for changes
ed39a8f94e95 blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents: 18766
diff changeset
166 adding changesets
ed39a8f94e95 blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents: 18766
diff changeset
167 adding manifests
ed39a8f94e95 blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents: 18766
diff changeset
168 adding file changes
ed39a8f94e95 blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents: 18766
diff changeset
169 added 1 changesets with 1 changes to 1 files
34661
eb586ed5d8ce transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 34299
diff changeset
170 new changesets d02f48003e62
18786
ed39a8f94e95 blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents: 18766
diff changeset
171 (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
172
28024
142891ab6e89 tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents: 26752
diff changeset
173 a failure reading from the log is fatal
142891ab6e89 tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents: 26752
diff changeset
174
18786
ed39a8f94e95 blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents: 18766
diff changeset
175 $ hg blackbox -l 3
28024
142891ab6e89 tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents: 26752
diff changeset
176 abort: *$TESTTMP/blackboxtest2/.hg/blackbox.log* (glob)
18786
ed39a8f94e95 blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents: 18766
diff changeset
177 [255]
ed39a8f94e95 blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents: 18766
diff changeset
178
28024
142891ab6e89 tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents: 26752
diff changeset
179 $ rmdir .hg/blackbox.log
142891ab6e89 tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents: 26752
diff changeset
180 $ mv .hg/blackbox.log- .hg/blackbox.log
18786
ed39a8f94e95 blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents: 18766
diff changeset
181
18766
64b5562550e2 blackbox: add backup bundle paths to blackbox logs
Durham Goode <durham@fb.com>
parents: 18720
diff changeset
182 backup bundles get logged
64b5562550e2 blackbox: add backup bundle paths to blackbox logs
Durham Goode <durham@fb.com>
parents: 18720
diff changeset
183
64b5562550e2 blackbox: add backup bundle paths to blackbox logs
Durham Goode <durham@fb.com>
parents: 18720
diff changeset
184 $ touch d
64b5562550e2 blackbox: add backup bundle paths to blackbox logs
Durham Goode <durham@fb.com>
parents: 18720
diff changeset
185 $ hg commit -Amd
64b5562550e2 blackbox: add backup bundle paths to blackbox logs
Durham Goode <durham@fb.com>
parents: 18720
diff changeset
186 adding d
64b5562550e2 blackbox: add backup bundle paths to blackbox logs
Durham Goode <durham@fb.com>
parents: 18720
diff changeset
187 created new head
64b5562550e2 blackbox: add backup bundle paths to blackbox logs
Durham Goode <durham@fb.com>
parents: 18720
diff changeset
188 $ hg strip tip
64b5562550e2 blackbox: add backup bundle paths to blackbox logs
Durham Goode <durham@fb.com>
parents: 18720
diff changeset
189 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
190 saved backup bundle to $TESTTMP/blackboxtest2/.hg/strip-backup/*-backup.hg (glob)
28025
ab6468270b83 blackbox: flush output file descriptor
timeless <timeless@mozdev.org>
parents: 28024
diff changeset
191 $ hg blackbox -l 6
48574
abbecb5cd6f3 blackbox: change year in logs to ISO 8601 format
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 48573
diff changeset
192 1970-01-01 00:00:00.000 bob @73f6ee326b27d820b0472f1a825e3a50f3dc489b (5000)> strip tip
abbecb5cd6f3 blackbox: change year in logs to ISO 8601 format
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 48573
diff changeset
193 1970-01-01 00:00:00.000 bob @6563da9dcf87b1949716e38ff3e3dfaa3198eb06 (5000)> saved backup bundle to $TESTTMP/blackboxtest2/.hg/strip-backup/73f6ee326b27-7612e004-backup.hg
51492
2e8a88e5809f branchcache: stop writing more branchcache file on disk than needed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50725
diff changeset
194 1970-01-01 00:00:00.000 bob @6563da9dcf87b1949716e38ff3e3dfaa3198eb06 (5000)> updated branch cache (base) in * seconds (glob)
2e8a88e5809f branchcache: stop writing more branchcache file on disk than needed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50725
diff changeset
195 1970-01-01 00:00:00.000 bob @6563da9dcf87b1949716e38ff3e3dfaa3198eb06 (5000)> wrote branch cache (base) with 1 labels and 2 nodes
48574
abbecb5cd6f3 blackbox: change year in logs to ISO 8601 format
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 48573
diff changeset
196 1970-01-01 00:00:00.000 bob @6563da9dcf87b1949716e38ff3e3dfaa3198eb06 (5000)> strip tip exited 0 after * seconds (glob)
abbecb5cd6f3 blackbox: change year in logs to ISO 8601 format
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 48573
diff changeset
197 1970-01-01 00:00:00.000 bob @6563da9dcf87b1949716e38ff3e3dfaa3198eb06 (5000)> blackbox -l 6
18766
64b5562550e2 blackbox: add backup bundle paths to blackbox logs
Durham Goode <durham@fb.com>
parents: 18720
diff changeset
198
18674
c61b49d059eb blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff changeset
199 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
200
c61b49d059eb blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff changeset
201 $ echo '[extensions]' >> .hg/hgrc
c61b49d059eb blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff changeset
202 $ echo 'eol=' >> .hg/hgrc
c61b49d059eb blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff changeset
203 $ echo '[hooks]' >> .hg/hgrc
c61b49d059eb blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff changeset
204 $ echo 'update = echo hooked' >> .hg/hgrc
c61b49d059eb blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff changeset
205 $ hg update
33425
886207fb18ab tests: take extra care for fsmonitor at enabling incompatible extension
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32940
diff changeset
206 The fsmonitor extension is incompatible with the eol extension and has been disabled. (fsmonitor !)
26752
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26185
diff changeset
207 hooked
26028
6fbe35588433 update: wlock the repo for the whole 'hg update' command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24763
diff changeset
208 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
32698
1b5c61d38a52 update: show the commit to which we updated in case of multiple heads (BC)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 32266
diff changeset
209 updated to "d02f48003e62: c"
28029
72072cfc7e91 update: warn about other topological heads on bare update
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 28028
diff changeset
210 1 other heads for branch "default"
33425
886207fb18ab tests: take extra care for fsmonitor at enabling incompatible extension
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32940
diff changeset
211 $ cat >> .hg/hgrc <<EOF
886207fb18ab tests: take extra care for fsmonitor at enabling incompatible extension
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32940
diff changeset
212 > [extensions]
886207fb18ab tests: take extra care for fsmonitor at enabling incompatible extension
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32940
diff changeset
213 > # disable eol, because it is not needed for subsequent tests
886207fb18ab tests: take extra care for fsmonitor at enabling incompatible extension
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32940
diff changeset
214 > # (in addition, keeping it requires extra care for fsmonitor)
886207fb18ab tests: take extra care for fsmonitor at enabling incompatible extension
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32940
diff changeset
215 > eol=!
886207fb18ab tests: take extra care for fsmonitor at enabling incompatible extension
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32940
diff changeset
216 > EOF
37507
9b16a67cef56 eol: look up partial nodeid as partial nodeid
Martin von Zweigbergk <martinvonz@google.com>
parents: 36740
diff changeset
217 $ hg blackbox -l 5
48574
abbecb5cd6f3 blackbox: change year in logs to ISO 8601 format
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 48573
diff changeset
218 1970-01-01 00:00:00.000 bob @6563da9dcf87b1949716e38ff3e3dfaa3198eb06 (5000)> update (no-chg !)
abbecb5cd6f3 blackbox: change year in logs to ISO 8601 format
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 48573
diff changeset
219 1970-01-01 00:00:00.000 bob @6563da9dcf87b1949716e38ff3e3dfaa3198eb06 (5000)> pythonhook-preupdate: hgext.eol.preupdate finished in * seconds (glob)
abbecb5cd6f3 blackbox: change year in logs to ISO 8601 format
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 48573
diff changeset
220 1970-01-01 00:00:00.000 bob @d02f48003e62c24e2659d97d30f2a83abe5d5d51 (5000)> exthook-update: echo hooked finished in * seconds (glob)
abbecb5cd6f3 blackbox: change year in logs to ISO 8601 format
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 48573
diff changeset
221 1970-01-01 00:00:00.000 bob @d02f48003e62c24e2659d97d30f2a83abe5d5d51 (5000)> update exited 0 after * seconds (glob)
abbecb5cd6f3 blackbox: change year in logs to ISO 8601 format
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 48573
diff changeset
222 1970-01-01 00:00:00.000 bob @d02f48003e62c24e2659d97d30f2a83abe5d5d51 (5000)> serve --no-profile --cmdserver chgunix --address $TESTTMP.chgsock/server.* --daemon-postexec 'chdir:/' (glob) (chg !)
abbecb5cd6f3 blackbox: change year in logs to ISO 8601 format
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 48573
diff changeset
223 1970-01-01 00:00:00.000 bob @d02f48003e62c24e2659d97d30f2a83abe5d5d51 (5000)> blackbox -l 5
18674
c61b49d059eb blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff changeset
224
19066
2cad301a7f06 blackbox: automatically rotate log files
Bryan O'Sullivan <bryano@fb.com>
parents: 18836
diff changeset
225 log rotation
2cad301a7f06 blackbox: automatically rotate log files
Bryan O'Sullivan <bryano@fb.com>
parents: 18836
diff changeset
226
2cad301a7f06 blackbox: automatically rotate log files
Bryan O'Sullivan <bryano@fb.com>
parents: 18836
diff changeset
227 $ echo '[blackbox]' >> .hg/hgrc
2cad301a7f06 blackbox: automatically rotate log files
Bryan O'Sullivan <bryano@fb.com>
parents: 18836
diff changeset
228 $ echo 'maxsize = 20 b' >> .hg/hgrc
2cad301a7f06 blackbox: automatically rotate log files
Bryan O'Sullivan <bryano@fb.com>
parents: 18836
diff changeset
229 $ echo 'maxfiles = 3' >> .hg/hgrc
2cad301a7f06 blackbox: automatically rotate log files
Bryan O'Sullivan <bryano@fb.com>
parents: 18836
diff changeset
230 $ hg status
2cad301a7f06 blackbox: automatically rotate log files
Bryan O'Sullivan <bryano@fb.com>
parents: 18836
diff changeset
231 $ hg status
2cad301a7f06 blackbox: automatically rotate log files
Bryan O'Sullivan <bryano@fb.com>
parents: 18836
diff changeset
232 $ hg status
2cad301a7f06 blackbox: automatically rotate log files
Bryan O'Sullivan <bryano@fb.com>
parents: 18836
diff changeset
233 $ 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
234 2:d02f48003e62
19066
2cad301a7f06 blackbox: automatically rotate log files
Bryan O'Sullivan <bryano@fb.com>
parents: 18836
diff changeset
235 $ ls .hg/blackbox.log*
2cad301a7f06 blackbox: automatically rotate log files
Bryan O'Sullivan <bryano@fb.com>
parents: 18836
diff changeset
236 .hg/blackbox.log
2cad301a7f06 blackbox: automatically rotate log files
Bryan O'Sullivan <bryano@fb.com>
parents: 18836
diff changeset
237 .hg/blackbox.log.1
2cad301a7f06 blackbox: automatically rotate log files
Bryan O'Sullivan <bryano@fb.com>
parents: 18836
diff changeset
238 .hg/blackbox.log.2
28024
142891ab6e89 tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents: 26752
diff changeset
239 $ cd ..
142891ab6e89 tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents: 26752
diff changeset
240
142891ab6e89 tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents: 26752
diff changeset
241 $ hg init blackboxtest3
142891ab6e89 tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents: 26752
diff changeset
242 $ cd blackboxtest3
142891ab6e89 tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents: 26752
diff changeset
243 $ hg blackbox
48574
abbecb5cd6f3 blackbox: change year in logs to ISO 8601 format
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 48573
diff changeset
244 1970-01-01 00:00:00.000 bob @0000000000000000000000000000000000000000 (5000)> init blackboxtest3 exited 0 after * seconds (glob)
abbecb5cd6f3 blackbox: change year in logs to ISO 8601 format
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 48573
diff changeset
245 1970-01-01 00:00:00.000 bob @0000000000000000000000000000000000000000 (5000)> blackbox
28024
142891ab6e89 tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents: 26752
diff changeset
246 $ mv .hg/blackbox.log .hg/blackbox.log-
142891ab6e89 tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents: 26752
diff changeset
247 $ mkdir .hg/blackbox.log
28336
a5a13eeffc59 tests: Solaris sed does not support "\n" meaning newline in the RHS of s///
Danek Duvall <danek.duvall@oracle.com>
parents: 28248
diff changeset
248 $ sed -e 's/\(.*test1.*\)/#\1/; s#\(.*commit2.*\)#os.rmdir(".hg/blackbox.log")\
a5a13eeffc59 tests: Solaris sed does not support "\n" meaning newline in the RHS of s///
Danek Duvall <danek.duvall@oracle.com>
parents: 28248
diff changeset
249 > os.rename(".hg/blackbox.log-", ".hg/blackbox.log")\
a5a13eeffc59 tests: Solaris sed does not support "\n" meaning newline in the RHS of s///
Danek Duvall <danek.duvall@oracle.com>
parents: 28248
diff changeset
250 > \1#' $TESTDIR/test-dispatch.py > ../test-dispatch.py
39707
5abc47d4ca6b tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents: 38023
diff changeset
251 $ "$PYTHON" $TESTDIR/blackbox-readonly-dispatch.py
35724
853bf7d90804 blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents: 35393
diff changeset
252 running: --debug add foo
35729
7415cc923613 test-blackbox: stabilize for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 35724
diff changeset
253 warning: cannot write to blackbox.log: Is a directory (no-windows !)
7415cc923613 test-blackbox: stabilize for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 35724
diff changeset
254 warning: cannot write to blackbox.log: $TESTTMP/blackboxtest3/.hg/blackbox.log: Access is denied (windows !)
35724
853bf7d90804 blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents: 35393
diff changeset
255 adding foo
28024
142891ab6e89 tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents: 26752
diff changeset
256 result: 0
35724
853bf7d90804 blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents: 35393
diff changeset
257 running: --debug commit -m commit1 -d 2000-01-01 foo
35729
7415cc923613 test-blackbox: stabilize for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 35724
diff changeset
258 warning: cannot write to blackbox.log: Is a directory (no-windows !)
7415cc923613 test-blackbox: stabilize for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 35724
diff changeset
259 warning: cannot write to blackbox.log: $TESTTMP/blackboxtest3/.hg/blackbox.log: Access is denied (windows !)
35724
853bf7d90804 blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents: 35393
diff changeset
260 committing files:
853bf7d90804 blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents: 35393
diff changeset
261 foo
853bf7d90804 blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents: 35393
diff changeset
262 committing manifest
853bf7d90804 blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents: 35393
diff changeset
263 committing changelog
853bf7d90804 blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents: 35393
diff changeset
264 updating the branch cache
853bf7d90804 blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents: 35393
diff changeset
265 committed changeset 0:0e46349438790c460c5c9f7546bfcd39b267bbd2
37995
6f9ac3cb0987 dispatch: unify handling of None returned by a command function
Yuya Nishihara <yuya@tcha.org>
parents: 37507
diff changeset
266 result: 0
35724
853bf7d90804 blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents: 35393
diff changeset
267 running: --debug commit -m commit2 -d 2000-01-02 foo
853bf7d90804 blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents: 35393
diff changeset
268 committing files:
853bf7d90804 blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents: 35393
diff changeset
269 foo
853bf7d90804 blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents: 35393
diff changeset
270 committing manifest
853bf7d90804 blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents: 35393
diff changeset
271 committing changelog
853bf7d90804 blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents: 35393
diff changeset
272 updating the branch cache
853bf7d90804 blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents: 35393
diff changeset
273 committed changeset 1:45589e459b2edfbf3dbde7e01f611d2c1e7453d7
37995
6f9ac3cb0987 dispatch: unify handling of None returned by a command function
Yuya Nishihara <yuya@tcha.org>
parents: 37507
diff changeset
274 result: 0
35724
853bf7d90804 blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents: 35393
diff changeset
275 running: --debug log -r 0
853bf7d90804 blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents: 35393
diff changeset
276 changeset: 0:0e46349438790c460c5c9f7546bfcd39b267bbd2
853bf7d90804 blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents: 35393
diff changeset
277 phase: draft
853bf7d90804 blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents: 35393
diff changeset
278 parent: -1:0000000000000000000000000000000000000000
853bf7d90804 blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents: 35393
diff changeset
279 parent: -1:0000000000000000000000000000000000000000
853bf7d90804 blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents: 35393
diff changeset
280 manifest: 0:9091aa5df980aea60860a2e39c95182e68d1ddec
28024
142891ab6e89 tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents: 26752
diff changeset
281 user: test
142891ab6e89 tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents: 26752
diff changeset
282 date: Sat Jan 01 00:00:00 2000 +0000
35724
853bf7d90804 blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents: 35393
diff changeset
283 files+: foo
853bf7d90804 blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents: 35393
diff changeset
284 extra: branch=default
853bf7d90804 blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents: 35393
diff changeset
285 description:
853bf7d90804 blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents: 35393
diff changeset
286 commit1
853bf7d90804 blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents: 35393
diff changeset
287
28024
142891ab6e89 tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents: 26752
diff changeset
288
37995
6f9ac3cb0987 dispatch: unify handling of None returned by a command function
Yuya Nishihara <yuya@tcha.org>
parents: 37507
diff changeset
289 result: 0
35724
853bf7d90804 blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents: 35393
diff changeset
290 running: --debug log -r tip
853bf7d90804 blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents: 35393
diff changeset
291 changeset: 1:45589e459b2edfbf3dbde7e01f611d2c1e7453d7
28024
142891ab6e89 tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents: 26752
diff changeset
292 tag: tip
35724
853bf7d90804 blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents: 35393
diff changeset
293 phase: draft
853bf7d90804 blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents: 35393
diff changeset
294 parent: 0:0e46349438790c460c5c9f7546bfcd39b267bbd2
853bf7d90804 blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents: 35393
diff changeset
295 parent: -1:0000000000000000000000000000000000000000
853bf7d90804 blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents: 35393
diff changeset
296 manifest: 1:895aa9b7886f89dd017a6d62524e1f9180b04df9
28024
142891ab6e89 tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents: 26752
diff changeset
297 user: test
142891ab6e89 tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents: 26752
diff changeset
298 date: Sun Jan 02 00:00:00 2000 +0000
35724
853bf7d90804 blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents: 35393
diff changeset
299 files: foo
853bf7d90804 blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents: 35393
diff changeset
300 extra: branch=default
853bf7d90804 blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents: 35393
diff changeset
301 description:
853bf7d90804 blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents: 35393
diff changeset
302 commit2
853bf7d90804 blackbox: if --debug is used, also trace ui.debug() calls
Joerg Sonnenberger <joerg@bec.de>
parents: 35393
diff changeset
303
28024
142891ab6e89 tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents: 26752
diff changeset
304
37995
6f9ac3cb0987 dispatch: unify handling of None returned by a command function
Yuya Nishihara <yuya@tcha.org>
parents: 37507
diff changeset
305 result: 0
28024
142891ab6e89 tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents: 26752
diff changeset
306 $ hg blackbox
48574
abbecb5cd6f3 blackbox: change year in logs to ISO 8601 format
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 48573
diff changeset
307 1970-01-01 00:00:00.000 bob @45589e459b2edfbf3dbde7e01f611d2c1e7453d7 (5000)> updating the branch cache
abbecb5cd6f3 blackbox: change year in logs to ISO 8601 format
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 48573
diff changeset
308 1970-01-01 00:00:00.000 bob @45589e459b2edfbf3dbde7e01f611d2c1e7453d7 (5000)> updated branch cache (served) in * seconds (glob)
abbecb5cd6f3 blackbox: change year in logs to ISO 8601 format
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 48573
diff changeset
309 1970-01-01 00:00:00.000 bob @45589e459b2edfbf3dbde7e01f611d2c1e7453d7 (5000)> wrote branch cache (served) with 1 labels and 1 nodes
abbecb5cd6f3 blackbox: change year in logs to ISO 8601 format
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 48573
diff changeset
310 1970-01-01 00:00:00.000 bob @45589e459b2edfbf3dbde7e01f611d2c1e7453d7 (5000)> --debug commit -m commit2 -d 2000-01-02 foo exited 0 after *.?? seconds (glob)
abbecb5cd6f3 blackbox: change year in logs to ISO 8601 format
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 48573
diff changeset
311 1970-01-01 00:00:00.000 bob @45589e459b2edfbf3dbde7e01f611d2c1e7453d7 (5000)> --debug log -r 0
abbecb5cd6f3 blackbox: change year in logs to ISO 8601 format
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 48573
diff changeset
312 1970-01-01 00:00:00.000 bob @45589e459b2edfbf3dbde7e01f611d2c1e7453d7 (5000)> writing .hg/cache/tags2-visible with 0 tags
abbecb5cd6f3 blackbox: change year in logs to ISO 8601 format
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 48573
diff changeset
313 1970-01-01 00:00:00.000 bob @45589e459b2edfbf3dbde7e01f611d2c1e7453d7 (5000)> --debug log -r 0 exited 0 after *.?? seconds (glob)
abbecb5cd6f3 blackbox: change year in logs to ISO 8601 format
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 48573
diff changeset
314 1970-01-01 00:00:00.000 bob @45589e459b2edfbf3dbde7e01f611d2c1e7453d7 (5000)> --debug log -r tip
abbecb5cd6f3 blackbox: change year in logs to ISO 8601 format
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 48573
diff changeset
315 1970-01-01 00:00:00.000 bob @45589e459b2edfbf3dbde7e01f611d2c1e7453d7 (5000)> --debug log -r tip exited 0 after *.?? seconds (glob)
abbecb5cd6f3 blackbox: change year in logs to ISO 8601 format
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 48573
diff changeset
316 1970-01-01 00:00:00.000 bob @45589e459b2edfbf3dbde7e01f611d2c1e7453d7 (5000)> blackbox
19066
2cad301a7f06 blackbox: automatically rotate log files
Bryan O'Sullivan <bryano@fb.com>
parents: 18836
diff changeset
317
46892
4a6024b87dfc blackbox: fix type error on log rotation on read-only filesystem
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents: 46314
diff changeset
318 Skip rotation if the .hg is read-only
4a6024b87dfc blackbox: fix type error on log rotation on read-only filesystem
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents: 46314
diff changeset
319
4a6024b87dfc blackbox: fix type error on log rotation on read-only filesystem
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents: 46314
diff changeset
320 #if unix-permissions
4a6024b87dfc blackbox: fix type error on log rotation on read-only filesystem
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents: 46314
diff changeset
321 $ chmod -w .hg
4a6024b87dfc blackbox: fix type error on log rotation on read-only filesystem
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents: 46314
diff changeset
322 $ hg log -r. -T '{rev}\n' --config blackbox.maxsize=1 --debug
50292
adecb1ab4a0d tests: add a rewriting step to detect EACCES errors
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 48876
diff changeset
323 warning: cannot rename '$TESTTMP/blackboxtest3/.hg/blackbox.log.1' to '$TESTTMP/blackboxtest3/.hg/blackbox.log': $EACCES$
adecb1ab4a0d tests: add a rewriting step to detect EACCES errors
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 48876
diff changeset
324 warning: cannot write to blackbox.log: $EACCES$
46892
4a6024b87dfc blackbox: fix type error on log rotation on read-only filesystem
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents: 46314
diff changeset
325 1
4a6024b87dfc blackbox: fix type error on log rotation on read-only filesystem
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents: 46314
diff changeset
326 $ chmod +w .hg
4a6024b87dfc blackbox: fix type error on log rotation on read-only filesystem
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents: 46314
diff changeset
327 #endif
4a6024b87dfc blackbox: fix type error on log rotation on read-only filesystem
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents: 46314
diff changeset
328
28407
63da8bd0c65e blackbox: guard against recursion from dirty check
timeless <timeless@mozdev.org>
parents: 28406
diff changeset
329 Test log recursion from dirty status check
63da8bd0c65e blackbox: guard against recursion from dirty check
timeless <timeless@mozdev.org>
parents: 28406
diff changeset
330
63da8bd0c65e blackbox: guard against recursion from dirty check
timeless <timeless@mozdev.org>
parents: 28406
diff changeset
331 $ cat > ../r.py <<EOF
63da8bd0c65e blackbox: guard against recursion from dirty check
timeless <timeless@mozdev.org>
parents: 28406
diff changeset
332 > from mercurial import context, error, extensions
63da8bd0c65e blackbox: guard against recursion from dirty check
timeless <timeless@mozdev.org>
parents: 28406
diff changeset
333 > x=[False]
63da8bd0c65e blackbox: guard against recursion from dirty check
timeless <timeless@mozdev.org>
parents: 28406
diff changeset
334 > def status(orig, *args, **opts):
36740
2aff6daf7790 py3: byte-stringify test-blackbox.t
Yuya Nishihara <yuya@tcha.org>
parents: 35729
diff changeset
335 > args[0].repo().ui.log(b"broken", b"recursion?")
28407
63da8bd0c65e blackbox: guard against recursion from dirty check
timeless <timeless@mozdev.org>
parents: 28406
diff changeset
336 > return orig(*args, **opts)
63da8bd0c65e blackbox: guard against recursion from dirty check
timeless <timeless@mozdev.org>
parents: 28406
diff changeset
337 > def reposetup(ui, repo):
63da8bd0c65e blackbox: guard against recursion from dirty check
timeless <timeless@mozdev.org>
parents: 28406
diff changeset
338 > extensions.wrapfunction(context.basectx, 'status', status)
63da8bd0c65e blackbox: guard against recursion from dirty check
timeless <timeless@mozdev.org>
parents: 28406
diff changeset
339 > EOF
63da8bd0c65e blackbox: guard against recursion from dirty check
timeless <timeless@mozdev.org>
parents: 28406
diff changeset
340 $ hg id --config extensions.x=../r.py --config blackbox.dirty=True
63da8bd0c65e blackbox: guard against recursion from dirty check
timeless <timeless@mozdev.org>
parents: 28406
diff changeset
341 45589e459b2e tip
63da8bd0c65e blackbox: guard against recursion from dirty check
timeless <timeless@mozdev.org>
parents: 28406
diff changeset
342
18674
c61b49d059eb blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff changeset
343 cleanup
c61b49d059eb blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff changeset
344 $ cd ..
34107
4f60720cf0df blackbox: fix rotation with chg
Jun Wu <quark@fb.com>
parents: 34106
diff changeset
345
40797
ea2688c84e4b blackbox: just try writing to repo.vfs and update lastlogger on success
Yuya Nishihara <yuya@tcha.org>
parents: 40442
diff changeset
346 Test missing log directory, which shouldn't be created automatically
ea2688c84e4b blackbox: just try writing to repo.vfs and update lastlogger on success
Yuya Nishihara <yuya@tcha.org>
parents: 40442
diff changeset
347
ea2688c84e4b blackbox: just try writing to repo.vfs and update lastlogger on success
Yuya Nishihara <yuya@tcha.org>
parents: 40442
diff changeset
348 $ cat <<'EOF' > closeremove.py
ea2688c84e4b blackbox: just try writing to repo.vfs and update lastlogger on success
Yuya Nishihara <yuya@tcha.org>
parents: 40442
diff changeset
349 > def reposetup(ui, repo):
ea2688c84e4b blackbox: just try writing to repo.vfs and update lastlogger on success
Yuya Nishihara <yuya@tcha.org>
parents: 40442
diff changeset
350 > class rmrepo(repo.__class__):
ea2688c84e4b blackbox: just try writing to repo.vfs and update lastlogger on success
Yuya Nishihara <yuya@tcha.org>
parents: 40442
diff changeset
351 > def close(self):
ea2688c84e4b blackbox: just try writing to repo.vfs and update lastlogger on success
Yuya Nishihara <yuya@tcha.org>
parents: 40442
diff changeset
352 > super(rmrepo, self).close()
ea2688c84e4b blackbox: just try writing to repo.vfs and update lastlogger on success
Yuya Nishihara <yuya@tcha.org>
parents: 40442
diff changeset
353 > self.ui.debug(b'removing %s\n' % self.vfs.base)
ea2688c84e4b blackbox: just try writing to repo.vfs and update lastlogger on success
Yuya Nishihara <yuya@tcha.org>
parents: 40442
diff changeset
354 > self.vfs.rmtree()
ea2688c84e4b blackbox: just try writing to repo.vfs and update lastlogger on success
Yuya Nishihara <yuya@tcha.org>
parents: 40442
diff changeset
355 > repo.__class__ = rmrepo
ea2688c84e4b blackbox: just try writing to repo.vfs and update lastlogger on success
Yuya Nishihara <yuya@tcha.org>
parents: 40442
diff changeset
356 > EOF
ea2688c84e4b blackbox: just try writing to repo.vfs and update lastlogger on success
Yuya Nishihara <yuya@tcha.org>
parents: 40442
diff changeset
357
ea2688c84e4b blackbox: just try writing to repo.vfs and update lastlogger on success
Yuya Nishihara <yuya@tcha.org>
parents: 40442
diff changeset
358 $ hg init gone
ea2688c84e4b blackbox: just try writing to repo.vfs and update lastlogger on success
Yuya Nishihara <yuya@tcha.org>
parents: 40442
diff changeset
359 $ cd gone
ea2688c84e4b blackbox: just try writing to repo.vfs and update lastlogger on success
Yuya Nishihara <yuya@tcha.org>
parents: 40442
diff changeset
360 $ cat <<'EOF' > .hg/hgrc
ea2688c84e4b blackbox: just try writing to repo.vfs and update lastlogger on success
Yuya Nishihara <yuya@tcha.org>
parents: 40442
diff changeset
361 > [extensions]
ea2688c84e4b blackbox: just try writing to repo.vfs and update lastlogger on success
Yuya Nishihara <yuya@tcha.org>
parents: 40442
diff changeset
362 > closeremove = ../closeremove.py
ea2688c84e4b blackbox: just try writing to repo.vfs and update lastlogger on success
Yuya Nishihara <yuya@tcha.org>
parents: 40442
diff changeset
363 > EOF
ea2688c84e4b blackbox: just try writing to repo.vfs and update lastlogger on success
Yuya Nishihara <yuya@tcha.org>
parents: 40442
diff changeset
364 $ hg log --debug
ea2688c84e4b blackbox: just try writing to repo.vfs and update lastlogger on success
Yuya Nishihara <yuya@tcha.org>
parents: 40442
diff changeset
365 removing $TESTTMP/gone/.hg
40808
c460b1643eb0 tests: stabilize test-blackbox.t on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 40797
diff changeset
366 warning: cannot write to blackbox.log: $ENOENT$ (no-windows !)
c460b1643eb0 tests: stabilize test-blackbox.t on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 40797
diff changeset
367 warning: cannot write to blackbox.log: $TESTTMP/gone/.hg/blackbox.log: $ENOTDIR$ (windows !)
40797
ea2688c84e4b blackbox: just try writing to repo.vfs and update lastlogger on success
Yuya Nishihara <yuya@tcha.org>
parents: 40442
diff changeset
368 $ cd ..
ea2688c84e4b blackbox: just try writing to repo.vfs and update lastlogger on success
Yuya Nishihara <yuya@tcha.org>
parents: 40442
diff changeset
369
41632
31dfe7026f8d blackbox: test that unsetting track disables blackbox logging
Kyle Lippincott <spectral@google.com>
parents: 40992
diff changeset
370 blackbox should disable itself if track is empty
31dfe7026f8d blackbox: test that unsetting track disables blackbox logging
Kyle Lippincott <spectral@google.com>
parents: 40992
diff changeset
371
31dfe7026f8d blackbox: test that unsetting track disables blackbox logging
Kyle Lippincott <spectral@google.com>
parents: 40992
diff changeset
372 $ hg --config blackbox.track= init nothing_tracked
31dfe7026f8d blackbox: test that unsetting track disables blackbox logging
Kyle Lippincott <spectral@google.com>
parents: 40992
diff changeset
373 $ cd nothing_tracked
31dfe7026f8d blackbox: test that unsetting track disables blackbox logging
Kyle Lippincott <spectral@google.com>
parents: 40992
diff changeset
374 $ cat >> .hg/hgrc << EOF
31dfe7026f8d blackbox: test that unsetting track disables blackbox logging
Kyle Lippincott <spectral@google.com>
parents: 40992
diff changeset
375 > [blackbox]
31dfe7026f8d blackbox: test that unsetting track disables blackbox logging
Kyle Lippincott <spectral@google.com>
parents: 40992
diff changeset
376 > track =
31dfe7026f8d blackbox: test that unsetting track disables blackbox logging
Kyle Lippincott <spectral@google.com>
parents: 40992
diff changeset
377 > EOF
31dfe7026f8d blackbox: test that unsetting track disables blackbox logging
Kyle Lippincott <spectral@google.com>
parents: 40992
diff changeset
378 $ hg blackbox
31dfe7026f8d blackbox: test that unsetting track disables blackbox logging
Kyle Lippincott <spectral@google.com>
parents: 40992
diff changeset
379 $ cd $TESTTMP
31dfe7026f8d blackbox: test that unsetting track disables blackbox logging
Kyle Lippincott <spectral@google.com>
parents: 40992
diff changeset
380
41633
7b1b0415f8e5 blackbox: test that track=* works to log everything
Kyle Lippincott <spectral@google.com>
parents: 41632
diff changeset
381 a '*' entry in blackbox.track is interpreted as log everything
7b1b0415f8e5 blackbox: test that track=* works to log everything
Kyle Lippincott <spectral@google.com>
parents: 41632
diff changeset
382
7b1b0415f8e5 blackbox: test that track=* works to log everything
Kyle Lippincott <spectral@google.com>
parents: 41632
diff changeset
383 $ hg --config blackbox.track='*' \
7b1b0415f8e5 blackbox: test that track=* works to log everything
Kyle Lippincott <spectral@google.com>
parents: 41632
diff changeset
384 > --config blackbox.logsource=True \
7b1b0415f8e5 blackbox: test that track=* works to log everything
Kyle Lippincott <spectral@google.com>
parents: 41632
diff changeset
385 > init track_star
7b1b0415f8e5 blackbox: test that track=* works to log everything
Kyle Lippincott <spectral@google.com>
parents: 41632
diff changeset
386 $ cd track_star
7b1b0415f8e5 blackbox: test that track=* works to log everything
Kyle Lippincott <spectral@google.com>
parents: 41632
diff changeset
387 $ cat >> .hg/hgrc << EOF
7b1b0415f8e5 blackbox: test that track=* works to log everything
Kyle Lippincott <spectral@google.com>
parents: 41632
diff changeset
388 > [blackbox]
7b1b0415f8e5 blackbox: test that track=* works to log everything
Kyle Lippincott <spectral@google.com>
parents: 41632
diff changeset
389 > logsource = True
7b1b0415f8e5 blackbox: test that track=* works to log everything
Kyle Lippincott <spectral@google.com>
parents: 41632
diff changeset
390 > track = *
7b1b0415f8e5 blackbox: test that track=* works to log everything
Kyle Lippincott <spectral@google.com>
parents: 41632
diff changeset
391 > EOF
7b1b0415f8e5 blackbox: test that track=* works to log everything
Kyle Lippincott <spectral@google.com>
parents: 41632
diff changeset
392 (only look for entries with specific logged sources, otherwise this test is
7b1b0415f8e5 blackbox: test that track=* works to log everything
Kyle Lippincott <spectral@google.com>
parents: 41632
diff changeset
393 pretty brittle)
50725
7e5be4a7cda7 tests: use grep -E instead of obsolescent egrep
Mads Kiilerich <mads@kiilerich.com>
parents: 50301
diff changeset
394 $ hg blackbox | grep -E '\[command(finish)?\]'
48574
abbecb5cd6f3 blackbox: change year in logs to ISO 8601 format
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 48573
diff changeset
395 1970-01-01 00:00:00.000 bob @0000000000000000000000000000000000000000 (5000) [commandfinish]> --config *blackbox.track=* --config *blackbox.logsource=True* init track_star exited 0 after * seconds (glob)
abbecb5cd6f3 blackbox: change year in logs to ISO 8601 format
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 48573
diff changeset
396 1970-01-01 00:00:00.000 bob @0000000000000000000000000000000000000000 (5000) [command]> blackbox
41633
7b1b0415f8e5 blackbox: test that track=* works to log everything
Kyle Lippincott <spectral@google.com>
parents: 41632
diff changeset
397 $ cd $TESTTMP
7b1b0415f8e5 blackbox: test that track=* works to log everything
Kyle Lippincott <spectral@google.com>
parents: 41632
diff changeset
398
34107
4f60720cf0df blackbox: fix rotation with chg
Jun Wu <quark@fb.com>
parents: 34106
diff changeset
399 #if chg
4f60720cf0df blackbox: fix rotation with chg
Jun Wu <quark@fb.com>
parents: 34106
diff changeset
400
4f60720cf0df blackbox: fix rotation with chg
Jun Wu <quark@fb.com>
parents: 34106
diff changeset
401 when using chg, blackbox.log should get rotated correctly
4f60720cf0df blackbox: fix rotation with chg
Jun Wu <quark@fb.com>
parents: 34106
diff changeset
402
4f60720cf0df blackbox: fix rotation with chg
Jun Wu <quark@fb.com>
parents: 34106
diff changeset
403 $ cat > $TESTTMP/noop.py << EOF
4f60720cf0df blackbox: fix rotation with chg
Jun Wu <quark@fb.com>
parents: 34106
diff changeset
404 > import time
4f60720cf0df blackbox: fix rotation with chg
Jun Wu <quark@fb.com>
parents: 34106
diff changeset
405 > from mercurial import registrar, scmutil
4f60720cf0df blackbox: fix rotation with chg
Jun Wu <quark@fb.com>
parents: 34106
diff changeset
406 > cmdtable = {}
4f60720cf0df blackbox: fix rotation with chg
Jun Wu <quark@fb.com>
parents: 34106
diff changeset
407 > command = registrar.command(cmdtable)
43802
c6b4c348360e tests: fix command name in test-blackbox.t to be bytes
Kyle Lippincott <spectral@google.com>
parents: 42884
diff changeset
408 > @command(b'noop')
34107
4f60720cf0df blackbox: fix rotation with chg
Jun Wu <quark@fb.com>
parents: 34106
diff changeset
409 > def noop(ui, repo):
4f60720cf0df blackbox: fix rotation with chg
Jun Wu <quark@fb.com>
parents: 34106
diff changeset
410 > pass
4f60720cf0df blackbox: fix rotation with chg
Jun Wu <quark@fb.com>
parents: 34106
diff changeset
411 > EOF
4f60720cf0df blackbox: fix rotation with chg
Jun Wu <quark@fb.com>
parents: 34106
diff changeset
412
4f60720cf0df blackbox: fix rotation with chg
Jun Wu <quark@fb.com>
parents: 34106
diff changeset
413 $ hg init blackbox-chg
4f60720cf0df blackbox: fix rotation with chg
Jun Wu <quark@fb.com>
parents: 34106
diff changeset
414 $ cd blackbox-chg
4f60720cf0df blackbox: fix rotation with chg
Jun Wu <quark@fb.com>
parents: 34106
diff changeset
415
4f60720cf0df blackbox: fix rotation with chg
Jun Wu <quark@fb.com>
parents: 34106
diff changeset
416 $ cat > .hg/hgrc << EOF
4f60720cf0df blackbox: fix rotation with chg
Jun Wu <quark@fb.com>
parents: 34106
diff changeset
417 > [blackbox]
4f60720cf0df blackbox: fix rotation with chg
Jun Wu <quark@fb.com>
parents: 34106
diff changeset
418 > maxsize = 500B
4f60720cf0df blackbox: fix rotation with chg
Jun Wu <quark@fb.com>
parents: 34106
diff changeset
419 > [extensions]
4f60720cf0df blackbox: fix rotation with chg
Jun Wu <quark@fb.com>
parents: 34106
diff changeset
420 > # extension change forces chg to restart
4f60720cf0df blackbox: fix rotation with chg
Jun Wu <quark@fb.com>
parents: 34106
diff changeset
421 > noop=$TESTTMP/noop.py
4f60720cf0df blackbox: fix rotation with chg
Jun Wu <quark@fb.com>
parents: 34106
diff changeset
422 > EOF
4f60720cf0df blackbox: fix rotation with chg
Jun Wu <quark@fb.com>
parents: 34106
diff changeset
423
39707
5abc47d4ca6b tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents: 38023
diff changeset
424 $ "$PYTHON" -c 'print("a" * 400)' > .hg/blackbox.log
34107
4f60720cf0df blackbox: fix rotation with chg
Jun Wu <quark@fb.com>
parents: 34106
diff changeset
425 $ chg noop
4f60720cf0df blackbox: fix rotation with chg
Jun Wu <quark@fb.com>
parents: 34106
diff changeset
426 $ chg noop
4f60720cf0df blackbox: fix rotation with chg
Jun Wu <quark@fb.com>
parents: 34106
diff changeset
427 $ chg noop
4f60720cf0df blackbox: fix rotation with chg
Jun Wu <quark@fb.com>
parents: 34106
diff changeset
428 $ chg noop
4f60720cf0df blackbox: fix rotation with chg
Jun Wu <quark@fb.com>
parents: 34106
diff changeset
429 $ chg noop
4f60720cf0df blackbox: fix rotation with chg
Jun Wu <quark@fb.com>
parents: 34106
diff changeset
430
4f60720cf0df blackbox: fix rotation with chg
Jun Wu <quark@fb.com>
parents: 34106
diff changeset
431 $ cat > showsize.py << 'EOF'
40369
ef6cab7930b3 py3: fix module imports in tests, as flagged by test-check-module-imports.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 39707
diff changeset
432 > import os
ef6cab7930b3 py3: fix module imports in tests, as flagged by test-check-module-imports.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 39707
diff changeset
433 > import sys
34107
4f60720cf0df blackbox: fix rotation with chg
Jun Wu <quark@fb.com>
parents: 34106
diff changeset
434 > limit = 500
4f60720cf0df blackbox: fix rotation with chg
Jun Wu <quark@fb.com>
parents: 34106
diff changeset
435 > for p in sys.argv[1:]:
4f60720cf0df blackbox: fix rotation with chg
Jun Wu <quark@fb.com>
parents: 34106
diff changeset
436 > size = os.stat(p).st_size
4f60720cf0df blackbox: fix rotation with chg
Jun Wu <quark@fb.com>
parents: 34106
diff changeset
437 > if size >= limit:
4f60720cf0df blackbox: fix rotation with chg
Jun Wu <quark@fb.com>
parents: 34106
diff changeset
438 > desc = '>='
4f60720cf0df blackbox: fix rotation with chg
Jun Wu <quark@fb.com>
parents: 34106
diff changeset
439 > else:
4f60720cf0df blackbox: fix rotation with chg
Jun Wu <quark@fb.com>
parents: 34106
diff changeset
440 > desc = '<'
4f60720cf0df blackbox: fix rotation with chg
Jun Wu <quark@fb.com>
parents: 34106
diff changeset
441 > print('%s: %s %d' % (p, desc, limit))
4f60720cf0df blackbox: fix rotation with chg
Jun Wu <quark@fb.com>
parents: 34106
diff changeset
442 > EOF
4f60720cf0df blackbox: fix rotation with chg
Jun Wu <quark@fb.com>
parents: 34106
diff changeset
443
39707
5abc47d4ca6b tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents: 38023
diff changeset
444 $ "$PYTHON" showsize.py .hg/blackbox*
34107
4f60720cf0df blackbox: fix rotation with chg
Jun Wu <quark@fb.com>
parents: 34106
diff changeset
445 .hg/blackbox.log: < 500
4f60720cf0df blackbox: fix rotation with chg
Jun Wu <quark@fb.com>
parents: 34106
diff changeset
446 .hg/blackbox.log.1: >= 500
4f60720cf0df blackbox: fix rotation with chg
Jun Wu <quark@fb.com>
parents: 34106
diff changeset
447 .hg/blackbox.log.2: >= 500
4f60720cf0df blackbox: fix rotation with chg
Jun Wu <quark@fb.com>
parents: 34106
diff changeset
448
4f60720cf0df blackbox: fix rotation with chg
Jun Wu <quark@fb.com>
parents: 34106
diff changeset
449 $ cd ..
4f60720cf0df blackbox: fix rotation with chg
Jun Wu <quark@fb.com>
parents: 34106
diff changeset
450
34299
b1d4ac068961 blackbox: do not prevent 'chg init' from working
Jun Wu <quark@fb.com>
parents: 34298
diff changeset
451 With chg, blackbox should not create the log file if the repo is gone
b1d4ac068961 blackbox: do not prevent 'chg init' from working
Jun Wu <quark@fb.com>
parents: 34298
diff changeset
452
b1d4ac068961 blackbox: do not prevent 'chg init' from working
Jun Wu <quark@fb.com>
parents: 34298
diff changeset
453 $ hg init repo1
b1d4ac068961 blackbox: do not prevent 'chg init' from working
Jun Wu <quark@fb.com>
parents: 34298
diff changeset
454 $ hg --config extensions.a=! -R repo1 log
b1d4ac068961 blackbox: do not prevent 'chg init' from working
Jun Wu <quark@fb.com>
parents: 34298
diff changeset
455 $ rm -rf $TESTTMP/repo1
b1d4ac068961 blackbox: do not prevent 'chg init' from working
Jun Wu <quark@fb.com>
parents: 34298
diff changeset
456 $ hg --config extensions.a=! init repo1
b1d4ac068961 blackbox: do not prevent 'chg init' from working
Jun Wu <quark@fb.com>
parents: 34298
diff changeset
457
34107
4f60720cf0df blackbox: fix rotation with chg
Jun Wu <quark@fb.com>
parents: 34106
diff changeset
458 #endif
34276
b90bd9a98c8b blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents: 34107
diff changeset
459
b90bd9a98c8b blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents: 34107
diff changeset
460 blackbox should work if repo.ui.log is not called (issue5518)
b90bd9a98c8b blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents: 34107
diff changeset
461
b90bd9a98c8b blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents: 34107
diff changeset
462 $ cat > $TESTTMP/raise.py << EOF
b90bd9a98c8b blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents: 34107
diff changeset
463 > from mercurial import registrar, scmutil
b90bd9a98c8b blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents: 34107
diff changeset
464 > cmdtable = {}
b90bd9a98c8b blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents: 34107
diff changeset
465 > command = registrar.command(cmdtable)
36740
2aff6daf7790 py3: byte-stringify test-blackbox.t
Yuya Nishihara <yuya@tcha.org>
parents: 35729
diff changeset
466 > @command(b'raise')
34276
b90bd9a98c8b blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents: 34107
diff changeset
467 > def raisecmd(*args):
b90bd9a98c8b blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents: 34107
diff changeset
468 > raise RuntimeError('raise')
b90bd9a98c8b blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents: 34107
diff changeset
469 > EOF
b90bd9a98c8b blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents: 34107
diff changeset
470
50301
9fc0d244a753 dirstate: fix a potential traceback when in `copy` and `rename`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50292
diff changeset
471
9fc0d244a753 dirstate: fix a potential traceback when in `copy` and `rename`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50292
diff changeset
472 $ hg init $TESTTMP/blackbox-exception-only --config blackbox.track=commandexception
9fc0d244a753 dirstate: fix a potential traceback when in `copy` and `rename`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50292
diff changeset
473 $ cat >> $TESTTMP/blackbox-exception-only/.hg/hgrc << EOF
34276
b90bd9a98c8b blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents: 34107
diff changeset
474 > [blackbox]
b90bd9a98c8b blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents: 34107
diff changeset
475 > track = commandexception
b90bd9a98c8b blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents: 34107
diff changeset
476 > [extensions]
b90bd9a98c8b blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents: 34107
diff changeset
477 > raise=$TESTTMP/raise.py
b90bd9a98c8b blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents: 34107
diff changeset
478 > EOF
50301
9fc0d244a753 dirstate: fix a potential traceback when in `copy` and `rename`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50292
diff changeset
479 $ cd $TESTTMP/blackbox-exception-only
34276
b90bd9a98c8b blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents: 34107
diff changeset
480
b90bd9a98c8b blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents: 34107
diff changeset
481
b90bd9a98c8b blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents: 34107
diff changeset
482 #if chg
b90bd9a98c8b blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents: 34107
diff changeset
483 (chg exits 255 because it fails to receive an exit code)
b90bd9a98c8b blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents: 34107
diff changeset
484 $ hg raise 2>/dev/null
b90bd9a98c8b blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents: 34107
diff changeset
485 [255]
b90bd9a98c8b blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents: 34107
diff changeset
486 #else
b90bd9a98c8b blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents: 34107
diff changeset
487 (hg exits 1 because Python default exit code for uncaught exception is 1)
b90bd9a98c8b blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents: 34107
diff changeset
488 $ hg raise 2>/dev/null
b90bd9a98c8b blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents: 34107
diff changeset
489 [1]
b90bd9a98c8b blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents: 34107
diff changeset
490 #endif
b90bd9a98c8b blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents: 34107
diff changeset
491
b90bd9a98c8b blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents: 34107
diff changeset
492 $ head -1 .hg/blackbox.log
48574
abbecb5cd6f3 blackbox: change year in logs to ISO 8601 format
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 48573
diff changeset
493 1970-01-01 00:00:00.000 bob @0000000000000000000000000000000000000000 (5000)> ** Unknown exception encountered with possibly-broken third-party extension "mock" (version N/A)
34276
b90bd9a98c8b blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents: 34107
diff changeset
494 $ tail -2 .hg/blackbox.log
b90bd9a98c8b blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents: 34107
diff changeset
495 RuntimeError: raise
b90bd9a98c8b blackbox: set lastui even if ui.log is not called (issue5518)
Jun Wu <quark@fb.com>
parents: 34107
diff changeset
496
50301
9fc0d244a753 dirstate: fix a potential traceback when in `copy` and `rename`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50292
diff changeset
497 $ cd ..
9fc0d244a753 dirstate: fix a potential traceback when in `copy` and `rename`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50292
diff changeset
498
9fc0d244a753 dirstate: fix a potential traceback when in `copy` and `rename`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50292
diff changeset
499 Check we did not broke `hg mv`
9fc0d244a753 dirstate: fix a potential traceback when in `copy` and `rename`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50292
diff changeset
500 ------------------------------
9fc0d244a753 dirstate: fix a potential traceback when in `copy` and `rename`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50292
diff changeset
501 (we did in 6.4rc)
9fc0d244a753 dirstate: fix a potential traceback when in `copy` and `rename`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50292
diff changeset
502
9fc0d244a753 dirstate: fix a potential traceback when in `copy` and `rename`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50292
diff changeset
503 basic setup
9fc0d244a753 dirstate: fix a potential traceback when in `copy` and `rename`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50292
diff changeset
504
9fc0d244a753 dirstate: fix a potential traceback when in `copy` and `rename`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50292
diff changeset
505 $ hg init blackbox-file-move
9fc0d244a753 dirstate: fix a potential traceback when in `copy` and `rename`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50292
diff changeset
506 $ cd blackbox-file-move
9fc0d244a753 dirstate: fix a potential traceback when in `copy` and `rename`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50292
diff changeset
507 $ echo foo > foo
9fc0d244a753 dirstate: fix a potential traceback when in `copy` and `rename`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50292
diff changeset
508 $ hg add foo
9fc0d244a753 dirstate: fix a potential traceback when in `copy` and `rename`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50292
diff changeset
509 $ hg commit -m 'foo'
9fc0d244a753 dirstate: fix a potential traceback when in `copy` and `rename`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50292
diff changeset
510
9fc0d244a753 dirstate: fix a potential traceback when in `copy` and `rename`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50292
diff changeset
511 copy a file
9fc0d244a753 dirstate: fix a potential traceback when in `copy` and `rename`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50292
diff changeset
512
9fc0d244a753 dirstate: fix a potential traceback when in `copy` and `rename`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50292
diff changeset
513 $ hg copy foo bar
9fc0d244a753 dirstate: fix a potential traceback when in `copy` and `rename`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50292
diff changeset
514
9fc0d244a753 dirstate: fix a potential traceback when in `copy` and `rename`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50292
diff changeset
515 move a file
9fc0d244a753 dirstate: fix a potential traceback when in `copy` and `rename`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50292
diff changeset
516
9fc0d244a753 dirstate: fix a potential traceback when in `copy` and `rename`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50292
diff changeset
517 $ hg mv foo goo
9fc0d244a753 dirstate: fix a potential traceback when in `copy` and `rename`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50292
diff changeset
518