branch | stable |
changeset 16123 | b0c7525f826d |
parent 16112 | d7829b2ecf32 |
child 16124 | 0e0060bf2f44 |
16122:9ef3a4a2c6c0 | 16123:b0c7525f826d |
---|---|
994 $ cat f |
994 $ cat f |
995 c1 |
995 c1 |
996 c2 |
996 c2 |
997 c3 |
997 c3 |
998 c4 |
998 c4 |
999 |
|
1000 Test corner case involving fuzz and skew |
|
1001 |
|
1002 $ hg init morecornercases |
|
1003 $ cd morecornercases |
|
1004 |
|
1005 $ cat > 01-no-context-beginning-of-file.diff <<EOF |
|
1006 > diff --git a/a b/a |
|
1007 > --- a/a |
|
1008 > +++ b/a |
|
1009 > @@ -1,0 +1,1 @@ |
|
1010 > +line |
|
1011 > EOF |
|
1012 |
|
1013 $ cat > 02-no-context-middle-of-file.diff <<EOF |
|
1014 > diff --git a/a b/a |
|
1015 > --- a/a |
|
1016 > +++ b/a |
|
1017 > @@ -1,1 +1,1 @@ |
|
1018 > -2 |
|
1019 > +add some skew |
|
1020 > @@ -2,0 +2,1 @@ |
|
1021 > +line |
|
1022 > EOF |
|
1023 |
|
1024 $ cat > 03-no-context-end-of-file.diff <<EOF |
|
1025 > diff --git a/a b/a |
|
1026 > --- a/a |
|
1027 > +++ b/a |
|
1028 > @@ -10,0 +10,1 @@ |
|
1029 > +line |
|
1030 > EOF |
|
1031 |
|
1032 $ cat > a <<EOF |
|
1033 > 1 |
|
1034 > 2 |
|
1035 > 3 |
|
1036 > 4 |
|
1037 > EOF |
|
1038 $ hg ci -Am adda a |
|
1039 $ for p in *.diff; do |
|
1040 > hg import -v --no-commit $p |
|
1041 > cat a |
|
1042 > hg revert -aqC a |
|
1043 > # patch -p1 < $p |
|
1044 > # cat a |
|
1045 > # hg revert -aC a |
|
1046 > done |
|
1047 applying 01-no-context-beginning-of-file.diff |
|
1048 patching file a |
|
1049 applied to working directory |
|
1050 1 |
|
1051 line |
|
1052 2 |
|
1053 3 |
|
1054 4 |
|
1055 applying 02-no-context-middle-of-file.diff |
|
1056 patching file a |
|
1057 Hunk #1 succeeded at 2 (offset 1 lines). |
|
1058 Hunk #2 succeeded at 4 (offset 1 lines). |
|
1059 applied to working directory |
|
1060 1 |
|
1061 add some skew |
|
1062 3 |
|
1063 line |
|
1064 4 |
|
1065 applying 03-no-context-end-of-file.diff |
|
1066 patching file a |
|
1067 Hunk #1 succeeded at 5 (offset -6 lines). |
|
1068 applied to working directory |
|
1069 1 |
|
1070 2 |
|
1071 3 |
|
1072 4 |
|
1073 line |
|
1074 |