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