Mercurial > hg
annotate tests/test-merge5 @ 8810:ac92775b3b80
Add patch.eol to ignore EOLs when patching (issue1019)
The intent is to fix many issues involving patching when win32ext is enabled.
With win32ext, the working directory and repository files EOLs are not the same
which means that patches made on a non-win32ext host do not apply cleanly
because of EOLs discrepancies. A theorically correct approach would be
transform either the patched file or the patch content with the
encoding/decoding filters used by win32ext. This solution is tricky to
implement and invasive, instead we prefer to address the win32ext case, by
offering a way to ignore input EOLs when patching and rewriting them when
saving the patched result.
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Mon, 15 Jun 2009 00:03:26 +0200 |
parents | 6aa4a3fa4e60 |
children |
rev | line source |
---|---|
800
ec85f9e6f3b1
Don't use 'set -x', fix exports, sed and hexdump usage for Solaris.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
749
diff
changeset
|
1 #!/bin/sh |
415
c2b9502a4e96
[PATCH] Don't prompt user for keep-vs-delete when the merge is about to be aborted
mpm@selenic.com
parents:
diff
changeset
|
2 |
c2b9502a4e96
[PATCH] Don't prompt user for keep-vs-delete when the merge is about to be aborted
mpm@selenic.com
parents:
diff
changeset
|
3 mkdir t |
c2b9502a4e96
[PATCH] Don't prompt user for keep-vs-delete when the merge is about to be aborted
mpm@selenic.com
parents:
diff
changeset
|
4 cd t |
c2b9502a4e96
[PATCH] Don't prompt user for keep-vs-delete when the merge is about to be aborted
mpm@selenic.com
parents:
diff
changeset
|
5 hg init |
c2b9502a4e96
[PATCH] Don't prompt user for keep-vs-delete when the merge is about to be aborted
mpm@selenic.com
parents:
diff
changeset
|
6 echo This is file a1 > a |
c2b9502a4e96
[PATCH] Don't prompt user for keep-vs-delete when the merge is about to be aborted
mpm@selenic.com
parents:
diff
changeset
|
7 echo This is file b1 > b |
c2b9502a4e96
[PATCH] Don't prompt user for keep-vs-delete when the merge is about to be aborted
mpm@selenic.com
parents:
diff
changeset
|
8 hg add a b |
1933
7544700fd931
Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
814
diff
changeset
|
9 hg commit -m "commit #0" -d "1000000 0" |
415
c2b9502a4e96
[PATCH] Don't prompt user for keep-vs-delete when the merge is about to be aborted
mpm@selenic.com
parents:
diff
changeset
|
10 echo This is file b22 > b |
1933
7544700fd931
Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
814
diff
changeset
|
11 hg commit -m"comment #1" -d "1000000 0" |
415
c2b9502a4e96
[PATCH] Don't prompt user for keep-vs-delete when the merge is about to be aborted
mpm@selenic.com
parents:
diff
changeset
|
12 hg update 0 |
c2b9502a4e96
[PATCH] Don't prompt user for keep-vs-delete when the merge is about to be aborted
mpm@selenic.com
parents:
diff
changeset
|
13 rm b |
1933
7544700fd931
Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
814
diff
changeset
|
14 hg commit -A -m"comment #2" -d "1000000 0" |
6350
6aa4a3fa4e60
update: no -C needed to switch branches without outstanding changes
Matt Mackall <mpm@selenic.com>
parents:
3592
diff
changeset
|
15 mv a c |
1963
39eb64b23cb5
Don't require the "yes" command for test-merge5.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
1933
diff
changeset
|
16 # in theory, we shouldn't need the "-y" below, but it prevents |
415
c2b9502a4e96
[PATCH] Don't prompt user for keep-vs-delete when the merge is about to be aborted
mpm@selenic.com
parents:
diff
changeset
|
17 # this test from hanging when "hg update" erroneously prompts the |
c2b9502a4e96
[PATCH] Don't prompt user for keep-vs-delete when the merge is about to be aborted
mpm@selenic.com
parents:
diff
changeset
|
18 # user for "keep or delete" |
6350
6aa4a3fa4e60
update: no -C needed to switch branches without outstanding changes
Matt Mackall <mpm@selenic.com>
parents:
3592
diff
changeset
|
19 echo % should abort |
6aa4a3fa4e60
update: no -C needed to switch branches without outstanding changes
Matt Mackall <mpm@selenic.com>
parents:
3592
diff
changeset
|
20 hg update -y 1 |
6aa4a3fa4e60
update: no -C needed to switch branches without outstanding changes
Matt Mackall <mpm@selenic.com>
parents:
3592
diff
changeset
|
21 mv c a |
6aa4a3fa4e60
update: no -C needed to switch branches without outstanding changes
Matt Mackall <mpm@selenic.com>
parents:
3592
diff
changeset
|
22 echo % should succeed |
1963
39eb64b23cb5
Don't require the "yes" command for test-merge5.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
1933
diff
changeset
|
23 hg update -y 1 |
39eb64b23cb5
Don't require the "yes" command for test-merge5.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
1933
diff
changeset
|
24 |
415
c2b9502a4e96
[PATCH] Don't prompt user for keep-vs-delete when the merge is about to be aborted
mpm@selenic.com
parents:
diff
changeset
|
25 exit 0 |