Show More
@@ -398,7 +398,7 b' class uihunk(patchnode):' | |||||
398 | if fromline != 0: |
|
398 | if fromline != 0: | |
399 | if fromlen == 0: |
|
399 | if fromlen == 0: | |
400 | fromline -= 1 |
|
400 | fromline -= 1 | |
401 | if tolen == 0: |
|
401 | if tolen == 0 and toline > 0: | |
402 | toline -= 1 |
|
402 | toline -= 1 | |
403 |
|
403 | |||
404 | fromtoline = '@@ -%d,%d +%d,%d @@%s\n' % ( |
|
404 | fromtoline = '@@ -%d,%d +%d,%d @@%s\n' % ( |
@@ -214,6 +214,14 b' Amend option works' | |||||
214 | @@ -0,0 +1,1 @@ |
|
214 | @@ -0,0 +1,1 @@ | |
215 | +hello world |
|
215 | +hello world | |
216 |
|
216 | |||
|
217 | Make file empty | |||
|
218 | $ echo -n > x | |||
|
219 | $ cat <<EOF >testModeCommands | |||
|
220 | > X | |||
|
221 | > EOF | |||
|
222 | $ hg ci -i -m emptify -d "0 0" | |||
|
223 | $ hg update -C '.^' -q | |||
|
224 | ||||
217 | Editing a hunk puts you back on that hunk when done editing (issue5041) |
|
225 | Editing a hunk puts you back on that hunk when done editing (issue5041) | |
218 | To do that, we change two lines in a file, pretend to edit the second line, |
|
226 | To do that, we change two lines in a file, pretend to edit the second line, | |
219 | exit, toggle the line selected at the end of the edit and commit. |
|
227 | exit, toggle the line selected at the end of the edit and commit. | |
@@ -236,7 +244,7 b' of the edit.' | |||||
236 | > X |
|
244 | > X | |
237 | > EOF |
|
245 | > EOF | |
238 | $ printf "printf 'editor ran\n'; exit 0" > editor.sh |
|
246 | $ printf "printf 'editor ran\n'; exit 0" > editor.sh | |
239 | $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit -i -m "edit hunk" -d "0 0" |
|
247 | $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit -i -m "edit hunk" -d "0 0" -q | |
240 | editor ran |
|
248 | editor ran | |
241 | $ hg cat -r . x |
|
249 | $ hg cat -r . x | |
242 | foo |
|
250 | foo |
General Comments 0
You need to be logged in to leave comments.
Login now