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