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