Show More
@@ -0,0 +1,56 b'' | |||
|
1 | Define helpers. | |
|
2 | ||
|
3 | $ hg_log () { hg log -G -T "{rev}:{node|short}"; } | |
|
4 | $ commit () { echo "foo - ${2:-$1}" > $1; hg commit -Aqm "Edited $1"; } | |
|
5 | $ strip() { hg --config extensions.strip= strip -q -r "$1" ; } | |
|
6 | ||
|
7 | Setup hg repo. | |
|
8 | ||
|
9 | $ hg init repo | |
|
10 | $ cd repo | |
|
11 | $ touch x; hg add x; hg commit -m "initial" | |
|
12 | $ hg clone -q . ../clone | |
|
13 | $ commit a | |
|
14 | ||
|
15 | $ cd ../clone | |
|
16 | ||
|
17 | $ commit b | |
|
18 | ||
|
19 | $ hg pull -q ../repo | |
|
20 | ||
|
21 | $ cat .hg/cache/branch2-visible | |
|
22 | 222ae9789a75703f9836e44de7db179cbfd420ee 2 | |
|
23 | a3498d6e39376d2456425dd8c692367bdbf00fa2 o default | |
|
24 | 222ae9789a75703f9836e44de7db179cbfd420ee o default | |
|
25 | ||
|
26 | $ hg_log | |
|
27 | o 2:222ae9789a75 | |
|
28 | | | |
|
29 | | @ 1:a3498d6e3937 | |
|
30 | |/ | |
|
31 | o 0:7ab0a3bd758a | |
|
32 | ||
|
33 | ||
|
34 | $ strip '1:' | |
|
35 | ||
|
36 | The branchmap cache is not adjusted on strip. | |
|
37 | Now mentions a changelog entry that has been stripped. | |
|
38 | ||
|
39 | $ cat .hg/cache/branch2-visible | |
|
40 | 222ae9789a75703f9836e44de7db179cbfd420ee 2 | |
|
41 | a3498d6e39376d2456425dd8c692367bdbf00fa2 o default | |
|
42 | 222ae9789a75703f9836e44de7db179cbfd420ee o default | |
|
43 | ||
|
44 | $ commit c | |
|
45 | ||
|
46 | Not adjusted on commit, either. | |
|
47 | ||
|
48 | $ cat .hg/cache/branch2-visible | |
|
49 | 222ae9789a75703f9836e44de7db179cbfd420ee 2 | |
|
50 | a3498d6e39376d2456425dd8c692367bdbf00fa2 o default | |
|
51 | 222ae9789a75703f9836e44de7db179cbfd420ee o default | |
|
52 | ||
|
53 | On pull we end up with the same tip, and so wrongly reuse the invalid cache and crash. | |
|
54 | ||
|
55 | $ hg pull ../repo 2>&1 | grep 'ValueError:' | |
|
56 | ValueError: node a3498d6e39376d2456425dd8c692367bdbf00fa2 does not exist (known-bad-output !) |
General Comments 0
You need to be logged in to leave comments.
Login now