##// END OF EJS Templates
tests: make histedit tests more resilient to filesystem variation...
Mads Kiilerich -
r17086:5f2cacb7 default
parent child Browse files
Show More
@@ -79,7 +79,7 b' show the edit commands offered'
79 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
79 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
80
80
81 edit the history
81 edit the history
82 $ HGEDITOR="cat $EDITED > " hg histedit 177f92b77385 2>&1 | fixbundle
82 $ HGEDITOR="cat \"$EDITED\" > " hg histedit 177f92b77385 2>&1 | fixbundle
83 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
83 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
84 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
84 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
85 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
85 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -134,7 +134,7 b' put things back'
134 > pick b069cc29fb22 e
134 > pick b069cc29fb22 e
135 > pick 26f6a030ae82 f
135 > pick 26f6a030ae82 f
136 > EOF
136 > EOF
137 $ HGEDITOR="cat $EDITED > " hg histedit 177f92b77385 2>&1 | fixbundle
137 $ HGEDITOR="cat \"$EDITED\" > " hg histedit 177f92b77385 2>&1 | fixbundle
138 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
138 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
139 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
139 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
140 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
140 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -181,7 +181,7 b' slightly different this time'
181 > pick e860deea161a e
181 > pick e860deea161a e
182 > pick 177f92b77385 c
182 > pick 177f92b77385 c
183 > EOF
183 > EOF
184 $ HGEDITOR="cat $EDITED > " hg histedit 177f92b77385 2>&1 | fixbundle
184 $ HGEDITOR="cat \"$EDITED\" > " hg histedit 177f92b77385 2>&1 | fixbundle
185 0 files updated, 0 files merged, 4 files removed, 0 files unresolved
185 0 files updated, 0 files merged, 4 files removed, 0 files unresolved
186 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
186 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
187 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
187 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -227,7 +227,7 b' keep prevents stripping dead revs'
227 > pick 99a62755c625 c
227 > pick 99a62755c625 c
228 > pick 7c6fdd608667 e
228 > pick 7c6fdd608667 e
229 > EOF
229 > EOF
230 $ HGEDITOR="cat $EDITED > " hg histedit bfe4a5a76b37 --keep 2>&1 | fixbundle
230 $ HGEDITOR="cat \"$EDITED\" > " hg histedit bfe4a5a76b37 --keep 2>&1 | fixbundle
231 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
231 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
232 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
232 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
233 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
233 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -61,7 +61,7 b' log before edit'
61
61
62
62
63 edit the history
63 edit the history
64 $ HGEDITOR="cat $EDITED > " hg histedit 177f92b77385 2>&1 | fixbundle
64 $ HGEDITOR="cat \"$EDITED\" > " hg histedit 177f92b77385 2>&1 | fixbundle
65 0 files updated, 0 files merged, 4 files removed, 0 files unresolved
65 0 files updated, 0 files merged, 4 files removed, 0 files unresolved
66 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
66 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
67 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
67 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -61,7 +61,7 b' log before edit'
61
61
62
62
63 edit the history
63 edit the history
64 $ HGEDITOR="cat $EDITED > " hg histedit 177f92b77385 2>&1 | fixbundle
64 $ HGEDITOR="cat \"$EDITED\" > " hg histedit 177f92b77385 2>&1 | fixbundle
65 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
65 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
66 abort: Make changes as needed, you may commit or record as needed now.
66 abort: Make changes as needed, you may commit or record as needed now.
67 When you are finished, run hg histedit --continue to resume.
67 When you are finished, run hg histedit --continue to resume.
@@ -118,7 +118,7 b' commit, then edit the revision'
118 $ cat > $EDITED <<EOF
118 $ cat > $EDITED <<EOF
119 > edit bf757c081cd0 f
119 > edit bf757c081cd0 f
120 > EOF
120 > EOF
121 $ HGEDITOR="cat $EDITED > " hg histedit tip 2>&1 | fixbundle
121 $ HGEDITOR="cat \"$EDITED\" > " hg histedit tip 2>&1 | fixbundle
122 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
122 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
123 abort: Make changes as needed, you may commit or record as needed now.
123 abort: Make changes as needed, you may commit or record as needed now.
124 When you are finished, run hg histedit --continue to resume.
124 When you are finished, run hg histedit --continue to resume.
@@ -139,12 +139,10 b' log after edit'
139
139
140 say we'll change the message, but don't.
140 say we'll change the message, but don't.
141 $ cat > ../edit.sh <<EOF
141 $ cat > ../edit.sh <<EOF
142 > #!/bin/sh
142 > cat "\$1" | sed s/pick/mess/ > tmp
143 > cat \$1 | sed s/pick/mess/ > tmp
143 > mv tmp "\$1"
144 > mv tmp \$1
145 > EOF
144 > EOF
146 $ chmod +x ../edit.sh
145 $ HGEDITOR="sh ../edit.sh" hg histedit tip 2>&1 | fixbundle
147 $ HGEDITOR="../edit.sh" hg histedit tip 2>&1 | fixbundle
148 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
146 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
149 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
147 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
150 $ hg status
148 $ hg status
@@ -160,7 +158,7 b' modify the message'
160 $ cat > $EDITED <<EOF
158 $ cat > $EDITED <<EOF
161 > mess bf757c081cd0 f
159 > mess bf757c081cd0 f
162 > EOF
160 > EOF
163 $ HGEDITOR="cat $EDITED > " hg histedit tip 2>&1 | fixbundle
161 $ HGEDITOR="cat \"$EDITED\" > " hg histedit tip 2>&1 | fixbundle
164 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
162 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
165 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
163 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
166 $ hg status
164 $ hg status
@@ -71,7 +71,7 b' log before edit'
71
71
72
72
73 edit the history
73 edit the history
74 $ HGEDITOR="cat $EDITED > " hg histedit 177f92b77385 2>&1 | fixbundle
74 $ HGEDITOR="cat \"$EDITED\" > " hg histedit 177f92b77385 2>&1 | fixbundle
75 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
75 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
76 1 out of 1 hunks FAILED -- saving rejects to file e.rej
76 1 out of 1 hunks FAILED -- saving rejects to file e.rej
77 abort: Fix up the change and run hg histedit --continue
77 abort: Fix up the change and run hg histedit --continue
@@ -61,7 +61,7 b' log before edit'
61
61
62
62
63 edit the history
63 edit the history
64 $ HGEDITOR="cat $EDITED > " hg histedit 177f92b77385 2>&1 | fixbundle
64 $ HGEDITOR="cat \"$EDITED\" > " hg histedit 177f92b77385 2>&1 | fixbundle
65 0 files updated, 0 files merged, 4 files removed, 0 files unresolved
65 0 files updated, 0 files merged, 4 files removed, 0 files unresolved
66 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
66 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
67 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
67 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -32,12 +32,11 b' editing a changeset without any actual c'
32 > # generate an editor script for selecting changesets to be edited
32 > # generate an editor script for selecting changesets to be edited
33 > choice=$1 # changesets that should be edited (using sed line ranges)
33 > choice=$1 # changesets that should be edited (using sed line ranges)
34 > cat <<EOF | sed 's:^....::'
34 > cat <<EOF | sed 's:^....::'
35 > #!/bin/sh
36 > # editing the rules, replacing 'pick' with 'edit' for the chosen lines
35 > # editing the rules, replacing 'pick' with 'edit' for the chosen lines
37 > sed '${choice}s:^pick:edit:' \$1 > \${1}.tmp
36 > sed '${choice}s:^pick:edit:' "\$1" > "\${1}.tmp"
38 > mv \${1}.tmp \$1
37 > mv "\${1}.tmp" "\$1"
39 > # displaying the resulting rules, minus comments and empty lines
38 > # displaying the resulting rules, minus comments and empty lines
40 > sed '/^#/d;/^$/d;s:^:| :' \$1 >&2
39 > sed '/^#/d;/^$/d;s:^:| :' "\$1" >&2
41 > EOF
40 > EOF
42 > }
41 > }
43
42
@@ -48,9 +47,8 b' editing a changeset without any actual c'
48 > number="$2" # number of changesets considered (from tip)
47 > number="$2" # number of changesets considered (from tip)
49 > comment="$3"
48 > comment="$3"
50 > geneditor "${choice}" > edit.sh
49 > geneditor "${choice}" > edit.sh
51 > chmod +x edit.sh
52 > echo % start editing the history ${comment}
50 > echo % start editing the history ${comment}
53 > HGEDITOR=./edit.sh hg histedit -- -${number} 2>&1 | fixbundle
51 > HGEDITOR="sh ./edit.sh" hg histedit -- -${number} 2>&1 | fixbundle
54 > }
52 > }
55
53
56 $ continueediting ()
54 $ continueediting ()
@@ -71,7 +71,7 b' log before edit'
71
71
72
72
73 edit the history
73 edit the history
74 $ HGEDITOR="cat $EDITED > " hg histedit 177f92b77385 2>&1 | fixbundle
74 $ HGEDITOR="cat \"$EDITED\" > " hg histedit 177f92b77385 2>&1 | fixbundle
75 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
75 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
76 1 out of 1 hunks FAILED -- saving rejects to file e.rej
76 1 out of 1 hunks FAILED -- saving rejects to file e.rej
77 abort: Fix up the change and run hg histedit --continue
77 abort: Fix up the change and run hg histedit --continue
@@ -71,7 +71,7 b' log before edit'
71
71
72
72
73 edit the history
73 edit the history
74 $ HGEDITOR="cat $EDITED > " hg histedit 177f92b77385 2>&1 | fixbundle
74 $ HGEDITOR="cat \"$EDITED\" > " hg histedit 177f92b77385 2>&1 | fixbundle
75 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
75 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
76 1 out of 1 hunks FAILED -- saving rejects to file e.rej
76 1 out of 1 hunks FAILED -- saving rejects to file e.rej
77 abort: Fix up the change and run hg histedit --continue
77 abort: Fix up the change and run hg histedit --continue
@@ -122,7 +122,7 b' second edit set'
122
122
123
123
124 edit the history
124 edit the history
125 $ HGEDITOR="cat $EDITED > " hg histedit 177f92b77385 2>&1 | fixbundle
125 $ HGEDITOR="cat \"$EDITED\" > " hg histedit 177f92b77385 2>&1 | fixbundle
126 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
126 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
127 1 out of 1 hunks FAILED -- saving rejects to file e.rej
127 1 out of 1 hunks FAILED -- saving rejects to file e.rej
128 abort: Fix up the change and run hg histedit --continue
128 abort: Fix up the change and run hg histedit --continue
@@ -190,14 +190,14 b' start over'
190 > EOF
190 > EOF
191
191
192 edit the history, this time with a fold action
192 edit the history, this time with a fold action
193 $ HGEDITOR="cat $EDITED > " hg histedit 177f92b77385 2>&1 | fixbundle
193 $ HGEDITOR="cat \"$EDITED\" > " hg histedit 177f92b77385 2>&1 | fixbundle
194 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
194 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
195 1 out of 1 hunks FAILED -- saving rejects to file e.rej
195 1 out of 1 hunks FAILED -- saving rejects to file e.rej
196 abort: Fix up the change and run hg histedit --continue
196 abort: Fix up the change and run hg histedit --continue
197
197
198 $ echo a > e
198 $ echo a > e
199 $ hg add e
199 $ hg add e
200 $ HGEDITOR="cat $EDITED > " hg histedit --continue 2>&1 | fixbundle
200 $ HGEDITOR="cat \"$EDITED\" > " hg histedit --continue 2>&1 | fixbundle
201 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
201 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
202 file e already exists
202 file e already exists
203 1 out of 1 hunks FAILED -- saving rejects to file e.rej
203 1 out of 1 hunks FAILED -- saving rejects to file e.rej
General Comments 0
You need to be logged in to leave comments. Login now