Show More
@@ -108,7 +108,7 b' def strip(ui, repo, node, backup="all"):' | |||||
108 | backupfile = None |
|
108 | backupfile = None | |
109 | if backup == "all": |
|
109 | if backup == "all": | |
110 | backupfile = _bundle(repo, [node], cl.heads(), node, 'backup') |
|
110 | backupfile = _bundle(repo, [node], cl.heads(), node, 'backup') | |
111 |
repo.ui.status(_("sav |
|
111 | repo.ui.status(_("saved backup bundle to %s\n") % backupfile) | |
112 | if saveheads or extranodes: |
|
112 | if saveheads or extranodes: | |
113 | chgrpfile = _bundle(repo, savebases, saveheads, node, 'temp', |
|
113 | chgrpfile = _bundle(repo, savebases, saveheads, node, 'temp', | |
114 | extranodes) |
|
114 | extranodes) |
@@ -8,10 +8,10 b" hidehex() { python -c 'import sys, re; p" | |||||
8 |
|
8 | |||
9 | hidetmp() { sed "s/$HGTMP/\$HGTMP/"; } |
|
9 | hidetmp() { sed "s/$HGTMP/\$HGTMP/"; } | |
10 |
|
10 | |||
11 |
hidebackup() { sed 's/\(sav |
|
11 | hidebackup() { sed 's/\(saved backup bundle to \).*/\1/'; } | |
12 |
|
12 | |||
13 | cleanrebase() { |
|
13 | cleanrebase() { | |
14 | sed -e 's/\(Rebase status stored to\).*/\1/' \ |
|
14 | sed -e 's/\(Rebase status stored to\).*/\1/' \ | |
15 | -e 's/\(Rebase status restored from\).*/\1/' \ |
|
15 | -e 's/\(Rebase status restored from\).*/\1/' \ | |
16 |
-e 's/\(sav |
|
16 | -e 's/\(saved backup bundle to \).*/\1/'; | |
17 | } |
|
17 | } |
@@ -1,5 +1,6 b'' | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 |
|
2 | |||
|
3 | source $TESTDIR/helpers.sh | |||
3 | echo "[extensions]" >> $HGRCPATH |
|
4 | echo "[extensions]" >> $HGRCPATH | |
4 | echo "bookmarks=" >> $HGRCPATH |
|
5 | echo "bookmarks=" >> $HGRCPATH | |
5 | echo "mq=" >> $HGRCPATH |
|
6 | echo "mq=" >> $HGRCPATH | |
@@ -37,7 +38,7 b' echo % bookmarks updated?' | |||||
37 | hg book |
|
38 | hg book | |
38 |
|
39 | |||
39 | echo % strip to revision 1 |
|
40 | echo % strip to revision 1 | |
40 | hg strip 1 2>&1 | sed 's/\(saving bundle to \).*/\1/' |
|
41 | hg strip 1 | hidebackup | |
41 |
|
42 | |||
42 | echo % list bookmarks |
|
43 | echo % list bookmarks | |
43 | hg book |
|
44 | hg book |
@@ -12,7 +12,7 b' created new head' | |||||
12 | test 1:16b24da7e457 |
|
12 | test 1:16b24da7e457 | |
13 | test2 1:16b24da7e457 |
|
13 | test2 1:16b24da7e457 | |
14 | % strip to revision 1 |
|
14 | % strip to revision 1 | |
15 |
sav |
|
15 | saved backup bundle to | |
16 | adding branch |
|
16 | adding branch | |
17 | adding changesets |
|
17 | adding changesets | |
18 | adding manifests |
|
18 | adding manifests |
@@ -1,5 +1,7 b'' | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 |
|
2 | |||
|
3 | source $TESTDIR/helpers.sh | |||
|
4 | ||||
3 | checkundo() |
|
5 | checkundo() | |
4 | { |
|
6 | { | |
5 | if [ -f .hg/store/undo ]; then |
|
7 | if [ -f .hg/store/undo ]; then | |
@@ -318,16 +320,16 b' echo % strip' | |||||
318 | cd ../../b |
|
320 | cd ../../b | |
319 | echo x>x |
|
321 | echo x>x | |
320 | hg ci -Ama |
|
322 | hg ci -Ama | |
321 | hg strip tip 2>&1 | sed 's/\(saving bundle to \).*/\1/' |
|
323 | hg strip tip | hidebackup | |
322 | hg unbundle .hg/strip-backup/* |
|
324 | hg unbundle .hg/strip-backup/* | |
323 |
|
325 | |||
324 | echo % strip with local changes, should complain |
|
326 | echo % strip with local changes, should complain | |
325 | hg up |
|
327 | hg up | |
326 | echo y>y |
|
328 | echo y>y | |
327 | hg add y |
|
329 | hg add y | |
328 | hg strip tip | sed 's/\(saving bundle to \).*/\1/' |
|
330 | hg strip tip | hidebackup | |
329 | echo % --force strip with local changes |
|
331 | echo % --force strip with local changes | |
330 | hg strip -f tip 2>&1 | sed 's/\(saving bundle to \).*/\1/' |
|
332 | hg strip -f tip | hidebackup | |
331 |
|
333 | |||
332 | echo '% cd b; hg qrefresh' |
|
334 | echo '% cd b; hg qrefresh' | |
333 | hg init refresh |
|
335 | hg init refresh | |
@@ -502,7 +504,7 b" hg ci -m 'change foo 2'" | |||||
502 | HGMERGE=true hg merge |
|
504 | HGMERGE=true hg merge | |
503 | hg ci -m merge |
|
505 | hg ci -m merge | |
504 | hg log |
|
506 | hg log | |
505 | hg strip 1 2>&1 | sed 's/\(saving bundle to \).*/\1/' |
|
507 | hg strip 1 | hidebackup | |
506 | checkundo strip |
|
508 | checkundo strip | |
507 | hg log |
|
509 | hg log | |
508 | cd .. |
|
510 | cd .. |
@@ -1,5 +1,7 b'' | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 |
|
2 | |||
|
3 | source $TESTDIR/helpers.sh | |||
|
4 | ||||
3 | echo "[extensions]" >> $HGRCPATH |
|
5 | echo "[extensions]" >> $HGRCPATH | |
4 | echo "mq=" >> $HGRCPATH |
|
6 | echo "mq=" >> $HGRCPATH | |
5 |
|
7 | |||
@@ -7,7 +9,7 b' teststrip() {' | |||||
7 | hg up -C $1 |
|
9 | hg up -C $1 | |
8 | echo % before update $1, strip $2 |
|
10 | echo % before update $1, strip $2 | |
9 | hg parents |
|
11 | hg parents | |
10 | hg strip $2 2>&1 | sed 's/\(saving bundle to \).*/\1/' |
|
12 | hg strip $2 | hidebackup | |
11 | echo % after update $1, strip $2 |
|
13 | echo % after update $1, strip $2 | |
12 | hg parents |
|
14 | hg parents | |
13 | hg unbundle -q .hg/strip-backup/* |
|
15 | hg unbundle -q .hg/strip-backup/* | |
@@ -48,6 +50,6 b' hg up -C 2' | |||||
48 | hg merge 4 |
|
50 | hg merge 4 | |
49 | echo % before strip of merge parent |
|
51 | echo % before strip of merge parent | |
50 | hg parents |
|
52 | hg parents | |
51 | hg strip 4 2>&1 | sed 's/\(saving bundle to \).*/\1/' |
|
53 | hg strip 4 2>&1 | hidebackup | |
52 | echo % after strip of merge parent |
|
54 | echo % after strip of merge parent | |
53 | hg parents |
|
55 | hg parents |
@@ -37,7 +37,7 b' date: Thu Jan 01 00:00:00 1970 +0' | |||||
37 | summary: e |
|
37 | summary: e | |
38 |
|
38 | |||
39 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
39 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
40 |
sav |
|
40 | saved backup bundle to | |
41 | % after update 4, strip 4 |
|
41 | % after update 4, strip 4 | |
42 | changeset: 3:65bd5f99a4a3 |
|
42 | changeset: 3:65bd5f99a4a3 | |
43 | tag: tip |
|
43 | tag: tip | |
@@ -55,7 +55,7 b' date: Thu Jan 01 00:00:00 1970 +0' | |||||
55 | summary: e |
|
55 | summary: e | |
56 |
|
56 | |||
57 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
57 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
58 |
sav |
|
58 | saved backup bundle to | |
59 | % after update 4, strip 3 |
|
59 | % after update 4, strip 3 | |
60 | changeset: 1:ef3a871183d7 |
|
60 | changeset: 1:ef3a871183d7 | |
61 | user: test |
|
61 | user: test | |
@@ -69,7 +69,7 b' user: test' | |||||
69 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
69 | date: Thu Jan 01 00:00:00 1970 +0000 | |
70 | summary: b |
|
70 | summary: b | |
71 |
|
71 | |||
72 |
sav |
|
72 | saved backup bundle to | |
73 | % after update 1, strip 4 |
|
73 | % after update 1, strip 4 | |
74 | changeset: 1:ef3a871183d7 |
|
74 | changeset: 1:ef3a871183d7 | |
75 | user: test |
|
75 | user: test | |
@@ -84,7 +84,7 b' user: test' | |||||
84 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
84 | date: Thu Jan 01 00:00:00 1970 +0000 | |
85 | summary: e |
|
85 | summary: e | |
86 |
|
86 | |||
87 |
sav |
|
87 | saved backup bundle to | |
88 | adding branch |
|
88 | adding branch | |
89 | adding changesets |
|
89 | adding changesets | |
90 | adding manifests |
|
90 | adding manifests | |
@@ -107,7 +107,7 b' date: Thu Jan 01 00:00:00 1970 +0' | |||||
107 | summary: c |
|
107 | summary: c | |
108 |
|
108 | |||
109 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
109 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
110 |
sav |
|
110 | saved backup bundle to | |
111 | % after update 4, strip 1 |
|
111 | % after update 4, strip 1 | |
112 | changeset: 0:9ab35a2d17cb |
|
112 | changeset: 0:9ab35a2d17cb | |
113 | tag: tip |
|
113 | tag: tip | |
@@ -117,7 +117,7 b' summary: a' | |||||
117 |
|
117 | |||
118 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
118 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
119 | % before update null, strip 4 |
|
119 | % before update null, strip 4 | |
120 |
sav |
|
120 | saved backup bundle to | |
121 | % after update null, strip 4 |
|
121 | % after update null, strip 4 | |
122 | changeset: 4:264128213d29 |
|
122 | changeset: 4:264128213d29 | |
123 | tag: tip |
|
123 | tag: tip | |
@@ -163,7 +163,7 b' date: Thu Jan 01 00:00:00 1970 +0' | |||||
163 | summary: c |
|
163 | summary: c | |
164 |
|
164 | |||
165 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
165 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
166 |
sav |
|
166 | saved backup bundle to | |
167 | % after strip of merge parent |
|
167 | % after strip of merge parent | |
168 | changeset: 1:ef3a871183d7 |
|
168 | changeset: 1:ef3a871183d7 | |
169 | user: test |
|
169 | user: test |
@@ -334,7 +334,7 b' qpush: test2.patch is already at the top' | |||||
334 | % strip |
|
334 | % strip | |
335 | adding x |
|
335 | adding x | |
336 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
336 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
337 |
sav |
|
337 | saved backup bundle to | |
338 | adding changesets |
|
338 | adding changesets | |
339 | adding manifests |
|
339 | adding manifests | |
340 | adding file changes |
|
340 | adding file changes | |
@@ -345,7 +345,7 b' 1 files updated, 0 files merged, 0 files' | |||||
345 | abort: local changes found |
|
345 | abort: local changes found | |
346 | % --force strip with local changes |
|
346 | % --force strip with local changes | |
347 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
347 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
348 |
sav |
|
348 | saved backup bundle to | |
349 | % cd b; hg qrefresh |
|
349 | % cd b; hg qrefresh | |
350 | adding a |
|
350 | adding a | |
351 | foo |
|
351 | foo | |
@@ -529,7 +529,7 b' date: Thu Jan 01 00:00:00 1970 +0' | |||||
529 | summary: add foo |
|
529 | summary: add foo | |
530 |
|
530 | |||
531 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
531 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
532 |
sav |
|
532 | saved backup bundle to | |
533 | adding branch |
|
533 | adding branch | |
534 | adding changesets |
|
534 | adding changesets | |
535 | adding manifests |
|
535 | adding manifests |
@@ -4,7 +4,7 b' 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 |
sav |
|
7 | saved backup bundle | |
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 | |
@@ -55,7 +55,7 b' user: test' | |||||
55 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
55 | date: Thu Jan 01 00:00:00 1970 +0000 | |
56 | summary: a |
|
56 | summary: a | |
57 |
|
57 | |||
58 |
sav |
|
58 | saved backup bundle | |
59 | transaction abort! |
|
59 | transaction abort! | |
60 | failed to truncate 00manifest.i |
|
60 | failed to truncate 00manifest.i | |
61 | rollback failed - please run hg recover |
|
61 | rollback failed - please run hg recover |
@@ -2,17 +2,13 b'' | |||||
2 |
|
2 | |||
3 | # test stripping of filelogs where the linkrev doesn't always increase |
|
3 | # test stripping of filelogs where the linkrev doesn't always increase | |
4 |
|
4 | |||
|
5 | source $TESTDIR/helpers.sh | |||
5 | echo '[extensions]' >> $HGRCPATH |
|
6 | echo '[extensions]' >> $HGRCPATH | |
6 | echo 'hgext.mq =' >> $HGRCPATH |
|
7 | echo 'hgext.mq =' >> $HGRCPATH | |
7 |
|
8 | |||
8 | hg init orig |
|
9 | hg init orig | |
9 | cd orig |
|
10 | cd orig | |
10 |
|
11 | |||
11 | hidefilename() |
|
|||
12 | { |
|
|||
13 | sed -e 's/saving bundle to .*strip-backup/saving bundle to strip-backup/' |
|
|||
14 | } |
|
|||
15 |
|
||||
16 | commit() |
|
12 | commit() | |
17 | { |
|
13 | { | |
18 | hg up -qC null |
|
14 | hg up -qC null | |
@@ -60,7 +56,7 b' done' | |||||
60 | for i in 0 1 2 3 4; do |
|
56 | for i in 0 1 2 3 4; do | |
61 | hg clone -q -U --pull crossed $i |
|
57 | hg clone -q -U --pull crossed $i | |
62 | echo "% Trying to strip revision $i" |
|
58 | echo "% Trying to strip revision $i" | |
63 |
hg --cwd $i strip $i |
|
59 | hg --cwd $i strip $i | hidebackup | |
64 | echo "% Verifying" |
|
60 | echo "% Verifying" | |
65 | hg --cwd $i verify |
|
61 | hg --cwd $i verify | |
66 | echo |
|
62 | echo |
@@ -48,7 +48,7 b' crossed/.hg/store/data/manifest-file.i' | |||||
48 | 1 3 3 1 4 5d9299349fc0 000000000000 000000000000 |
|
48 | 1 3 3 1 4 5d9299349fc0 000000000000 000000000000 | |
49 |
|
49 | |||
50 | % Trying to strip revision 0 |
|
50 | % Trying to strip revision 0 | |
51 | saving bundle to strip-backup/cbb8c2f0a2e3-backup |
|
51 | saved backup bundle to | |
52 | adding branch |
|
52 | adding branch | |
53 | adding changesets |
|
53 | adding changesets | |
54 | adding manifests |
|
54 | adding manifests | |
@@ -62,7 +62,7 b' checking files' | |||||
62 | 7 files, 4 changesets, 15 total revisions |
|
62 | 7 files, 4 changesets, 15 total revisions | |
63 |
|
63 | |||
64 | % Trying to strip revision 1 |
|
64 | % Trying to strip revision 1 | |
65 | saving bundle to strip-backup/124ecc0cbec9-backup |
|
65 | saved backup bundle to | |
66 | adding branch |
|
66 | adding branch | |
67 | adding changesets |
|
67 | adding changesets | |
68 | adding manifests |
|
68 | adding manifests | |
@@ -76,7 +76,7 b' checking files' | |||||
76 | 7 files, 4 changesets, 14 total revisions |
|
76 | 7 files, 4 changesets, 14 total revisions | |
77 |
|
77 | |||
78 | % Trying to strip revision 2 |
|
78 | % Trying to strip revision 2 | |
79 | saving bundle to strip-backup/f6439b304a1a-backup |
|
79 | saved backup bundle to | |
80 | adding branch |
|
80 | adding branch | |
81 | adding changesets |
|
81 | adding changesets | |
82 | adding manifests |
|
82 | adding manifests | |
@@ -90,7 +90,7 b' checking files' | |||||
90 | 7 files, 4 changesets, 14 total revisions |
|
90 | 7 files, 4 changesets, 14 total revisions | |
91 |
|
91 | |||
92 | % Trying to strip revision 3 |
|
92 | % Trying to strip revision 3 | |
93 | saving bundle to strip-backup/6e54ec5db740-backup |
|
93 | saved backup bundle to | |
94 | adding branch |
|
94 | adding branch | |
95 | adding changesets |
|
95 | adding changesets | |
96 | adding manifests |
|
96 | adding manifests | |
@@ -104,7 +104,7 b' checking files' | |||||
104 | 7 files, 4 changesets, 19 total revisions |
|
104 | 7 files, 4 changesets, 19 total revisions | |
105 |
|
105 | |||
106 | % Trying to strip revision 4 |
|
106 | % Trying to strip revision 4 | |
107 | saving bundle to strip-backup/9147ea23c156-backup |
|
107 | saved backup bundle to | |
108 | % Verifying |
|
108 | % Verifying | |
109 | checking changesets |
|
109 | checking changesets | |
110 | checking manifests |
|
110 | checking manifests |
General Comments 0
You need to be logged in to leave comments.
Login now