annotate tests/test-repair-strip.t @ 14030:e5dd974a99fa

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