Show More
@@ -1,40 +1,44 | |||
|
1 | 1 | #!/bin/sh |
|
2 | 2 | |
|
3 | 3 | echo "[extensions]" >> $HGRCPATH |
|
4 | 4 | echo "mq=">> $HGRCPATH |
|
5 | 5 | |
|
6 | 6 | teststrip() { |
|
7 | 7 | hg -q up -C $1 |
|
8 | 8 | echo % before update $1, strip $2 |
|
9 | 9 | hg parents |
|
10 | 10 | chmod -$3 $4 |
|
11 | 11 | hg strip $2 2>&1 | sed 's/\(saving bundle to \).*/\1/' | sed 's/Permission denied.*\.hg\/store\/\(.*\)/Permission denied \.hg\/store\/\1/' |
|
12 | 12 | echo % after update $1, strip $2 |
|
13 | 13 | chmod +$3 $4 |
|
14 | 14 | hg verify |
|
15 | 15 | echo % journal contents |
|
16 | cat .hg/store/journal | sed 's/\.i[^\n]*/\.i/' | |
|
16 | if [ -f .hg/store/journal ]; then | |
|
17 | sed -e 's/\.i[^\n]*/\.i/' .hg/store/journal | |
|
18 | else | |
|
19 | echo "(no journal)" | |
|
20 | fi | |
|
17 | 21 | ls .hg/store/journal >/dev/null 2>&1 && hg recover |
|
18 | 22 | ls .hg/strip-backup/* >/dev/null 2>&1 && hg unbundle -q .hg/strip-backup/* |
|
19 | 23 | rm -rf .hg/strip-backup |
|
20 | 24 | } |
|
21 | 25 | |
|
22 | 26 | hg init test |
|
23 | 27 | cd test |
|
24 | 28 | |
|
25 | 29 | echo a > a |
|
26 | 30 | hg -q ci -m "a" -A |
|
27 | 31 | |
|
28 | 32 | echo b > b |
|
29 | 33 | hg -q ci -m "b" -A |
|
30 | 34 | |
|
31 | 35 | echo b2 >> b |
|
32 | 36 | hg -q ci -m "b2" -A |
|
33 | 37 | |
|
34 | 38 | echo c > c |
|
35 | 39 | hg -q ci -m "c" -A |
|
36 | 40 | |
|
37 | 41 | teststrip 0 2 w .hg/store/data/b.i |
|
38 | 42 | teststrip 0 2 r .hg/store/data/b.i |
|
39 | 43 | teststrip 0 2 w .hg/store/00manifest.i |
|
40 | 44 |
@@ -1,88 +1,88 | |||
|
1 | 1 | % before update 0, strip 2 |
|
2 | 2 | changeset: 0:cb9a9f314b8b |
|
3 | 3 | user: test |
|
4 | 4 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
5 | 5 | summary: a |
|
6 | 6 | |
|
7 | 7 | saving bundle to |
|
8 | 8 | transaction abort! |
|
9 | 9 | failed to truncate data/b.i |
|
10 | 10 | rollback failed - please run hg recover |
|
11 | 11 | abort: Permission denied .hg/store/data/b.i |
|
12 | 12 | % after update 0, strip 2 |
|
13 | 13 | checking changesets |
|
14 | 14 | checking manifests |
|
15 | 15 | crosschecking files in changesets and manifests |
|
16 | 16 | checking files |
|
17 | 17 | b@?: rev 1 points to nonexistent changeset 2 |
|
18 | 18 | (expected 1) |
|
19 | 19 | b@?: 736c29771fba not in manifests |
|
20 | 20 | warning: orphan revlog 'data/c.i' |
|
21 | 21 | 2 files, 2 changesets, 3 total revisions |
|
22 | 22 | 2 warnings encountered! |
|
23 | 23 | 2 integrity errors encountered! |
|
24 | 24 | % journal contents |
|
25 | 25 | 00changelog.i |
|
26 | 26 | 00manifest.i |
|
27 | 27 | data/b.i |
|
28 | 28 | data/c.i |
|
29 | 29 | rolling back interrupted transaction |
|
30 | 30 | checking changesets |
|
31 | 31 | checking manifests |
|
32 | 32 | crosschecking files in changesets and manifests |
|
33 | 33 | checking files |
|
34 | 34 | 2 files, 2 changesets, 2 total revisions |
|
35 | 35 | % before update 0, strip 2 |
|
36 | 36 | changeset: 0:cb9a9f314b8b |
|
37 | 37 | user: test |
|
38 | 38 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
39 | 39 | summary: a |
|
40 | 40 | |
|
41 | 41 | abort: Permission denied .hg/store/data/b.i |
|
42 | 42 | % after update 0, strip 2 |
|
43 | 43 | checking changesets |
|
44 | 44 | checking manifests |
|
45 | 45 | crosschecking files in changesets and manifests |
|
46 | 46 | checking files |
|
47 | 47 | 3 files, 4 changesets, 4 total revisions |
|
48 | 48 | % journal contents |
|
49 | cat: .hg/store/journal: No such file or directory | |
|
49 | (no journal) | |
|
50 | 50 | % before update 0, strip 2 |
|
51 | 51 | changeset: 0:cb9a9f314b8b |
|
52 | 52 | user: test |
|
53 | 53 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
54 | 54 | summary: a |
|
55 | 55 | |
|
56 | 56 | saving bundle to |
|
57 | 57 | transaction abort! |
|
58 | 58 | failed to truncate 00manifest.i |
|
59 | 59 | rollback failed - please run hg recover |
|
60 | 60 | abort: Permission denied .hg/store/00manifest.i |
|
61 | 61 | % after update 0, strip 2 |
|
62 | 62 | checking changesets |
|
63 | 63 | checking manifests |
|
64 | 64 | manifest@?: rev 2 points to nonexistent changeset 2 |
|
65 | 65 | manifest@?: 3362547cdf64 not in changesets |
|
66 | 66 | manifest@?: rev 3 points to nonexistent changeset 3 |
|
67 | 67 | manifest@?: 265a85892ecb not in changesets |
|
68 | 68 | crosschecking files in changesets and manifests |
|
69 | 69 | c@3: in manifest but not in changeset |
|
70 | 70 | checking files |
|
71 | 71 | b@?: rev 1 points to nonexistent changeset 2 |
|
72 | 72 | (expected 1) |
|
73 | 73 | c@?: rev 0 points to nonexistent changeset 3 |
|
74 | 74 | 3 files, 2 changesets, 4 total revisions |
|
75 | 75 | 1 warnings encountered! |
|
76 | 76 | 7 integrity errors encountered! |
|
77 | 77 | (first damaged changeset appears to be 3) |
|
78 | 78 | % journal contents |
|
79 | 79 | 00changelog.i |
|
80 | 80 | 00manifest.i |
|
81 | 81 | data/b.i |
|
82 | 82 | data/c.i |
|
83 | 83 | rolling back interrupted transaction |
|
84 | 84 | checking changesets |
|
85 | 85 | checking manifests |
|
86 | 86 | crosschecking files in changesets and manifests |
|
87 | 87 | checking files |
|
88 | 88 | 2 files, 2 changesets, 2 total revisions |
General Comments 0
You need to be logged in to leave comments.
Login now