author | Pulkit Goyal <7895pulkit@gmail.com> |
Wed, 07 Feb 2018 13:47:03 +0530 | |
changeset 35988 | f87641bf4d23 |
parent 35400 | 4441705b7111 |
child 36063 | 32695e525586 |
permissions | -rw-r--r-- |
16910
ad229181ddbe
tests: remove 'hghave symlink' from test-import-git.t
Mads Kiilerich <mads@kiilerich.com>
parents:
16898
diff
changeset
|
1 |
$ hg init repo |
ad229181ddbe
tests: remove 'hghave symlink' from test-import-git.t
Mads Kiilerich <mads@kiilerich.com>
parents:
16898
diff
changeset
|
2 |
$ cd repo |
12193
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
3 |
|
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
4 |
New file: |
2864 | 5 |
|
12193
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
6 |
$ hg import -d "1000000 0" -mnew - <<EOF |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
7 |
> diff --git a/new b/new |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
8 |
> new file mode 100644 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
9 |
> index 0000000..7898192 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
10 |
> --- /dev/null |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
11 |
> +++ b/new |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
12 |
> @@ -0,0 +1 @@ |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
13 |
> +a |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
14 |
> EOF |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
15 |
applying patch from stdin |
2864 | 16 |
|
12193
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
17 |
$ hg tip -q |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
18 |
0:ae3ee40d2079 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
19 |
|
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
20 |
New empty file: |
2864 | 21 |
|
12193
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
22 |
$ hg import -d "1000000 0" -mempty - <<EOF |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
23 |
> diff --git a/empty b/empty |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
24 |
> new file mode 100644 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
25 |
> EOF |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
26 |
applying patch from stdin |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
27 |
|
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
28 |
$ hg tip -q |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
29 |
1:ab199dc869b5 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
30 |
|
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
31 |
$ hg locate empty |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
32 |
empty |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
33 |
|
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
34 |
chmod +x: |
3589
1c9b6f1237e0
test for git empty new files
Brendan Cully <brendan@kublai.com>
parents:
2864
diff
changeset
|
35 |
|
12193
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
36 |
$ hg import -d "1000000 0" -msetx - <<EOF |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
37 |
> diff --git a/new b/new |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
38 |
> old mode 100644 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
39 |
> new mode 100755 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
40 |
> EOF |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
41 |
applying patch from stdin |
2864 | 42 |
|
16910
ad229181ddbe
tests: remove 'hghave symlink' from test-import-git.t
Mads Kiilerich <mads@kiilerich.com>
parents:
16898
diff
changeset
|
43 |
#if execbit |
12193
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
44 |
$ hg tip -q |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
45 |
2:3a34410f282e |
12365
22f3353bcc36
tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12316
diff
changeset
|
46 |
$ test -x new |
16910
ad229181ddbe
tests: remove 'hghave symlink' from test-import-git.t
Mads Kiilerich <mads@kiilerich.com>
parents:
16898
diff
changeset
|
47 |
$ hg rollback -q |
ad229181ddbe
tests: remove 'hghave symlink' from test-import-git.t
Mads Kiilerich <mads@kiilerich.com>
parents:
16898
diff
changeset
|
48 |
#else |
ad229181ddbe
tests: remove 'hghave symlink' from test-import-git.t
Mads Kiilerich <mads@kiilerich.com>
parents:
16898
diff
changeset
|
49 |
$ hg tip -q |
ad229181ddbe
tests: remove 'hghave symlink' from test-import-git.t
Mads Kiilerich <mads@kiilerich.com>
parents:
16898
diff
changeset
|
50 |
1:ab199dc869b5 |
ad229181ddbe
tests: remove 'hghave symlink' from test-import-git.t
Mads Kiilerich <mads@kiilerich.com>
parents:
16898
diff
changeset
|
51 |
#endif |
12193
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
52 |
|
16910
ad229181ddbe
tests: remove 'hghave symlink' from test-import-git.t
Mads Kiilerich <mads@kiilerich.com>
parents:
16898
diff
changeset
|
53 |
Copy and removing x bit: |
2864 | 54 |
|
16910
ad229181ddbe
tests: remove 'hghave symlink' from test-import-git.t
Mads Kiilerich <mads@kiilerich.com>
parents:
16898
diff
changeset
|
55 |
$ hg import -f -d "1000000 0" -mcopy - <<EOF |
12193
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
56 |
> diff --git a/new b/copy |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
57 |
> old mode 100755 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
58 |
> new mode 100644 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
59 |
> similarity index 100% |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
60 |
> copy from new |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
61 |
> copy to copy |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
62 |
> diff --git a/new b/copyx |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
63 |
> similarity index 100% |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
64 |
> copy from new |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
65 |
> copy to copyx |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
66 |
> EOF |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
67 |
applying patch from stdin |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
68 |
|
16910
ad229181ddbe
tests: remove 'hghave symlink' from test-import-git.t
Mads Kiilerich <mads@kiilerich.com>
parents:
16898
diff
changeset
|
69 |
$ test -f copy |
16898
bb91c602d4ad
tests: change odd uses of 'if hghave' to #if
Mads Kiilerich <mads@kiilerich.com>
parents:
16524
diff
changeset
|
70 |
#if execbit |
bb91c602d4ad
tests: change odd uses of 'if hghave' to #if
Mads Kiilerich <mads@kiilerich.com>
parents:
16524
diff
changeset
|
71 |
$ test ! -x copy |
bb91c602d4ad
tests: change odd uses of 'if hghave' to #if
Mads Kiilerich <mads@kiilerich.com>
parents:
16524
diff
changeset
|
72 |
$ test -x copyx |
16910
ad229181ddbe
tests: remove 'hghave symlink' from test-import-git.t
Mads Kiilerich <mads@kiilerich.com>
parents:
16898
diff
changeset
|
73 |
$ hg tip -q |
ad229181ddbe
tests: remove 'hghave symlink' from test-import-git.t
Mads Kiilerich <mads@kiilerich.com>
parents:
16898
diff
changeset
|
74 |
2:21dfaae65c71 |
16898
bb91c602d4ad
tests: change odd uses of 'if hghave' to #if
Mads Kiilerich <mads@kiilerich.com>
parents:
16524
diff
changeset
|
75 |
#else |
16910
ad229181ddbe
tests: remove 'hghave symlink' from test-import-git.t
Mads Kiilerich <mads@kiilerich.com>
parents:
16898
diff
changeset
|
76 |
$ hg tip -q |
ad229181ddbe
tests: remove 'hghave symlink' from test-import-git.t
Mads Kiilerich <mads@kiilerich.com>
parents:
16898
diff
changeset
|
77 |
2:0efdaa8e3bf3 |
ad229181ddbe
tests: remove 'hghave symlink' from test-import-git.t
Mads Kiilerich <mads@kiilerich.com>
parents:
16898
diff
changeset
|
78 |
#endif |
ad229181ddbe
tests: remove 'hghave symlink' from test-import-git.t
Mads Kiilerich <mads@kiilerich.com>
parents:
16898
diff
changeset
|
79 |
|
ad229181ddbe
tests: remove 'hghave symlink' from test-import-git.t
Mads Kiilerich <mads@kiilerich.com>
parents:
16898
diff
changeset
|
80 |
$ hg up -qCr1 |
ad229181ddbe
tests: remove 'hghave symlink' from test-import-git.t
Mads Kiilerich <mads@kiilerich.com>
parents:
16898
diff
changeset
|
81 |
$ hg rollback -q |
ad229181ddbe
tests: remove 'hghave symlink' from test-import-git.t
Mads Kiilerich <mads@kiilerich.com>
parents:
16898
diff
changeset
|
82 |
|
ad229181ddbe
tests: remove 'hghave symlink' from test-import-git.t
Mads Kiilerich <mads@kiilerich.com>
parents:
16898
diff
changeset
|
83 |
Copy (like above but independent of execbit): |
ad229181ddbe
tests: remove 'hghave symlink' from test-import-git.t
Mads Kiilerich <mads@kiilerich.com>
parents:
16898
diff
changeset
|
84 |
|
ad229181ddbe
tests: remove 'hghave symlink' from test-import-git.t
Mads Kiilerich <mads@kiilerich.com>
parents:
16898
diff
changeset
|
85 |
$ hg import -d "1000000 0" -mcopy - <<EOF |
ad229181ddbe
tests: remove 'hghave symlink' from test-import-git.t
Mads Kiilerich <mads@kiilerich.com>
parents:
16898
diff
changeset
|
86 |
> diff --git a/new b/copy |
ad229181ddbe
tests: remove 'hghave symlink' from test-import-git.t
Mads Kiilerich <mads@kiilerich.com>
parents:
16898
diff
changeset
|
87 |
> similarity index 100% |
ad229181ddbe
tests: remove 'hghave symlink' from test-import-git.t
Mads Kiilerich <mads@kiilerich.com>
parents:
16898
diff
changeset
|
88 |
> copy from new |
ad229181ddbe
tests: remove 'hghave symlink' from test-import-git.t
Mads Kiilerich <mads@kiilerich.com>
parents:
16898
diff
changeset
|
89 |
> copy to copy |
ad229181ddbe
tests: remove 'hghave symlink' from test-import-git.t
Mads Kiilerich <mads@kiilerich.com>
parents:
16898
diff
changeset
|
90 |
> diff --git a/new b/copyx |
ad229181ddbe
tests: remove 'hghave symlink' from test-import-git.t
Mads Kiilerich <mads@kiilerich.com>
parents:
16898
diff
changeset
|
91 |
> similarity index 100% |
ad229181ddbe
tests: remove 'hghave symlink' from test-import-git.t
Mads Kiilerich <mads@kiilerich.com>
parents:
16898
diff
changeset
|
92 |
> copy from new |
ad229181ddbe
tests: remove 'hghave symlink' from test-import-git.t
Mads Kiilerich <mads@kiilerich.com>
parents:
16898
diff
changeset
|
93 |
> copy to copyx |
ad229181ddbe
tests: remove 'hghave symlink' from test-import-git.t
Mads Kiilerich <mads@kiilerich.com>
parents:
16898
diff
changeset
|
94 |
> EOF |
ad229181ddbe
tests: remove 'hghave symlink' from test-import-git.t
Mads Kiilerich <mads@kiilerich.com>
parents:
16898
diff
changeset
|
95 |
applying patch from stdin |
ad229181ddbe
tests: remove 'hghave symlink' from test-import-git.t
Mads Kiilerich <mads@kiilerich.com>
parents:
16898
diff
changeset
|
96 |
|
ad229181ddbe
tests: remove 'hghave symlink' from test-import-git.t
Mads Kiilerich <mads@kiilerich.com>
parents:
16898
diff
changeset
|
97 |
$ hg tip -q |
ad229181ddbe
tests: remove 'hghave symlink' from test-import-git.t
Mads Kiilerich <mads@kiilerich.com>
parents:
16898
diff
changeset
|
98 |
2:0efdaa8e3bf3 |
16898
bb91c602d4ad
tests: change odd uses of 'if hghave' to #if
Mads Kiilerich <mads@kiilerich.com>
parents:
16524
diff
changeset
|
99 |
$ test -f copy |
12193
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
100 |
|
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
101 |
$ cat copy |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
102 |
a |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
103 |
|
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
104 |
$ hg cat copy |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
105 |
a |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
106 |
|
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
107 |
Rename: |
2864 | 108 |
|
12193
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
109 |
$ hg import -d "1000000 0" -mrename - <<EOF |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
110 |
> diff --git a/copy b/rename |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
111 |
> similarity index 100% |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
112 |
> rename from copy |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
113 |
> rename to rename |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
114 |
> EOF |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
115 |
applying patch from stdin |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
116 |
|
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
117 |
$ hg tip -q |
16910
ad229181ddbe
tests: remove 'hghave symlink' from test-import-git.t
Mads Kiilerich <mads@kiilerich.com>
parents:
16898
diff
changeset
|
118 |
3:b1f57753fad2 |
12193
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
119 |
|
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
120 |
$ hg locate |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
121 |
copyx |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
122 |
empty |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
123 |
new |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
124 |
rename |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
125 |
|
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
126 |
Delete: |
2864 | 127 |
|
12193
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
128 |
$ hg import -d "1000000 0" -mdelete - <<EOF |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
129 |
> diff --git a/copyx b/copyx |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
130 |
> deleted file mode 100755 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
131 |
> index 7898192..0000000 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
132 |
> --- a/copyx |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
133 |
> +++ /dev/null |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
134 |
> @@ -1 +0,0 @@ |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
135 |
> -a |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
136 |
> EOF |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
137 |
applying patch from stdin |
2864 | 138 |
|
12193
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
139 |
$ hg tip -q |
16910
ad229181ddbe
tests: remove 'hghave symlink' from test-import-git.t
Mads Kiilerich <mads@kiilerich.com>
parents:
16898
diff
changeset
|
140 |
4:1bd1da94b9b2 |
12193
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
141 |
|
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
142 |
$ hg locate |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
143 |
empty |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
144 |
new |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
145 |
rename |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
146 |
|
12365
22f3353bcc36
tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12316
diff
changeset
|
147 |
$ test -f copyx |
22f3353bcc36
tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12316
diff
changeset
|
148 |
[1] |
2864 | 149 |
|
12193
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
150 |
Regular diff: |
2864 | 151 |
|
12193
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
152 |
$ hg import -d "1000000 0" -mregular - <<EOF |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
153 |
> diff --git a/rename b/rename |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
154 |
> index 7898192..72e1fe3 100644 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
155 |
> --- a/rename |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
156 |
> +++ b/rename |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
157 |
> @@ -1 +1,5 @@ |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
158 |
> a |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
159 |
> +a |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
160 |
> +a |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
161 |
> +a |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
162 |
> +a |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
163 |
> EOF |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
164 |
applying patch from stdin |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
165 |
|
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
166 |
$ hg tip -q |
16910
ad229181ddbe
tests: remove 'hghave symlink' from test-import-git.t
Mads Kiilerich <mads@kiilerich.com>
parents:
16898
diff
changeset
|
167 |
5:46fe99cb3035 |
12193
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
168 |
|
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
169 |
Copy and modify: |
2864 | 170 |
|
12193
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
171 |
$ hg import -d "1000000 0" -mcopymod - <<EOF |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
172 |
> diff --git a/rename b/copy2 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
173 |
> similarity index 80% |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
174 |
> copy from rename |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
175 |
> copy to copy2 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
176 |
> index 72e1fe3..b53c148 100644 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
177 |
> --- a/rename |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
178 |
> +++ b/copy2 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
179 |
> @@ -1,5 +1,5 @@ |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
180 |
> a |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
181 |
> a |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
182 |
> -a |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
183 |
> +b |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
184 |
> a |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
185 |
> a |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
186 |
> EOF |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
187 |
applying patch from stdin |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
188 |
|
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
189 |
$ hg tip -q |
16910
ad229181ddbe
tests: remove 'hghave symlink' from test-import-git.t
Mads Kiilerich <mads@kiilerich.com>
parents:
16898
diff
changeset
|
190 |
6:ffeb3197c12d |
2864 | 191 |
|
12193
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
192 |
$ hg cat copy2 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
193 |
a |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
194 |
a |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
195 |
b |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
196 |
a |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
197 |
a |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
198 |
|
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
199 |
Rename and modify: |
2864 | 200 |
|
12193
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
201 |
$ hg import -d "1000000 0" -mrenamemod - <<EOF |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
202 |
> diff --git a/copy2 b/rename2 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
203 |
> similarity index 80% |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
204 |
> rename from copy2 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
205 |
> rename to rename2 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
206 |
> index b53c148..8f81e29 100644 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
207 |
> --- a/copy2 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
208 |
> +++ b/rename2 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
209 |
> @@ -1,5 +1,5 @@ |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
210 |
> a |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
211 |
> a |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
212 |
> b |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
213 |
> -a |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
214 |
> +c |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
215 |
> a |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
216 |
> EOF |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
217 |
applying patch from stdin |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
218 |
|
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
219 |
$ hg tip -q |
16910
ad229181ddbe
tests: remove 'hghave symlink' from test-import-git.t
Mads Kiilerich <mads@kiilerich.com>
parents:
16898
diff
changeset
|
220 |
7:401aede9e6bb |
12193
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
221 |
|
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
222 |
$ hg locate copy2 |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
12193
diff
changeset
|
223 |
[1] |
12193
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
224 |
$ hg cat rename2 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
225 |
a |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
226 |
a |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
227 |
b |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
228 |
c |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
229 |
a |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
230 |
|
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
231 |
One file renamed multiple times: |
2864 | 232 |
|
12193
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
233 |
$ hg import -d "1000000 0" -mmultirenames - <<EOF |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
234 |
> diff --git a/rename2 b/rename3 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
235 |
> rename from rename2 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
236 |
> rename to rename3 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
237 |
> diff --git a/rename2 b/rename3-2 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
238 |
> rename from rename2 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
239 |
> rename to rename3-2 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
240 |
> EOF |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
241 |
applying patch from stdin |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
242 |
|
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
243 |
$ hg tip -q |
16910
ad229181ddbe
tests: remove 'hghave symlink' from test-import-git.t
Mads Kiilerich <mads@kiilerich.com>
parents:
16898
diff
changeset
|
244 |
8:2ef727e684e8 |
12193
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
245 |
|
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
246 |
$ hg log -vr. --template '{rev} {files} / {file_copies}\n' |
16910
ad229181ddbe
tests: remove 'hghave symlink' from test-import-git.t
Mads Kiilerich <mads@kiilerich.com>
parents:
16898
diff
changeset
|
247 |
8 rename2 rename3 rename3-2 / rename3 (rename2)rename3-2 (rename2) |
12193
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
248 |
|
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
249 |
$ hg locate rename2 rename3 rename3-2 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
250 |
rename3 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
251 |
rename3-2 |
2864 | 252 |
|
12193
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
253 |
$ hg cat rename3 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
254 |
a |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
255 |
a |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
256 |
b |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
257 |
c |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
258 |
a |
3701
05c8704a3743
handle git patches that rename a file to more than one destination
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3589
diff
changeset
|
259 |
|
12193
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
260 |
$ hg cat rename3-2 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
261 |
a |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
262 |
a |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
263 |
b |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
264 |
c |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
265 |
a |
3701
05c8704a3743
handle git patches that rename a file to more than one destination
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3589
diff
changeset
|
266 |
|
12193
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
267 |
$ echo foo > foo |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
268 |
$ hg add foo |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
269 |
$ hg ci -m 'add foo' |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
270 |
|
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
271 |
Binary files and regular patch hunks: |
3716
ab5600428b08
handle files with both git binary patches and copy/rename ops
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3701
diff
changeset
|
272 |
|
12193
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
273 |
$ hg import -d "1000000 0" -m binaryregular - <<EOF |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
274 |
> diff --git a/binary b/binary |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
275 |
> new file mode 100644 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
276 |
> index 0000000000000000000000000000000000000000..593f4708db84ac8fd0f5cc47c634f38c013fe9e4 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
277 |
> GIT binary patch |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
278 |
> literal 4 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
279 |
> Lc\${NkU|;|M00aO5 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
280 |
> |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
281 |
> diff --git a/foo b/foo2 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
282 |
> rename from foo |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
283 |
> rename to foo2 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
284 |
> EOF |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
285 |
applying patch from stdin |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
286 |
|
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
287 |
$ hg tip -q |
16910
ad229181ddbe
tests: remove 'hghave symlink' from test-import-git.t
Mads Kiilerich <mads@kiilerich.com>
parents:
16898
diff
changeset
|
288 |
10:27377172366e |
12193
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
289 |
|
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
290 |
$ cat foo2 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
291 |
foo |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
292 |
|
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
293 |
$ hg manifest --debug | grep binary |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
294 |
045c85ba38952325e126c70962cc0f9d9077bc67 644 binary |
3716
ab5600428b08
handle files with both git binary patches and copy/rename ops
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3701
diff
changeset
|
295 |
|
12193
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
296 |
Multiple binary files: |
3717
9e248cfd8b94
handle files with more than one git binary patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3716
diff
changeset
|
297 |
|
12193
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
298 |
$ hg import -d "1000000 0" -m multibinary - <<EOF |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
299 |
> diff --git a/mbinary1 b/mbinary1 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
300 |
> new file mode 100644 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
301 |
> index 0000000000000000000000000000000000000000..593f4708db84ac8fd0f5cc47c634f38c013fe9e4 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
302 |
> GIT binary patch |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
303 |
> literal 4 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
304 |
> Lc\${NkU|;|M00aO5 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
305 |
> |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
306 |
> diff --git a/mbinary2 b/mbinary2 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
307 |
> new file mode 100644 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
308 |
> index 0000000000000000000000000000000000000000..112363ac1917b417ffbd7f376ca786a1e5fa7490 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
309 |
> GIT binary patch |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
310 |
> literal 5 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
311 |
> Mc\${NkU|\`?^000jF3jhEB |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
312 |
> |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
313 |
> EOF |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
314 |
applying patch from stdin |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
315 |
|
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
316 |
$ hg tip -q |
16910
ad229181ddbe
tests: remove 'hghave symlink' from test-import-git.t
Mads Kiilerich <mads@kiilerich.com>
parents:
16898
diff
changeset
|
317 |
11:18b73a84b4ab |
3717
9e248cfd8b94
handle files with more than one git binary patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3716
diff
changeset
|
318 |
|
12193
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
319 |
$ hg manifest --debug | grep mbinary |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
320 |
045c85ba38952325e126c70962cc0f9d9077bc67 644 mbinary1 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
321 |
a874b471193996e7cb034bb301cac7bdaf3e3f46 644 mbinary2 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
322 |
|
20138
db0f8738d3d4
test-import-git.t: work around check-code hating on ^ and $( in tests
Augie Fackler <raf@durin42.com>
parents:
20137
diff
changeset
|
323 |
Binary file and delta hunk (we build the patch using this sed hack to |
21024
7731a2281cf0
spelling: fixes from spell checker
Mads Kiilerich <madski@unity3d.com>
parents:
20138
diff
changeset
|
324 |
avoid an unquoted ^, which check-code says breaks sh on Solaris): |
20137
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
325 |
|
20138
db0f8738d3d4
test-import-git.t: work around check-code hating on ^ and $( in tests
Augie Fackler <raf@durin42.com>
parents:
20137
diff
changeset
|
326 |
$ sed 's/ caret /^/g;s/ dollarparen /$(/g' > quote-hack.patch <<'EOF' |
20137
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
327 |
> diff --git a/delta b/delta |
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
328 |
> new file mode 100644 |
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
329 |
> index 0000000000000000000000000000000000000000..8c9b7831b231c2600843e303e66b521353a200b3 |
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
330 |
> GIT binary patch |
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
331 |
> literal 3749 |
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
332 |
> zcmV;W4qEYvP)<h;3K|Lk000e1NJLTq006iE002D*0ssI2kt{U(0000PbVXQnQ*UN; |
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
333 |
> zcVTj606}DLVr3vnZDD6+Qe|Oed2z{QJOBU=M@d9MRCwC#oC!>o#}>x{(W-y~UN*tK |
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
334 |
> z%A%sxiUy2Ys)0Vm#ueArYKoYqX;GuiqZpgirM6nCVoYk?YNAz3G~z;BZ~@~&OQEe4 |
20138
db0f8738d3d4
test-import-git.t: work around check-code hating on ^ and $( in tests
Augie Fackler <raf@durin42.com>
parents:
20137
diff
changeset
|
335 |
> zmGvS5isFJI;Pd_7J+EKxyHZeu` caret t4r2>F;h-+VK3{_{WoGv8dSpFDYDrA%3UX03pt |
20137
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
336 |
> zOaVoi0*W#P6lDr1$`nwPDWE7*rhuYM0Y#YtiZTThWeO<D6i}2YpqR<%$s>bRRaI42 |
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
337 |
> zS3iFIxJ8Q=EnBv1Z7?pBw_bLjJb3V+tgP(Tty_2R-mR#p04x78n2n7MSOFyt4i1iv |
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
338 |
> zjxH`PPEJmgD7U?IK&h;(EGQ@_DJc<@01=4fiNXHcKZ8LhZQ8T}E3U4tUS3}OrcgQW |
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
339 |
> zWdX{K8#l7Ev&#$ysR)G#0*rC+<WGZ3?CtG4bm-ve>Dj$|_qJ`@D*stNP_AFUe&x!Q |
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
340 |
> zJ9q9B7Z=ym)MyZ?Tg1ROunUYr81nV?B@!tYS~5_|%gfW#(_s<4UN1!Q?Dv8d>g#m6 |
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
341 |
> z%*@R2@bI2JdnzxQ!EDU`$eQY!tgI~Zn$prz;gaXNod5*5p(1Bz=P$qfvZ$y?dC@X~ |
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
342 |
> zlAD+NAKhB{=;6bMwzjqn>9mavvKOGd`s%A+fBiL>Q;xJWpa72C+}u{JTHUX>{~}Qj |
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
343 |
> zUb%hyHgN~c?cBLjInvUALMD9g-aXt54ZL8AOCvXL-V6!~ijR*kEG$&Mv?!pE61OlI |
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
344 |
> z8nzMSPE8F7bH|Py*RNl1VUCggq<V)>@_6gkEeiz7{rmTeuNTW6+KVS#0FG%IHf-3L |
20138
db0f8738d3d4
test-import-git.t: work around check-code hating on ^ and $( in tests
Augie Fackler <raf@durin42.com>
parents:
20137
diff
changeset
|
345 |
> zGiS21vn>WCCr+GLx caret !uNetzB6u3o(w6&1C2?_LW8ij$+$sZ*zZ`|US3H@8N~%&V%Z |
db0f8738d3d4
test-import-git.t: work around check-code hating on ^ and $( in tests
Augie Fackler <raf@durin42.com>
parents:
20137
diff
changeset
|
346 |
> zAeA0HdhFS=$6|nzn3%YH`SN<>DQRO;Qc caret )dfdvA caret 5u`Xf;Zzu<ZQHgG?28V-#s<;T |
20137
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
347 |
> zzkh#LA)v7gpoE5ou3o*GoUUF%b#iht&kl9d0)><$FE1}ACr68;uCA`6DrGmz_U+rp |
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
348 |
> zL>Rx;X_yhk$fP_yJrTCQ|NgsW0A<985g&c@k-NKly<>mgU8n||ZPPV<`SN8#%$+-T |
20138
db0f8738d3d4
test-import-git.t: work around check-code hating on ^ and $( in tests
Augie Fackler <raf@durin42.com>
parents:
20137
diff
changeset
|
349 |
> zfP$T!ou8jypFVwnzqhxyUvIxXd-wF~*U!ht=hCH1wzjqn9x#)IrhDa;S0JbK caret z_$W |
20137
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
350 |
> zd(8rX@;7|t*;GJ5h$SZ{v(}+UBEs$4w~?{@9%`_Z<P<kox5bMWuUWH(sF9hONgd$Q |
20138
db0f8738d3d4
test-import-git.t: work around check-code hating on ^ and $( in tests
Augie Fackler <raf@durin42.com>
parents:
20137
diff
changeset
|
351 |
> zunCgwT@1|CU9+;X caret 4z&|M~@yw23Ay50NFWn=FqF%yLZEUty;AT2??1oV@B)Nt))J7 |
20137
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
352 |
> zh>{5j2@f7T=-an%L_`E)h;mZ4D_5>?7tjQtVPRo2XU-&;mX(!l-MSTJP4XWY82JAC |
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
353 |
> z@57+y&!1=P{Mn{W8)-HzEsgAtd63}Cazc>O6vGb>51%@9DzbyI3?4j~$ijmT95_IS |
20138
db0f8738d3d4
test-import-git.t: work around check-code hating on ^ and $( in tests
Augie Fackler <raf@durin42.com>
parents:
20137
diff
changeset
|
354 |
> zS#r!LCDW%*4-O7CGnkr$xXR1RQ&UrA<CQt} caret 73NL%zk`)Jk!yxUAt-1r}ggLn-Zq} |
20137
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
355 |
> z*s){8pw68;i+kiG%CpBKYSJLLFyq&*U8}qDp+kpe&6<Vp(Z58%l#~>ZK?&s7y?b}i |
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
356 |
> zuwcOgO%x-27A;y785zknl_{sU;E6v$8{pWmVS{KaJPpu`i;HP$#flY@u~Ua~K3%tN |
20138
db0f8738d3d4
test-import-git.t: work around check-code hating on ^ and $( in tests
Augie Fackler <raf@durin42.com>
parents:
20137
diff
changeset
|
357 |
> z-LhrNh{9SoHgDd%WXTc$$~Dq{?AWou3!H&?V8K{ caret {P9Ot5vecD?%1&-E-ntBFj87( |
20137
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
358 |
> zy5`QE%QRX7qcHC%1{Ua}M~}L6=`wQUNEQ=I;qc+ZMMXtK2T+0os;jEco;}OV9z1w3 |
20138
db0f8738d3d4
test-import-git.t: work around check-code hating on ^ and $( in tests
Augie Fackler <raf@durin42.com>
parents:
20137
diff
changeset
|
359 |
> zARqv caret bm-85xnRCng3OT|MyVSmR3ND7 caret ?KaQGG! caret (aTbo1N;Nz;X3Q9FJbwK6`0?Yp |
db0f8738d3d4
test-import-git.t: work around check-code hating on ^ and $( in tests
Augie Fackler <raf@durin42.com>
parents:
20137
diff
changeset
|
360 |
> zj*X2ac;Pw3!I2|JShDaF>-gJmzm1NLj){rk&o|$E caret WAsfrK=x&@B!`w7Hik81sPz4 |
db0f8738d3d4
test-import-git.t: work around check-code hating on ^ and $( in tests
Augie Fackler <raf@durin42.com>
parents:
20137
diff
changeset
|
361 |
> zuJTaiCppM>-+c!wPzcUw)5@?J4U-u|pJ~xbWUe-C+60k caret 7>9!)56DbjmA~`OJJ40v |
20137
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
362 |
> zu3hCA7eJXZWeN|1iJLu87$;+fS8+Kq6O`aT)*_x@sY#t7LxwoEcVw*)cWhhQW@l%! |
20138
db0f8738d3d4
test-import-git.t: work around check-code hating on ^ and $( in tests
Augie Fackler <raf@durin42.com>
parents:
20137
diff
changeset
|
363 |
> z{#Z=y+qcK@%z{p*D=8_Fcg278AnH3fI5;~yGu?9TscxXaaP*4$f<LIv! caret 5Lfr%vKg |
db0f8738d3d4
test-import-git.t: work around check-code hating on ^ and $( in tests
Augie Fackler <raf@durin42.com>
parents:
20137
diff
changeset
|
364 |
> zpxmunH#%=+ICMvZA~wyNH%~eMl!-g caret R!cYJ#WmLq5N8viz#J%%LPtkO?V)tZ81cp> |
20137
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
365 |
> z{ALK?fNPePmd;289&M8Q3>YwgZX5GcGY&n>K1<x)!`;Qjg&}bb!Lrnl@xH#kS~VYE |
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
366 |
> zpJmIJO`A3iy+Y3X`k>cY-@}Iw2Onq`=!ba3eATgs3yg3Wej=+P-Z8WF#w=RXvS@J3 |
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
367 |
> zEyhVTj-gO?kfDu1g9afo<RkPrYzG#_yF41IFxF%Ylg>9lx6<clPweR-b7Hn+r)e1l |
20138
db0f8738d3d4
test-import-git.t: work around check-code hating on ^ and $( in tests
Augie Fackler <raf@durin42.com>
parents:
20137
diff
changeset
|
368 |
> zO6c6FbNt@;;*w$z;N|H>h{czme)_4V6UC4hv**kX2@L caret Bgds dollarparen &P7M4dhfmWe)!=B |
20137
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
369 |
> zR3X=Y{P9N}p@-##@1ZNW1YbVaiP~D@8m&<dzEP&cO|87Ju#j*=;wH~Exr>i*Hpp&@ |
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
370 |
> z`9!Sj+O;byD~s8qZ>6QB8uv7Bpn&&?xe;;e<M4F8KEID&pT7QmqoSgq&06adp5T=U |
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
371 |
> z6DH*4=AB7C1D9Amu?ia-wtxSAlmTEO96XHx)-+rKP;ip$pukuSJGW3P1aUmc2yo%) |
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
372 |
> z&<t3F>d1X+1qzaag-%x+eKHx{?Afz3GBQSw9u0lw<mB+I#v11TKRpKWQS+lvVL7=u |
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
373 |
> zHr6)1ynEF<i3kO6A8&ppPMo-F=PnWfXkSj@i*7J6C<F}wR?s(O0niC?t+6;+k}pPq |
20138
db0f8738d3d4
test-import-git.t: work around check-code hating on ^ and $( in tests
Augie Fackler <raf@durin42.com>
parents:
20137
diff
changeset
|
374 |
> zrok&TPU40rL0ZYDwenNrrmPZ`gjo@DEF`7 caret cKP||pUr;+r)hyn9O37=xA`3%Bj-ih |
db0f8738d3d4
test-import-git.t: work around check-code hating on ^ and $( in tests
Augie Fackler <raf@durin42.com>
parents:
20137
diff
changeset
|
375 |
> z+1usk<%5G-y+R?tA`qY=)6&vNjL{P?QzHg%P%>`ZxP=QB%DHY6L26?36V_p caret {}n$q |
db0f8738d3d4
test-import-git.t: work around check-code hating on ^ and $( in tests
Augie Fackler <raf@durin42.com>
parents:
20137
diff
changeset
|
376 |
> z3@9W=KmGI*Ng_Q#AzA%-z|Z caret |#oW(hkfgpuS$RKRhlrarX%efMMCs}GLChec5+y{6 |
db0f8738d3d4
test-import-git.t: work around check-code hating on ^ and $( in tests
Augie Fackler <raf@durin42.com>
parents:
20137
diff
changeset
|
377 |
> z1Qnxim_C-fmQuaAK_NUHUBV&;1c0V)wji<RcdZ*aAWTwyt>hVnlt caret asFCe0&a@tqp |
20137
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
378 |
> zEEy;$L}D$X6)wfQNl8gu6Z>oB3_RrP=gTyK2@@w#LbQfLNHj>Q&z(C5wUFhK+}0aV |
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
379 |
> zSohlc=7K+spN<ctf}5KgKqNyJDNP9;LZd)nTE=9|6Xdr9%Hzk63-tL2c9FD*rsyYY |
20138
db0f8738d3d4
test-import-git.t: work around check-code hating on ^ and $( in tests
Augie Fackler <raf@durin42.com>
parents:
20137
diff
changeset
|
380 |
> z!}t+Yljq7-p$X;4_YL?6d;mdY3R##o1e%rlPxrsMh8|;sKTr~ caret QD#sw3&vS$FwlTk |
db0f8738d3d4
test-import-git.t: work around check-code hating on ^ and $( in tests
Augie Fackler <raf@durin42.com>
parents:
20137
diff
changeset
|
381 |
> zp1#Gw!Qo-$LtvpXt#ApV0g) caret F=qFB`VB!W297x=$mr<$>rco3v$QKih_xN!k6;M=@ |
20137
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
382 |
> zCr?gDNQj7tm@;JwD;Ty&NlBSCYZk(b3dZeN8D4h2{r20dSFc7;(>E&r`s=TVtzpB4 |
20138
db0f8738d3d4
test-import-git.t: work around check-code hating on ^ and $( in tests
Augie Fackler <raf@durin42.com>
parents:
20137
diff
changeset
|
383 |
> zk+ caret N&zCAiRns(?p6iBlk9v&h{1ve(FNtc)td51M>)TkXhc6{>5C)`fS$&)A1*CP1% |
db0f8738d3d4
test-import-git.t: work around check-code hating on ^ and $( in tests
Augie Fackler <raf@durin42.com>
parents:
20137
diff
changeset
|
384 |
> zld+peue4aYbg3C0!+4mu+}vE caret j_feX+ZijvffBI7Ofh#RZ*U3<3J5(+nfRCzexqQ5 |
db0f8738d3d4
test-import-git.t: work around check-code hating on ^ and $( in tests
Augie Fackler <raf@durin42.com>
parents:
20137
diff
changeset
|
385 |
> zgM&##Y4Dd{e%ZKjqrbm@|Ni}l4jo!AqtFynj3Xsd$o caret ?yV4$|UQ(j&UWCH>M=o_&N |
db0f8738d3d4
test-import-git.t: work around check-code hating on ^ and $( in tests
Augie Fackler <raf@durin42.com>
parents:
20137
diff
changeset
|
386 |
> zmclXc3i|Q#<;#EoG>~V}4unTHbUK}u=y4;rA3S&vzC3 caret aJP!&D4RvvGfoyo(>C>la |
20137
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
387 |
> zijP<=v>X{3Ne&2BXo}DV8l0V-jdv`$am0ubG{Wuh%CTd|l9Q7m;G&|U@#Dvbhlj(d |
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
388 |
> zg6W{3ATxYt#T?)3;SmIgOP4M|Dki~I_TX7SxP0x}wI~DQI7Lhm2BI7gph(aPIFAd; |
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
389 |
> zQ&UsF`Q{rOz+z=87c5v%@5u~d6dWV5OlX`oH3cAH&UlvsZUEo(Q(P|lKs17rXvaiU |
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
390 |
> zQcj}IEufi1+Bnh6&(EhF{7O3vLHp`jjlp0J<M1kh$+$2xGm~Zk7OY7(q=&Rdhq*RG |
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
391 |
> zwrmcd5MnP}xByB_)P@{J>DR9x6;`cUwPM8z){yooNiXPOc9_{W-gtwxE5TUg0vJk6 |
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
392 |
> zO#JGruV&1cL6VGK2?+_YQr4`+EY8;Sm$9U$uuGRN=uj3k7?O9b+R~J7t_y*K64ZnI |
20138
db0f8738d3d4
test-import-git.t: work around check-code hating on ^ and $( in tests
Augie Fackler <raf@durin42.com>
parents:
20137
diff
changeset
|
393 |
> zM+{aE<b(v?vSmw;9zFP!aE266zHIhlmdI@ caret xa6o2jwdRk54a$>pcRbC29ZyG!Cfdp |
20137
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
394 |
> zutFf`Q`vljgo!(wHf=)F#m2_MIuj;L(2ja2YsQRX+rswV{d<H`Ar;(@%aNa9VPU8Z |
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
395 |
> z;tq*`y}dm#NDJHKlV}uTIm!_vAq5E7!X-p{P=Z=Sh668>PuVS1*6e}OwOiMc;u3OQ |
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
396 |
> z@Bs)w3=lzfKoufH$SFuPG@uZ4NOnM#+=8LnQ2Q4zUd+nM+OT26;lqbN{P07dhH{jH |
20138
db0f8738d3d4
test-import-git.t: work around check-code hating on ^ and $( in tests
Augie Fackler <raf@durin42.com>
parents:
20137
diff
changeset
|
397 |
> zManE8 caret dLms-Q2;1kB<*Q1a3f8kZr;xX=!Qro@`~@xN*Qj>gx;i;0Z24!~i2uLb`}v |
db0f8738d3d4
test-import-git.t: work around check-code hating on ^ and $( in tests
Augie Fackler <raf@durin42.com>
parents:
20137
diff
changeset
|
398 |
> zA?R$|wvC+m caret Ups=*(4lDh*=UN8{5h(A?p#D caret 2N$8u4Z55!q?ZAh(iEEng9_Zi>IgO |
db0f8738d3d4
test-import-git.t: work around check-code hating on ^ and $( in tests
Augie Fackler <raf@durin42.com>
parents:
20137
diff
changeset
|
399 |
> z#~**JC8hE4@n{hO&8btT5F*?nC_%LhA3i)PDhh-pB_&1wGrDIl caret *=8x3n&;akBf caret - |
db0f8738d3d4
test-import-git.t: work around check-code hating on ^ and $( in tests
Augie Fackler <raf@durin42.com>
parents:
20137
diff
changeset
|
400 |
> zJd&86kq$%%907v caret tgWoQdwI`|oNK%VvU~S#C<o caret F?6c48?Cjj#-4P<>HFD%&|Ni~t |
db0f8738d3d4
test-import-git.t: work around check-code hating on ^ and $( in tests
Augie Fackler <raf@durin42.com>
parents:
20137
diff
changeset
|
401 |
> zKJ(|#H`$<5W+6ZkBb213rXonKZLB+X> caret L}J@W6osP3piLD_5?R!`S}*{xLBzFiL4@ |
20137
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
402 |
> zX+}l{`A%?f@T5tT%ztu60p;)be`fWC`tP@WpO=?cpf8Xuf1OSj6d3f@Ki(ovDYq%0 |
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
403 |
> z{4ZSe`kOay5@=lAT!}vFzxyemC{sXDrhuYM0Y#ZI1r%ipD9W11{w=@&xgJ}t2x;ep |
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
404 |
> P00000NkvXXu0mjfZ5|Er |
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
405 |
> |
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
406 |
> literal 0 |
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
407 |
> HcmV?d00001 |
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
408 |
> |
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
409 |
> EOF |
20138
db0f8738d3d4
test-import-git.t: work around check-code hating on ^ and $( in tests
Augie Fackler <raf@durin42.com>
parents:
20137
diff
changeset
|
410 |
$ hg import -d "1000000 0" -m delta quote-hack.patch |
db0f8738d3d4
test-import-git.t: work around check-code hating on ^ and $( in tests
Augie Fackler <raf@durin42.com>
parents:
20137
diff
changeset
|
411 |
applying quote-hack.patch |
db0f8738d3d4
test-import-git.t: work around check-code hating on ^ and $( in tests
Augie Fackler <raf@durin42.com>
parents:
20137
diff
changeset
|
412 |
$ rm quote-hack.patch |
20137
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
413 |
|
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
414 |
$ hg manifest --debug | grep delta |
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
415 |
9600f98bb60ce732634d126aaa4ac1ec959c573e 644 delta |
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
416 |
|
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
417 |
$ hg import -d "1000000 0" -m delta - <<'EOF' |
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
418 |
> diff --git a/delta b/delta |
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
419 |
> index 8c9b7831b231c2600843e303e66b521353a200b3..0021dd95bc0dba53c39ce81377126d43731d68df 100644 |
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
420 |
> GIT binary patch |
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
421 |
> delta 49 |
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
422 |
> zcmZ1~yHs|=21Z8J$r~9bFdA-lVv=EEw4WT$qRf2QSa5SIOAHI6(&k4T8H|kLo4vWB |
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
423 |
> FSO9ZT4bA`n |
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
424 |
> |
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
425 |
> delta 49 |
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
426 |
> zcmV-10M7rV9i<(xumJ(}ld%Di0Xefm0vrMXpOaq%BLm9I%d>?9Tm%6Vv*HM70RcC& |
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
427 |
> HOA1;9yU-AD |
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
428 |
> |
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
429 |
> EOF |
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
430 |
applying patch from stdin |
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
431 |
|
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
432 |
$ hg manifest --debug | grep delta |
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
433 |
56094bbea136dcf8dbd4088f6af469bde1a98b75 644 delta |
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
434 |
|
12193
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
435 |
Filenames with spaces: |
3717
9e248cfd8b94
handle files with more than one git binary patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3716
diff
changeset
|
436 |
|
17347
2da47de36b6f
check-code: fix check for trailing whitespace on continued lines too
Mads Kiilerich <mads@kiilerich.com>
parents:
17345
diff
changeset
|
437 |
$ sed 's,EOL$,,g' <<EOF | hg import -d "1000000 0" -m spaces - |
12193
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
438 |
> diff --git a/foo bar b/foo bar |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
439 |
> new file mode 100644 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
440 |
> index 0000000..257cc56 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
441 |
> --- /dev/null |
17347
2da47de36b6f
check-code: fix check for trailing whitespace on continued lines too
Mads Kiilerich <mads@kiilerich.com>
parents:
17345
diff
changeset
|
442 |
> +++ b/foo bar EOL |
12193
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
443 |
> @@ -0,0 +1 @@ |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
444 |
> +foo |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
445 |
> EOF |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
446 |
applying patch from stdin |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
447 |
|
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
448 |
$ hg tip -q |
20137
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
449 |
14:4b79479c9a6d |
12193
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
450 |
|
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
451 |
$ cat "foo bar" |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
452 |
foo |
4679
826659bd8053
git patches: correct handling of filenames with spaces
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3736
diff
changeset
|
453 |
|
12193
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
454 |
Copy then modify the original file: |
4679
826659bd8053
git patches: correct handling of filenames with spaces
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3736
diff
changeset
|
455 |
|
12193
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
456 |
$ hg import -d "1000000 0" -m copy-mod-orig - <<EOF |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
457 |
> diff --git a/foo2 b/foo2 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
458 |
> index 257cc56..fe08ec6 100644 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
459 |
> --- a/foo2 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
460 |
> +++ b/foo2 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
461 |
> @@ -1 +1,2 @@ |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
462 |
> foo |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
463 |
> +new line |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
464 |
> diff --git a/foo2 b/foo3 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
465 |
> similarity index 100% |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
466 |
> copy from foo2 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
467 |
> copy to foo3 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
468 |
> EOF |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
469 |
applying patch from stdin |
5403
477136fa6571
Always copy the necessary files before applying a git patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5073
diff
changeset
|
470 |
|
12193
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
471 |
$ hg tip -q |
20137
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
472 |
15:9cbe44af4ae9 |
12193
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
473 |
|
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
474 |
$ cat foo3 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
475 |
foo |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
10928
diff
changeset
|
476 |
|
12577 | 477 |
Move text file and patch as binary |
12574
77600d697d0e
patch: fix rename text to binary file (issue2400)
Patrick Mezard <pmezard@gmail.com>
parents:
10928
diff
changeset
|
478 |
|
12577 | 479 |
$ echo a > text2 |
480 |
$ hg ci -Am0 |
|
481 |
adding text2 |
|
482 |
$ hg import -d "1000000 0" -m rename-as-binary - <<"EOF" |
|
483 |
> diff --git a/text2 b/binary2 |
|
484 |
> rename from text2 |
|
485 |
> rename to binary2 |
|
486 |
> index 78981922613b2afb6025042ff6bd878ac1994e85..10efcb362e9f3b3420fcfbfc0e37f3dc16e29757 |
|
487 |
> GIT binary patch |
|
488 |
> literal 5 |
|
489 |
> Mc$`b*O5$Pw00T?_*Z=?k |
|
490 |
> |
|
491 |
> EOF |
|
492 |
applying patch from stdin |
|
12586
b96de59a2c39
tests: fix 05210e955bef merge error in test-git-import.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
12577
diff
changeset
|
493 |
|
12943
7439ea4146f8
tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents:
12874
diff
changeset
|
494 |
$ cat binary2 |
12577 | 495 |
a |
496 |
b |
|
12943
7439ea4146f8
tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents:
12874
diff
changeset
|
497 |
\x00 (no-eol) (esc) |
12586
b96de59a2c39
tests: fix 05210e955bef merge error in test-git-import.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
12577
diff
changeset
|
498 |
|
17345
4f8054d3171b
check-code: fix check for trailing whitespace on sh command lines
Mads Kiilerich <mads@kiilerich.com>
parents:
16910
diff
changeset
|
499 |
$ hg st --copies --change . |
12586
b96de59a2c39
tests: fix 05210e955bef merge error in test-git-import.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
12577
diff
changeset
|
500 |
A binary2 |
b96de59a2c39
tests: fix 05210e955bef merge error in test-git-import.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
12577
diff
changeset
|
501 |
text2 |
b96de59a2c39
tests: fix 05210e955bef merge error in test-git-import.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
12577
diff
changeset
|
502 |
R text2 |
16522
a8065323c003
patch: display a nice error for invalid base85 data
Patrick Mezard <patrick@mezard.eu>
parents:
16506
diff
changeset
|
503 |
|
a8065323c003
patch: display a nice error for invalid base85 data
Patrick Mezard <patrick@mezard.eu>
parents:
16506
diff
changeset
|
504 |
Invalid base85 content |
16523
727068417b95
patch: include file name in binary patch error messages
Patrick Mezard <patrick@mezard.eu>
parents:
16522
diff
changeset
|
505 |
|
16522
a8065323c003
patch: display a nice error for invalid base85 data
Patrick Mezard <patrick@mezard.eu>
parents:
16506
diff
changeset
|
506 |
$ hg rollback |
20137
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
507 |
repository tip rolled back to revision 16 (undo import) |
9f1d4323c749
patch: add support for git delta hunks
Nicolas Vigier <boklm@mars-attacks.org>
parents:
17347
diff
changeset
|
508 |
working directory now based on revision 16 |
16522
a8065323c003
patch: display a nice error for invalid base85 data
Patrick Mezard <patrick@mezard.eu>
parents:
16506
diff
changeset
|
509 |
$ hg revert -aq |
a8065323c003
patch: display a nice error for invalid base85 data
Patrick Mezard <patrick@mezard.eu>
parents:
16506
diff
changeset
|
510 |
$ hg import -d "1000000 0" -m invalid-binary - <<"EOF" |
a8065323c003
patch: display a nice error for invalid base85 data
Patrick Mezard <patrick@mezard.eu>
parents:
16506
diff
changeset
|
511 |
> diff --git a/text2 b/binary2 |
a8065323c003
patch: display a nice error for invalid base85 data
Patrick Mezard <patrick@mezard.eu>
parents:
16506
diff
changeset
|
512 |
> rename from text2 |
a8065323c003
patch: display a nice error for invalid base85 data
Patrick Mezard <patrick@mezard.eu>
parents:
16506
diff
changeset
|
513 |
> rename to binary2 |
a8065323c003
patch: display a nice error for invalid base85 data
Patrick Mezard <patrick@mezard.eu>
parents:
16506
diff
changeset
|
514 |
> index 78981922613b2afb6025042ff6bd878ac1994e85..10efcb362e9f3b3420fcfbfc0e37f3dc16e29757 |
a8065323c003
patch: display a nice error for invalid base85 data
Patrick Mezard <patrick@mezard.eu>
parents:
16506
diff
changeset
|
515 |
> GIT binary patch |
a8065323c003
patch: display a nice error for invalid base85 data
Patrick Mezard <patrick@mezard.eu>
parents:
16506
diff
changeset
|
516 |
> literal 5 |
a8065323c003
patch: display a nice error for invalid base85 data
Patrick Mezard <patrick@mezard.eu>
parents:
16506
diff
changeset
|
517 |
> Mc$`b*O.$Pw00T?_*Z=?k |
a8065323c003
patch: display a nice error for invalid base85 data
Patrick Mezard <patrick@mezard.eu>
parents:
16506
diff
changeset
|
518 |
> |
a8065323c003
patch: display a nice error for invalid base85 data
Patrick Mezard <patrick@mezard.eu>
parents:
16506
diff
changeset
|
519 |
> EOF |
a8065323c003
patch: display a nice error for invalid base85 data
Patrick Mezard <patrick@mezard.eu>
parents:
16506
diff
changeset
|
520 |
applying patch from stdin |
16523
727068417b95
patch: include file name in binary patch error messages
Patrick Mezard <patrick@mezard.eu>
parents:
16522
diff
changeset
|
521 |
abort: could not decode "binary2" binary patch: bad base85 character at position 6 |
16522
a8065323c003
patch: display a nice error for invalid base85 data
Patrick Mezard <patrick@mezard.eu>
parents:
16506
diff
changeset
|
522 |
[255] |
16523
727068417b95
patch: include file name in binary patch error messages
Patrick Mezard <patrick@mezard.eu>
parents:
16522
diff
changeset
|
523 |
|
727068417b95
patch: include file name in binary patch error messages
Patrick Mezard <patrick@mezard.eu>
parents:
16522
diff
changeset
|
524 |
$ hg revert -aq |
727068417b95
patch: include file name in binary patch error messages
Patrick Mezard <patrick@mezard.eu>
parents:
16522
diff
changeset
|
525 |
$ hg import -d "1000000 0" -m rename-as-binary - <<"EOF" |
727068417b95
patch: include file name in binary patch error messages
Patrick Mezard <patrick@mezard.eu>
parents:
16522
diff
changeset
|
526 |
> diff --git a/text2 b/binary2 |
727068417b95
patch: include file name in binary patch error messages
Patrick Mezard <patrick@mezard.eu>
parents:
16522
diff
changeset
|
527 |
> rename from text2 |
727068417b95
patch: include file name in binary patch error messages
Patrick Mezard <patrick@mezard.eu>
parents:
16522
diff
changeset
|
528 |
> rename to binary2 |
727068417b95
patch: include file name in binary patch error messages
Patrick Mezard <patrick@mezard.eu>
parents:
16522
diff
changeset
|
529 |
> index 78981922613b2afb6025042ff6bd878ac1994e85..10efcb362e9f3b3420fcfbfc0e37f3dc16e29757 |
727068417b95
patch: include file name in binary patch error messages
Patrick Mezard <patrick@mezard.eu>
parents:
16522
diff
changeset
|
530 |
> GIT binary patch |
727068417b95
patch: include file name in binary patch error messages
Patrick Mezard <patrick@mezard.eu>
parents:
16522
diff
changeset
|
531 |
> literal 6 |
727068417b95
patch: include file name in binary patch error messages
Patrick Mezard <patrick@mezard.eu>
parents:
16522
diff
changeset
|
532 |
> Mc$`b*O5$Pw00T?_*Z=?k |
727068417b95
patch: include file name in binary patch error messages
Patrick Mezard <patrick@mezard.eu>
parents:
16522
diff
changeset
|
533 |
> |
727068417b95
patch: include file name in binary patch error messages
Patrick Mezard <patrick@mezard.eu>
parents:
16522
diff
changeset
|
534 |
> EOF |
727068417b95
patch: include file name in binary patch error messages
Patrick Mezard <patrick@mezard.eu>
parents:
16522
diff
changeset
|
535 |
applying patch from stdin |
727068417b95
patch: include file name in binary patch error messages
Patrick Mezard <patrick@mezard.eu>
parents:
16522
diff
changeset
|
536 |
abort: "binary2" length is 5 bytes, should be 6 |
727068417b95
patch: include file name in binary patch error messages
Patrick Mezard <patrick@mezard.eu>
parents:
16522
diff
changeset
|
537 |
[255] |
727068417b95
patch: include file name in binary patch error messages
Patrick Mezard <patrick@mezard.eu>
parents:
16522
diff
changeset
|
538 |
|
727068417b95
patch: include file name in binary patch error messages
Patrick Mezard <patrick@mezard.eu>
parents:
16522
diff
changeset
|
539 |
$ hg revert -aq |
727068417b95
patch: include file name in binary patch error messages
Patrick Mezard <patrick@mezard.eu>
parents:
16522
diff
changeset
|
540 |
$ hg import -d "1000000 0" -m rename-as-binary - <<"EOF" |
727068417b95
patch: include file name in binary patch error messages
Patrick Mezard <patrick@mezard.eu>
parents:
16522
diff
changeset
|
541 |
> diff --git a/text2 b/binary2 |
727068417b95
patch: include file name in binary patch error messages
Patrick Mezard <patrick@mezard.eu>
parents:
16522
diff
changeset
|
542 |
> rename from text2 |
727068417b95
patch: include file name in binary patch error messages
Patrick Mezard <patrick@mezard.eu>
parents:
16522
diff
changeset
|
543 |
> rename to binary2 |
727068417b95
patch: include file name in binary patch error messages
Patrick Mezard <patrick@mezard.eu>
parents:
16522
diff
changeset
|
544 |
> index 78981922613b2afb6025042ff6bd878ac1994e85..10efcb362e9f3b3420fcfbfc0e37f3dc16e29757 |
727068417b95
patch: include file name in binary patch error messages
Patrick Mezard <patrick@mezard.eu>
parents:
16522
diff
changeset
|
545 |
> GIT binary patch |
727068417b95
patch: include file name in binary patch error messages
Patrick Mezard <patrick@mezard.eu>
parents:
16522
diff
changeset
|
546 |
> Mc$`b*O5$Pw00T?_*Z=?k |
727068417b95
patch: include file name in binary patch error messages
Patrick Mezard <patrick@mezard.eu>
parents:
16522
diff
changeset
|
547 |
> |
727068417b95
patch: include file name in binary patch error messages
Patrick Mezard <patrick@mezard.eu>
parents:
16522
diff
changeset
|
548 |
> EOF |
727068417b95
patch: include file name in binary patch error messages
Patrick Mezard <patrick@mezard.eu>
parents:
16522
diff
changeset
|
549 |
applying patch from stdin |
727068417b95
patch: include file name in binary patch error messages
Patrick Mezard <patrick@mezard.eu>
parents:
16522
diff
changeset
|
550 |
abort: could not extract "binary2" binary data |
727068417b95
patch: include file name in binary patch error messages
Patrick Mezard <patrick@mezard.eu>
parents:
16522
diff
changeset
|
551 |
[255] |
727068417b95
patch: include file name in binary patch error messages
Patrick Mezard <patrick@mezard.eu>
parents:
16522
diff
changeset
|
552 |
|
16524
ed6a74312176
patch: be more tolerant with EOLs in binary diffs (issue2870)
Patrick Mezard <patrick@mezard.eu>
parents:
16523
diff
changeset
|
553 |
Simulate a copy/paste turning LF into CRLF (issue2870) |
ed6a74312176
patch: be more tolerant with EOLs in binary diffs (issue2870)
Patrick Mezard <patrick@mezard.eu>
parents:
16523
diff
changeset
|
554 |
|
ed6a74312176
patch: be more tolerant with EOLs in binary diffs (issue2870)
Patrick Mezard <patrick@mezard.eu>
parents:
16523
diff
changeset
|
555 |
$ hg revert -aq |
ed6a74312176
patch: be more tolerant with EOLs in binary diffs (issue2870)
Patrick Mezard <patrick@mezard.eu>
parents:
16523
diff
changeset
|
556 |
$ cat > binary.diff <<"EOF" |
ed6a74312176
patch: be more tolerant with EOLs in binary diffs (issue2870)
Patrick Mezard <patrick@mezard.eu>
parents:
16523
diff
changeset
|
557 |
> diff --git a/text2 b/binary2 |
ed6a74312176
patch: be more tolerant with EOLs in binary diffs (issue2870)
Patrick Mezard <patrick@mezard.eu>
parents:
16523
diff
changeset
|
558 |
> rename from text2 |
ed6a74312176
patch: be more tolerant with EOLs in binary diffs (issue2870)
Patrick Mezard <patrick@mezard.eu>
parents:
16523
diff
changeset
|
559 |
> rename to binary2 |
ed6a74312176
patch: be more tolerant with EOLs in binary diffs (issue2870)
Patrick Mezard <patrick@mezard.eu>
parents:
16523
diff
changeset
|
560 |
> index 78981922613b2afb6025042ff6bd878ac1994e85..10efcb362e9f3b3420fcfbfc0e37f3dc16e29757 |
ed6a74312176
patch: be more tolerant with EOLs in binary diffs (issue2870)
Patrick Mezard <patrick@mezard.eu>
parents:
16523
diff
changeset
|
561 |
> GIT binary patch |
ed6a74312176
patch: be more tolerant with EOLs in binary diffs (issue2870)
Patrick Mezard <patrick@mezard.eu>
parents:
16523
diff
changeset
|
562 |
> literal 5 |
ed6a74312176
patch: be more tolerant with EOLs in binary diffs (issue2870)
Patrick Mezard <patrick@mezard.eu>
parents:
16523
diff
changeset
|
563 |
> Mc$`b*O5$Pw00T?_*Z=?k |
ed6a74312176
patch: be more tolerant with EOLs in binary diffs (issue2870)
Patrick Mezard <patrick@mezard.eu>
parents:
16523
diff
changeset
|
564 |
> |
ed6a74312176
patch: be more tolerant with EOLs in binary diffs (issue2870)
Patrick Mezard <patrick@mezard.eu>
parents:
16523
diff
changeset
|
565 |
> EOF |
ed6a74312176
patch: be more tolerant with EOLs in binary diffs (issue2870)
Patrick Mezard <patrick@mezard.eu>
parents:
16523
diff
changeset
|
566 |
>>> fp = file('binary.diff', 'rb') |
ed6a74312176
patch: be more tolerant with EOLs in binary diffs (issue2870)
Patrick Mezard <patrick@mezard.eu>
parents:
16523
diff
changeset
|
567 |
>>> data = fp.read() |
ed6a74312176
patch: be more tolerant with EOLs in binary diffs (issue2870)
Patrick Mezard <patrick@mezard.eu>
parents:
16523
diff
changeset
|
568 |
>>> fp.close() |
ed6a74312176
patch: be more tolerant with EOLs in binary diffs (issue2870)
Patrick Mezard <patrick@mezard.eu>
parents:
16523
diff
changeset
|
569 |
>>> file('binary.diff', 'wb').write(data.replace('\n', '\r\n')) |
ed6a74312176
patch: be more tolerant with EOLs in binary diffs (issue2870)
Patrick Mezard <patrick@mezard.eu>
parents:
16523
diff
changeset
|
570 |
$ rm binary2 |
ed6a74312176
patch: be more tolerant with EOLs in binary diffs (issue2870)
Patrick Mezard <patrick@mezard.eu>
parents:
16523
diff
changeset
|
571 |
$ hg import --no-commit binary.diff |
ed6a74312176
patch: be more tolerant with EOLs in binary diffs (issue2870)
Patrick Mezard <patrick@mezard.eu>
parents:
16523
diff
changeset
|
572 |
applying binary.diff |
ed6a74312176
patch: be more tolerant with EOLs in binary diffs (issue2870)
Patrick Mezard <patrick@mezard.eu>
parents:
16523
diff
changeset
|
573 |
|
12874
bb7bf43b72fb
patch: fix copies when patching over uncommitted changed (issue2459)
Patrick Mezard <pmezard@gmail.com>
parents:
12586
diff
changeset
|
574 |
$ cd .. |
12586
b96de59a2c39
tests: fix 05210e955bef merge error in test-git-import.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
12577
diff
changeset
|
575 |
|
12874
bb7bf43b72fb
patch: fix copies when patching over uncommitted changed (issue2459)
Patrick Mezard <pmezard@gmail.com>
parents:
12586
diff
changeset
|
576 |
Consecutive import with renames (issue2459) |
bb7bf43b72fb
patch: fix copies when patching over uncommitted changed (issue2459)
Patrick Mezard <pmezard@gmail.com>
parents:
12586
diff
changeset
|
577 |
|
bb7bf43b72fb
patch: fix copies when patching over uncommitted changed (issue2459)
Patrick Mezard <pmezard@gmail.com>
parents:
12586
diff
changeset
|
578 |
$ hg init issue2459 |
bb7bf43b72fb
patch: fix copies when patching over uncommitted changed (issue2459)
Patrick Mezard <pmezard@gmail.com>
parents:
12586
diff
changeset
|
579 |
$ cd issue2459 |
bb7bf43b72fb
patch: fix copies when patching over uncommitted changed (issue2459)
Patrick Mezard <pmezard@gmail.com>
parents:
12586
diff
changeset
|
580 |
$ hg import --no-commit --force - <<EOF |
bb7bf43b72fb
patch: fix copies when patching over uncommitted changed (issue2459)
Patrick Mezard <pmezard@gmail.com>
parents:
12586
diff
changeset
|
581 |
> diff --git a/a b/a |
bb7bf43b72fb
patch: fix copies when patching over uncommitted changed (issue2459)
Patrick Mezard <pmezard@gmail.com>
parents:
12586
diff
changeset
|
582 |
> new file mode 100644 |
bb7bf43b72fb
patch: fix copies when patching over uncommitted changed (issue2459)
Patrick Mezard <pmezard@gmail.com>
parents:
12586
diff
changeset
|
583 |
> EOF |
bb7bf43b72fb
patch: fix copies when patching over uncommitted changed (issue2459)
Patrick Mezard <pmezard@gmail.com>
parents:
12586
diff
changeset
|
584 |
applying patch from stdin |
bb7bf43b72fb
patch: fix copies when patching over uncommitted changed (issue2459)
Patrick Mezard <pmezard@gmail.com>
parents:
12586
diff
changeset
|
585 |
$ hg import --no-commit --force - <<EOF |
bb7bf43b72fb
patch: fix copies when patching over uncommitted changed (issue2459)
Patrick Mezard <pmezard@gmail.com>
parents:
12586
diff
changeset
|
586 |
> diff --git a/a b/b |
bb7bf43b72fb
patch: fix copies when patching over uncommitted changed (issue2459)
Patrick Mezard <pmezard@gmail.com>
parents:
12586
diff
changeset
|
587 |
> rename from a |
bb7bf43b72fb
patch: fix copies when patching over uncommitted changed (issue2459)
Patrick Mezard <pmezard@gmail.com>
parents:
12586
diff
changeset
|
588 |
> rename to b |
bb7bf43b72fb
patch: fix copies when patching over uncommitted changed (issue2459)
Patrick Mezard <pmezard@gmail.com>
parents:
12586
diff
changeset
|
589 |
> EOF |
bb7bf43b72fb
patch: fix copies when patching over uncommitted changed (issue2459)
Patrick Mezard <pmezard@gmail.com>
parents:
12586
diff
changeset
|
590 |
applying patch from stdin |
bb7bf43b72fb
patch: fix copies when patching over uncommitted changed (issue2459)
Patrick Mezard <pmezard@gmail.com>
parents:
12586
diff
changeset
|
591 |
a has not been committed yet, so no copy data will be stored for b. |
bb7bf43b72fb
patch: fix copies when patching over uncommitted changed (issue2459)
Patrick Mezard <pmezard@gmail.com>
parents:
12586
diff
changeset
|
592 |
$ hg debugstate |
bb7bf43b72fb
patch: fix copies when patching over uncommitted changed (issue2459)
Patrick Mezard <pmezard@gmail.com>
parents:
12586
diff
changeset
|
593 |
a 0 -1 unset b |
bb7bf43b72fb
patch: fix copies when patching over uncommitted changed (issue2459)
Patrick Mezard <pmezard@gmail.com>
parents:
12586
diff
changeset
|
594 |
$ hg ci -m done |
bb7bf43b72fb
patch: fix copies when patching over uncommitted changed (issue2459)
Patrick Mezard <pmezard@gmail.com>
parents:
12586
diff
changeset
|
595 |
$ cd .. |
14385
7709cc983025
patch: git metadata was ignored if strip > 1
Patrick Mezard <pmezard@gmail.com>
parents:
12943
diff
changeset
|
596 |
|
7709cc983025
patch: git metadata was ignored if strip > 1
Patrick Mezard <pmezard@gmail.com>
parents:
12943
diff
changeset
|
597 |
Renames and strip |
7709cc983025
patch: git metadata was ignored if strip > 1
Patrick Mezard <pmezard@gmail.com>
parents:
12943
diff
changeset
|
598 |
|
7709cc983025
patch: git metadata was ignored if strip > 1
Patrick Mezard <pmezard@gmail.com>
parents:
12943
diff
changeset
|
599 |
$ hg init renameandstrip |
7709cc983025
patch: git metadata was ignored if strip > 1
Patrick Mezard <pmezard@gmail.com>
parents:
12943
diff
changeset
|
600 |
$ cd renameandstrip |
7709cc983025
patch: git metadata was ignored if strip > 1
Patrick Mezard <pmezard@gmail.com>
parents:
12943
diff
changeset
|
601 |
$ echo a > a |
7709cc983025
patch: git metadata was ignored if strip > 1
Patrick Mezard <pmezard@gmail.com>
parents:
12943
diff
changeset
|
602 |
$ hg ci -Am adda |
7709cc983025
patch: git metadata was ignored if strip > 1
Patrick Mezard <pmezard@gmail.com>
parents:
12943
diff
changeset
|
603 |
adding a |
7709cc983025
patch: git metadata was ignored if strip > 1
Patrick Mezard <pmezard@gmail.com>
parents:
12943
diff
changeset
|
604 |
$ hg import --no-commit -p2 - <<EOF |
7709cc983025
patch: git metadata was ignored if strip > 1
Patrick Mezard <pmezard@gmail.com>
parents:
12943
diff
changeset
|
605 |
> diff --git a/foo/a b/foo/b |
7709cc983025
patch: git metadata was ignored if strip > 1
Patrick Mezard <pmezard@gmail.com>
parents:
12943
diff
changeset
|
606 |
> rename from foo/a |
7709cc983025
patch: git metadata was ignored if strip > 1
Patrick Mezard <pmezard@gmail.com>
parents:
12943
diff
changeset
|
607 |
> rename to foo/b |
7709cc983025
patch: git metadata was ignored if strip > 1
Patrick Mezard <pmezard@gmail.com>
parents:
12943
diff
changeset
|
608 |
> EOF |
7709cc983025
patch: git metadata was ignored if strip > 1
Patrick Mezard <pmezard@gmail.com>
parents:
12943
diff
changeset
|
609 |
applying patch from stdin |
7709cc983025
patch: git metadata was ignored if strip > 1
Patrick Mezard <pmezard@gmail.com>
parents:
12943
diff
changeset
|
610 |
$ hg st --copies |
7709cc983025
patch: git metadata was ignored if strip > 1
Patrick Mezard <pmezard@gmail.com>
parents:
12943
diff
changeset
|
611 |
A b |
7709cc983025
patch: git metadata was ignored if strip > 1
Patrick Mezard <pmezard@gmail.com>
parents:
12943
diff
changeset
|
612 |
a |
7709cc983025
patch: git metadata was ignored if strip > 1
Patrick Mezard <pmezard@gmail.com>
parents:
12943
diff
changeset
|
613 |
R a |
16112
d7829b2ecf32
import: handle git renames and --similarity (issue3187)
Patrick Mezard <patrick@mezard.eu>
parents:
15441
diff
changeset
|
614 |
|
24259
5ac8ce04baa2
cmdutil.tryimportone: allow importing relative patches into the working dir
Siddharth Agarwal <sid0@fb.com>
parents:
21024
diff
changeset
|
615 |
Prefix with strip, renames, creates etc |
16112
d7829b2ecf32
import: handle git renames and --similarity (issue3187)
Patrick Mezard <patrick@mezard.eu>
parents:
15441
diff
changeset
|
616 |
|
d7829b2ecf32
import: handle git renames and --similarity (issue3187)
Patrick Mezard <patrick@mezard.eu>
parents:
15441
diff
changeset
|
617 |
$ hg revert -aC |
d7829b2ecf32
import: handle git renames and --similarity (issue3187)
Patrick Mezard <patrick@mezard.eu>
parents:
15441
diff
changeset
|
618 |
undeleting a |
d7829b2ecf32
import: handle git renames and --similarity (issue3187)
Patrick Mezard <patrick@mezard.eu>
parents:
15441
diff
changeset
|
619 |
forgetting b |
d7829b2ecf32
import: handle git renames and --similarity (issue3187)
Patrick Mezard <patrick@mezard.eu>
parents:
15441
diff
changeset
|
620 |
$ rm b |
24259
5ac8ce04baa2
cmdutil.tryimportone: allow importing relative patches into the working dir
Siddharth Agarwal <sid0@fb.com>
parents:
21024
diff
changeset
|
621 |
$ mkdir -p dir/dir2 |
5ac8ce04baa2
cmdutil.tryimportone: allow importing relative patches into the working dir
Siddharth Agarwal <sid0@fb.com>
parents:
21024
diff
changeset
|
622 |
$ echo b > dir/dir2/b |
5ac8ce04baa2
cmdutil.tryimportone: allow importing relative patches into the working dir
Siddharth Agarwal <sid0@fb.com>
parents:
21024
diff
changeset
|
623 |
$ echo c > dir/dir2/c |
5ac8ce04baa2
cmdutil.tryimportone: allow importing relative patches into the working dir
Siddharth Agarwal <sid0@fb.com>
parents:
21024
diff
changeset
|
624 |
$ echo d > dir/d |
5ac8ce04baa2
cmdutil.tryimportone: allow importing relative patches into the working dir
Siddharth Agarwal <sid0@fb.com>
parents:
21024
diff
changeset
|
625 |
$ hg ci -Am addbcd |
5ac8ce04baa2
cmdutil.tryimportone: allow importing relative patches into the working dir
Siddharth Agarwal <sid0@fb.com>
parents:
21024
diff
changeset
|
626 |
adding dir/d |
5ac8ce04baa2
cmdutil.tryimportone: allow importing relative patches into the working dir
Siddharth Agarwal <sid0@fb.com>
parents:
21024
diff
changeset
|
627 |
adding dir/dir2/b |
5ac8ce04baa2
cmdutil.tryimportone: allow importing relative patches into the working dir
Siddharth Agarwal <sid0@fb.com>
parents:
21024
diff
changeset
|
628 |
adding dir/dir2/c |
24390
72d7d390ef5d
patch._applydiff: resolve prefix with respect to the cwd
Siddharth Agarwal <sid0@fb.com>
parents:
24385
diff
changeset
|
629 |
|
72d7d390ef5d
patch._applydiff: resolve prefix with respect to the cwd
Siddharth Agarwal <sid0@fb.com>
parents:
24385
diff
changeset
|
630 |
prefix '.' is the same as no prefix |
72d7d390ef5d
patch._applydiff: resolve prefix with respect to the cwd
Siddharth Agarwal <sid0@fb.com>
parents:
24385
diff
changeset
|
631 |
$ hg import --no-commit --prefix . - <<EOF |
72d7d390ef5d
patch._applydiff: resolve prefix with respect to the cwd
Siddharth Agarwal <sid0@fb.com>
parents:
24385
diff
changeset
|
632 |
> diff --git a/dir/a b/dir/a |
72d7d390ef5d
patch._applydiff: resolve prefix with respect to the cwd
Siddharth Agarwal <sid0@fb.com>
parents:
24385
diff
changeset
|
633 |
> --- /dev/null |
72d7d390ef5d
patch._applydiff: resolve prefix with respect to the cwd
Siddharth Agarwal <sid0@fb.com>
parents:
24385
diff
changeset
|
634 |
> +++ b/dir/a |
72d7d390ef5d
patch._applydiff: resolve prefix with respect to the cwd
Siddharth Agarwal <sid0@fb.com>
parents:
24385
diff
changeset
|
635 |
> @@ -0,0 +1 @@ |
72d7d390ef5d
patch._applydiff: resolve prefix with respect to the cwd
Siddharth Agarwal <sid0@fb.com>
parents:
24385
diff
changeset
|
636 |
> +aaaa |
72d7d390ef5d
patch._applydiff: resolve prefix with respect to the cwd
Siddharth Agarwal <sid0@fb.com>
parents:
24385
diff
changeset
|
637 |
> diff --git a/dir/d b/dir/d |
72d7d390ef5d
patch._applydiff: resolve prefix with respect to the cwd
Siddharth Agarwal <sid0@fb.com>
parents:
24385
diff
changeset
|
638 |
> --- a/dir/d |
72d7d390ef5d
patch._applydiff: resolve prefix with respect to the cwd
Siddharth Agarwal <sid0@fb.com>
parents:
24385
diff
changeset
|
639 |
> +++ b/dir/d |
72d7d390ef5d
patch._applydiff: resolve prefix with respect to the cwd
Siddharth Agarwal <sid0@fb.com>
parents:
24385
diff
changeset
|
640 |
> @@ -1,1 +1,2 @@ |
72d7d390ef5d
patch._applydiff: resolve prefix with respect to the cwd
Siddharth Agarwal <sid0@fb.com>
parents:
24385
diff
changeset
|
641 |
> d |
72d7d390ef5d
patch._applydiff: resolve prefix with respect to the cwd
Siddharth Agarwal <sid0@fb.com>
parents:
24385
diff
changeset
|
642 |
> +dddd |
72d7d390ef5d
patch._applydiff: resolve prefix with respect to the cwd
Siddharth Agarwal <sid0@fb.com>
parents:
24385
diff
changeset
|
643 |
> EOF |
72d7d390ef5d
patch._applydiff: resolve prefix with respect to the cwd
Siddharth Agarwal <sid0@fb.com>
parents:
24385
diff
changeset
|
644 |
applying patch from stdin |
72d7d390ef5d
patch._applydiff: resolve prefix with respect to the cwd
Siddharth Agarwal <sid0@fb.com>
parents:
24385
diff
changeset
|
645 |
$ cat dir/a |
72d7d390ef5d
patch._applydiff: resolve prefix with respect to the cwd
Siddharth Agarwal <sid0@fb.com>
parents:
24385
diff
changeset
|
646 |
aaaa |
72d7d390ef5d
patch._applydiff: resolve prefix with respect to the cwd
Siddharth Agarwal <sid0@fb.com>
parents:
24385
diff
changeset
|
647 |
$ cat dir/d |
72d7d390ef5d
patch._applydiff: resolve prefix with respect to the cwd
Siddharth Agarwal <sid0@fb.com>
parents:
24385
diff
changeset
|
648 |
d |
72d7d390ef5d
patch._applydiff: resolve prefix with respect to the cwd
Siddharth Agarwal <sid0@fb.com>
parents:
24385
diff
changeset
|
649 |
dddd |
72d7d390ef5d
patch._applydiff: resolve prefix with respect to the cwd
Siddharth Agarwal <sid0@fb.com>
parents:
24385
diff
changeset
|
650 |
$ hg revert -aC |
35400
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
28886
diff
changeset
|
651 |
forgetting dir/a |
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
28886
diff
changeset
|
652 |
reverting dir/d |
24390
72d7d390ef5d
patch._applydiff: resolve prefix with respect to the cwd
Siddharth Agarwal <sid0@fb.com>
parents:
24385
diff
changeset
|
653 |
$ rm dir/a |
72d7d390ef5d
patch._applydiff: resolve prefix with respect to the cwd
Siddharth Agarwal <sid0@fb.com>
parents:
24385
diff
changeset
|
654 |
|
72d7d390ef5d
patch._applydiff: resolve prefix with respect to the cwd
Siddharth Agarwal <sid0@fb.com>
parents:
24385
diff
changeset
|
655 |
prefix with default strip |
24385
885a573fa619
patch.pathtransform: prepend prefix even if strip is 0
Siddharth Agarwal <sid0@fb.com>
parents:
24259
diff
changeset
|
656 |
$ hg import --no-commit --prefix dir/ - <<EOF |
885a573fa619
patch.pathtransform: prepend prefix even if strip is 0
Siddharth Agarwal <sid0@fb.com>
parents:
24259
diff
changeset
|
657 |
> diff --git a/a b/a |
885a573fa619
patch.pathtransform: prepend prefix even if strip is 0
Siddharth Agarwal <sid0@fb.com>
parents:
24259
diff
changeset
|
658 |
> --- /dev/null |
885a573fa619
patch.pathtransform: prepend prefix even if strip is 0
Siddharth Agarwal <sid0@fb.com>
parents:
24259
diff
changeset
|
659 |
> +++ b/a |
885a573fa619
patch.pathtransform: prepend prefix even if strip is 0
Siddharth Agarwal <sid0@fb.com>
parents:
24259
diff
changeset
|
660 |
> @@ -0,0 +1 @@ |
885a573fa619
patch.pathtransform: prepend prefix even if strip is 0
Siddharth Agarwal <sid0@fb.com>
parents:
24259
diff
changeset
|
661 |
> +aaa |
885a573fa619
patch.pathtransform: prepend prefix even if strip is 0
Siddharth Agarwal <sid0@fb.com>
parents:
24259
diff
changeset
|
662 |
> diff --git a/d b/d |
885a573fa619
patch.pathtransform: prepend prefix even if strip is 0
Siddharth Agarwal <sid0@fb.com>
parents:
24259
diff
changeset
|
663 |
> --- a/d |
885a573fa619
patch.pathtransform: prepend prefix even if strip is 0
Siddharth Agarwal <sid0@fb.com>
parents:
24259
diff
changeset
|
664 |
> +++ b/d |
885a573fa619
patch.pathtransform: prepend prefix even if strip is 0
Siddharth Agarwal <sid0@fb.com>
parents:
24259
diff
changeset
|
665 |
> @@ -1,1 +1,2 @@ |
885a573fa619
patch.pathtransform: prepend prefix even if strip is 0
Siddharth Agarwal <sid0@fb.com>
parents:
24259
diff
changeset
|
666 |
> d |
885a573fa619
patch.pathtransform: prepend prefix even if strip is 0
Siddharth Agarwal <sid0@fb.com>
parents:
24259
diff
changeset
|
667 |
> +dd |
885a573fa619
patch.pathtransform: prepend prefix even if strip is 0
Siddharth Agarwal <sid0@fb.com>
parents:
24259
diff
changeset
|
668 |
> EOF |
885a573fa619
patch.pathtransform: prepend prefix even if strip is 0
Siddharth Agarwal <sid0@fb.com>
parents:
24259
diff
changeset
|
669 |
applying patch from stdin |
885a573fa619
patch.pathtransform: prepend prefix even if strip is 0
Siddharth Agarwal <sid0@fb.com>
parents:
24259
diff
changeset
|
670 |
$ cat dir/a |
885a573fa619
patch.pathtransform: prepend prefix even if strip is 0
Siddharth Agarwal <sid0@fb.com>
parents:
24259
diff
changeset
|
671 |
aaa |
885a573fa619
patch.pathtransform: prepend prefix even if strip is 0
Siddharth Agarwal <sid0@fb.com>
parents:
24259
diff
changeset
|
672 |
$ cat dir/d |
885a573fa619
patch.pathtransform: prepend prefix even if strip is 0
Siddharth Agarwal <sid0@fb.com>
parents:
24259
diff
changeset
|
673 |
d |
885a573fa619
patch.pathtransform: prepend prefix even if strip is 0
Siddharth Agarwal <sid0@fb.com>
parents:
24259
diff
changeset
|
674 |
dd |
885a573fa619
patch.pathtransform: prepend prefix even if strip is 0
Siddharth Agarwal <sid0@fb.com>
parents:
24259
diff
changeset
|
675 |
$ hg revert -aC |
35400
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
28886
diff
changeset
|
676 |
forgetting dir/a |
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
28886
diff
changeset
|
677 |
reverting dir/d |
24385
885a573fa619
patch.pathtransform: prepend prefix even if strip is 0
Siddharth Agarwal <sid0@fb.com>
parents:
24259
diff
changeset
|
678 |
$ rm dir/a |
24390
72d7d390ef5d
patch._applydiff: resolve prefix with respect to the cwd
Siddharth Agarwal <sid0@fb.com>
parents:
24385
diff
changeset
|
679 |
(test that prefixes are relative to the cwd) |
24259
5ac8ce04baa2
cmdutil.tryimportone: allow importing relative patches into the working dir
Siddharth Agarwal <sid0@fb.com>
parents:
21024
diff
changeset
|
680 |
$ mkdir tmpdir |
5ac8ce04baa2
cmdutil.tryimportone: allow importing relative patches into the working dir
Siddharth Agarwal <sid0@fb.com>
parents:
21024
diff
changeset
|
681 |
$ cd tmpdir |
24390
72d7d390ef5d
patch._applydiff: resolve prefix with respect to the cwd
Siddharth Agarwal <sid0@fb.com>
parents:
24385
diff
changeset
|
682 |
$ hg import --no-commit -p2 --prefix ../dir/ - <<EOF |
24259
5ac8ce04baa2
cmdutil.tryimportone: allow importing relative patches into the working dir
Siddharth Agarwal <sid0@fb.com>
parents:
21024
diff
changeset
|
683 |
> diff --git a/foo/a b/foo/a |
5ac8ce04baa2
cmdutil.tryimportone: allow importing relative patches into the working dir
Siddharth Agarwal <sid0@fb.com>
parents:
21024
diff
changeset
|
684 |
> new file mode 100644 |
5ac8ce04baa2
cmdutil.tryimportone: allow importing relative patches into the working dir
Siddharth Agarwal <sid0@fb.com>
parents:
21024
diff
changeset
|
685 |
> --- /dev/null |
5ac8ce04baa2
cmdutil.tryimportone: allow importing relative patches into the working dir
Siddharth Agarwal <sid0@fb.com>
parents:
21024
diff
changeset
|
686 |
> +++ b/foo/a |
5ac8ce04baa2
cmdutil.tryimportone: allow importing relative patches into the working dir
Siddharth Agarwal <sid0@fb.com>
parents:
21024
diff
changeset
|
687 |
> @@ -0,0 +1 @@ |
5ac8ce04baa2
cmdutil.tryimportone: allow importing relative patches into the working dir
Siddharth Agarwal <sid0@fb.com>
parents:
21024
diff
changeset
|
688 |
> +a |
5ac8ce04baa2
cmdutil.tryimportone: allow importing relative patches into the working dir
Siddharth Agarwal <sid0@fb.com>
parents:
21024
diff
changeset
|
689 |
> diff --git a/foo/dir2/b b/foo/dir2/b2 |
5ac8ce04baa2
cmdutil.tryimportone: allow importing relative patches into the working dir
Siddharth Agarwal <sid0@fb.com>
parents:
21024
diff
changeset
|
690 |
> rename from foo/dir2/b |
5ac8ce04baa2
cmdutil.tryimportone: allow importing relative patches into the working dir
Siddharth Agarwal <sid0@fb.com>
parents:
21024
diff
changeset
|
691 |
> rename to foo/dir2/b2 |
5ac8ce04baa2
cmdutil.tryimportone: allow importing relative patches into the working dir
Siddharth Agarwal <sid0@fb.com>
parents:
21024
diff
changeset
|
692 |
> diff --git a/foo/dir2/c b/foo/dir2/c |
5ac8ce04baa2
cmdutil.tryimportone: allow importing relative patches into the working dir
Siddharth Agarwal <sid0@fb.com>
parents:
21024
diff
changeset
|
693 |
> --- a/foo/dir2/c |
5ac8ce04baa2
cmdutil.tryimportone: allow importing relative patches into the working dir
Siddharth Agarwal <sid0@fb.com>
parents:
21024
diff
changeset
|
694 |
> +++ b/foo/dir2/c |
5ac8ce04baa2
cmdutil.tryimportone: allow importing relative patches into the working dir
Siddharth Agarwal <sid0@fb.com>
parents:
21024
diff
changeset
|
695 |
> @@ -0,0 +1 @@ |
5ac8ce04baa2
cmdutil.tryimportone: allow importing relative patches into the working dir
Siddharth Agarwal <sid0@fb.com>
parents:
21024
diff
changeset
|
696 |
> +cc |
5ac8ce04baa2
cmdutil.tryimportone: allow importing relative patches into the working dir
Siddharth Agarwal <sid0@fb.com>
parents:
21024
diff
changeset
|
697 |
> diff --git a/foo/d b/foo/d |
5ac8ce04baa2
cmdutil.tryimportone: allow importing relative patches into the working dir
Siddharth Agarwal <sid0@fb.com>
parents:
21024
diff
changeset
|
698 |
> deleted file mode 100644 |
5ac8ce04baa2
cmdutil.tryimportone: allow importing relative patches into the working dir
Siddharth Agarwal <sid0@fb.com>
parents:
21024
diff
changeset
|
699 |
> --- a/foo/d |
5ac8ce04baa2
cmdutil.tryimportone: allow importing relative patches into the working dir
Siddharth Agarwal <sid0@fb.com>
parents:
21024
diff
changeset
|
700 |
> +++ /dev/null |
5ac8ce04baa2
cmdutil.tryimportone: allow importing relative patches into the working dir
Siddharth Agarwal <sid0@fb.com>
parents:
21024
diff
changeset
|
701 |
> @@ -1,1 +0,0 @@ |
5ac8ce04baa2
cmdutil.tryimportone: allow importing relative patches into the working dir
Siddharth Agarwal <sid0@fb.com>
parents:
21024
diff
changeset
|
702 |
> -d |
5ac8ce04baa2
cmdutil.tryimportone: allow importing relative patches into the working dir
Siddharth Agarwal <sid0@fb.com>
parents:
21024
diff
changeset
|
703 |
> EOF |
5ac8ce04baa2
cmdutil.tryimportone: allow importing relative patches into the working dir
Siddharth Agarwal <sid0@fb.com>
parents:
21024
diff
changeset
|
704 |
applying patch from stdin |
5ac8ce04baa2
cmdutil.tryimportone: allow importing relative patches into the working dir
Siddharth Agarwal <sid0@fb.com>
parents:
21024
diff
changeset
|
705 |
$ hg st --copies |
5ac8ce04baa2
cmdutil.tryimportone: allow importing relative patches into the working dir
Siddharth Agarwal <sid0@fb.com>
parents:
21024
diff
changeset
|
706 |
M dir/dir2/c |
5ac8ce04baa2
cmdutil.tryimportone: allow importing relative patches into the working dir
Siddharth Agarwal <sid0@fb.com>
parents:
21024
diff
changeset
|
707 |
A dir/a |
5ac8ce04baa2
cmdutil.tryimportone: allow importing relative patches into the working dir
Siddharth Agarwal <sid0@fb.com>
parents:
21024
diff
changeset
|
708 |
A dir/dir2/b2 |
5ac8ce04baa2
cmdutil.tryimportone: allow importing relative patches into the working dir
Siddharth Agarwal <sid0@fb.com>
parents:
21024
diff
changeset
|
709 |
dir/dir2/b |
5ac8ce04baa2
cmdutil.tryimportone: allow importing relative patches into the working dir
Siddharth Agarwal <sid0@fb.com>
parents:
21024
diff
changeset
|
710 |
R dir/d |
5ac8ce04baa2
cmdutil.tryimportone: allow importing relative patches into the working dir
Siddharth Agarwal <sid0@fb.com>
parents:
21024
diff
changeset
|
711 |
R dir/dir2/b |
5ac8ce04baa2
cmdutil.tryimportone: allow importing relative patches into the working dir
Siddharth Agarwal <sid0@fb.com>
parents:
21024
diff
changeset
|
712 |
$ cd .. |
5ac8ce04baa2
cmdutil.tryimportone: allow importing relative patches into the working dir
Siddharth Agarwal <sid0@fb.com>
parents:
21024
diff
changeset
|
713 |
|
5ac8ce04baa2
cmdutil.tryimportone: allow importing relative patches into the working dir
Siddharth Agarwal <sid0@fb.com>
parents:
21024
diff
changeset
|
714 |
Renames, similarity and git diff |
5ac8ce04baa2
cmdutil.tryimportone: allow importing relative patches into the working dir
Siddharth Agarwal <sid0@fb.com>
parents:
21024
diff
changeset
|
715 |
|
5ac8ce04baa2
cmdutil.tryimportone: allow importing relative patches into the working dir
Siddharth Agarwal <sid0@fb.com>
parents:
21024
diff
changeset
|
716 |
$ hg revert -aC |
35400
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
28886
diff
changeset
|
717 |
forgetting dir/a |
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
28886
diff
changeset
|
718 |
undeleting dir/d |
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
28886
diff
changeset
|
719 |
undeleting dir/dir2/b |
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
28886
diff
changeset
|
720 |
forgetting dir/dir2/b2 |
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
28886
diff
changeset
|
721 |
reverting dir/dir2/c |
24259
5ac8ce04baa2
cmdutil.tryimportone: allow importing relative patches into the working dir
Siddharth Agarwal <sid0@fb.com>
parents:
21024
diff
changeset
|
722 |
$ rm dir/a dir/dir2/b2 |
16112
d7829b2ecf32
import: handle git renames and --similarity (issue3187)
Patrick Mezard <patrick@mezard.eu>
parents:
15441
diff
changeset
|
723 |
$ hg import --similarity 90 --no-commit - <<EOF |
d7829b2ecf32
import: handle git renames and --similarity (issue3187)
Patrick Mezard <patrick@mezard.eu>
parents:
15441
diff
changeset
|
724 |
> diff --git a/a b/b |
d7829b2ecf32
import: handle git renames and --similarity (issue3187)
Patrick Mezard <patrick@mezard.eu>
parents:
15441
diff
changeset
|
725 |
> rename from a |
d7829b2ecf32
import: handle git renames and --similarity (issue3187)
Patrick Mezard <patrick@mezard.eu>
parents:
15441
diff
changeset
|
726 |
> rename to b |
d7829b2ecf32
import: handle git renames and --similarity (issue3187)
Patrick Mezard <patrick@mezard.eu>
parents:
15441
diff
changeset
|
727 |
> EOF |
d7829b2ecf32
import: handle git renames and --similarity (issue3187)
Patrick Mezard <patrick@mezard.eu>
parents:
15441
diff
changeset
|
728 |
applying patch from stdin |
d7829b2ecf32
import: handle git renames and --similarity (issue3187)
Patrick Mezard <patrick@mezard.eu>
parents:
15441
diff
changeset
|
729 |
$ hg st --copies |
d7829b2ecf32
import: handle git renames and --similarity (issue3187)
Patrick Mezard <patrick@mezard.eu>
parents:
15441
diff
changeset
|
730 |
A b |
d7829b2ecf32
import: handle git renames and --similarity (issue3187)
Patrick Mezard <patrick@mezard.eu>
parents:
15441
diff
changeset
|
731 |
a |
d7829b2ecf32
import: handle git renames and --similarity (issue3187)
Patrick Mezard <patrick@mezard.eu>
parents:
15441
diff
changeset
|
732 |
R a |
14385
7709cc983025
patch: git metadata was ignored if strip > 1
Patrick Mezard <pmezard@gmail.com>
parents:
12943
diff
changeset
|
733 |
$ cd .. |
14431
a6b543e05305
test-git-import: test patching existing copy targets
Patrick Mezard <pmezard@gmail.com>
parents:
14385
diff
changeset
|
734 |
|
a6b543e05305
test-git-import: test patching existing copy targets
Patrick Mezard <pmezard@gmail.com>
parents:
14385
diff
changeset
|
735 |
Pure copy with existing destination |
a6b543e05305
test-git-import: test patching existing copy targets
Patrick Mezard <pmezard@gmail.com>
parents:
14385
diff
changeset
|
736 |
|
a6b543e05305
test-git-import: test patching existing copy targets
Patrick Mezard <pmezard@gmail.com>
parents:
14385
diff
changeset
|
737 |
$ hg init copytoexisting |
a6b543e05305
test-git-import: test patching existing copy targets
Patrick Mezard <pmezard@gmail.com>
parents:
14385
diff
changeset
|
738 |
$ cd copytoexisting |
a6b543e05305
test-git-import: test patching existing copy targets
Patrick Mezard <pmezard@gmail.com>
parents:
14385
diff
changeset
|
739 |
$ echo a > a |
a6b543e05305
test-git-import: test patching existing copy targets
Patrick Mezard <pmezard@gmail.com>
parents:
14385
diff
changeset
|
740 |
$ echo b > b |
a6b543e05305
test-git-import: test patching existing copy targets
Patrick Mezard <pmezard@gmail.com>
parents:
14385
diff
changeset
|
741 |
$ hg ci -Am add |
a6b543e05305
test-git-import: test patching existing copy targets
Patrick Mezard <pmezard@gmail.com>
parents:
14385
diff
changeset
|
742 |
adding a |
a6b543e05305
test-git-import: test patching existing copy targets
Patrick Mezard <pmezard@gmail.com>
parents:
14385
diff
changeset
|
743 |
adding b |
a6b543e05305
test-git-import: test patching existing copy targets
Patrick Mezard <pmezard@gmail.com>
parents:
14385
diff
changeset
|
744 |
$ hg import --no-commit - <<EOF |
a6b543e05305
test-git-import: test patching existing copy targets
Patrick Mezard <pmezard@gmail.com>
parents:
14385
diff
changeset
|
745 |
> diff --git a/a b/b |
a6b543e05305
test-git-import: test patching existing copy targets
Patrick Mezard <pmezard@gmail.com>
parents:
14385
diff
changeset
|
746 |
> copy from a |
a6b543e05305
test-git-import: test patching existing copy targets
Patrick Mezard <pmezard@gmail.com>
parents:
14385
diff
changeset
|
747 |
> copy to b |
a6b543e05305
test-git-import: test patching existing copy targets
Patrick Mezard <pmezard@gmail.com>
parents:
14385
diff
changeset
|
748 |
> EOF |
a6b543e05305
test-git-import: test patching existing copy targets
Patrick Mezard <pmezard@gmail.com>
parents:
14385
diff
changeset
|
749 |
applying patch from stdin |
a6b543e05305
test-git-import: test patching existing copy targets
Patrick Mezard <pmezard@gmail.com>
parents:
14385
diff
changeset
|
750 |
abort: cannot create b: destination already exists |
a6b543e05305
test-git-import: test patching existing copy targets
Patrick Mezard <pmezard@gmail.com>
parents:
14385
diff
changeset
|
751 |
[255] |
a6b543e05305
test-git-import: test patching existing copy targets
Patrick Mezard <pmezard@gmail.com>
parents:
14385
diff
changeset
|
752 |
$ cat b |
a6b543e05305
test-git-import: test patching existing copy targets
Patrick Mezard <pmezard@gmail.com>
parents:
14385
diff
changeset
|
753 |
b |
a6b543e05305
test-git-import: test patching existing copy targets
Patrick Mezard <pmezard@gmail.com>
parents:
14385
diff
changeset
|
754 |
|
a6b543e05305
test-git-import: test patching existing copy targets
Patrick Mezard <pmezard@gmail.com>
parents:
14385
diff
changeset
|
755 |
Copy and changes with existing destination |
a6b543e05305
test-git-import: test patching existing copy targets
Patrick Mezard <pmezard@gmail.com>
parents:
14385
diff
changeset
|
756 |
|
a6b543e05305
test-git-import: test patching existing copy targets
Patrick Mezard <pmezard@gmail.com>
parents:
14385
diff
changeset
|
757 |
$ hg import --no-commit - <<EOF |
a6b543e05305
test-git-import: test patching existing copy targets
Patrick Mezard <pmezard@gmail.com>
parents:
14385
diff
changeset
|
758 |
> diff --git a/a b/b |
a6b543e05305
test-git-import: test patching existing copy targets
Patrick Mezard <pmezard@gmail.com>
parents:
14385
diff
changeset
|
759 |
> copy from a |
a6b543e05305
test-git-import: test patching existing copy targets
Patrick Mezard <pmezard@gmail.com>
parents:
14385
diff
changeset
|
760 |
> copy to b |
a6b543e05305
test-git-import: test patching existing copy targets
Patrick Mezard <pmezard@gmail.com>
parents:
14385
diff
changeset
|
761 |
> --- a/a |
a6b543e05305
test-git-import: test patching existing copy targets
Patrick Mezard <pmezard@gmail.com>
parents:
14385
diff
changeset
|
762 |
> +++ b/b |
a6b543e05305
test-git-import: test patching existing copy targets
Patrick Mezard <pmezard@gmail.com>
parents:
14385
diff
changeset
|
763 |
> @@ -1,1 +1,2 @@ |
a6b543e05305
test-git-import: test patching existing copy targets
Patrick Mezard <pmezard@gmail.com>
parents:
14385
diff
changeset
|
764 |
> a |
a6b543e05305
test-git-import: test patching existing copy targets
Patrick Mezard <pmezard@gmail.com>
parents:
14385
diff
changeset
|
765 |
> +b |
a6b543e05305
test-git-import: test patching existing copy targets
Patrick Mezard <pmezard@gmail.com>
parents:
14385
diff
changeset
|
766 |
> EOF |
a6b543e05305
test-git-import: test patching existing copy targets
Patrick Mezard <pmezard@gmail.com>
parents:
14385
diff
changeset
|
767 |
applying patch from stdin |
14452
ee574cfd0c32
patch: use temporary files to handle intermediate copies
Patrick Mezard <pmezard@gmail.com>
parents:
14431
diff
changeset
|
768 |
cannot create b: destination already exists |
ee574cfd0c32
patch: use temporary files to handle intermediate copies
Patrick Mezard <pmezard@gmail.com>
parents:
14431
diff
changeset
|
769 |
1 out of 1 hunks FAILED -- saving rejects to file b.rej |
ee574cfd0c32
patch: use temporary files to handle intermediate copies
Patrick Mezard <pmezard@gmail.com>
parents:
14431
diff
changeset
|
770 |
abort: patch failed to apply |
14431
a6b543e05305
test-git-import: test patching existing copy targets
Patrick Mezard <pmezard@gmail.com>
parents:
14385
diff
changeset
|
771 |
[255] |
a6b543e05305
test-git-import: test patching existing copy targets
Patrick Mezard <pmezard@gmail.com>
parents:
14385
diff
changeset
|
772 |
$ cat b |
a6b543e05305
test-git-import: test patching existing copy targets
Patrick Mezard <pmezard@gmail.com>
parents:
14385
diff
changeset
|
773 |
b |
14535
e597ef52a7c2
patch: dot not ignore hunk of files marked as 'deleted'
Patrick Mezard <pmezard@gmail.com>
parents:
14452
diff
changeset
|
774 |
|
16910
ad229181ddbe
tests: remove 'hghave symlink' from test-import-git.t
Mads Kiilerich <mads@kiilerich.com>
parents:
16898
diff
changeset
|
775 |
#if symlink |
ad229181ddbe
tests: remove 'hghave symlink' from test-import-git.t
Mads Kiilerich <mads@kiilerich.com>
parents:
16898
diff
changeset
|
776 |
|
14535
e597ef52a7c2
patch: dot not ignore hunk of files marked as 'deleted'
Patrick Mezard <pmezard@gmail.com>
parents:
14452
diff
changeset
|
777 |
$ ln -s b linkb |
e597ef52a7c2
patch: dot not ignore hunk of files marked as 'deleted'
Patrick Mezard <pmezard@gmail.com>
parents:
14452
diff
changeset
|
778 |
$ hg add linkb |
e597ef52a7c2
patch: dot not ignore hunk of files marked as 'deleted'
Patrick Mezard <pmezard@gmail.com>
parents:
14452
diff
changeset
|
779 |
$ hg ci -m addlinkb |
e597ef52a7c2
patch: dot not ignore hunk of files marked as 'deleted'
Patrick Mezard <pmezard@gmail.com>
parents:
14452
diff
changeset
|
780 |
$ hg import --no-commit - <<EOF |
e597ef52a7c2
patch: dot not ignore hunk of files marked as 'deleted'
Patrick Mezard <pmezard@gmail.com>
parents:
14452
diff
changeset
|
781 |
> diff --git a/linkb b/linkb |
e597ef52a7c2
patch: dot not ignore hunk of files marked as 'deleted'
Patrick Mezard <pmezard@gmail.com>
parents:
14452
diff
changeset
|
782 |
> deleted file mode 120000 |
e597ef52a7c2
patch: dot not ignore hunk of files marked as 'deleted'
Patrick Mezard <pmezard@gmail.com>
parents:
14452
diff
changeset
|
783 |
> --- a/linkb |
e597ef52a7c2
patch: dot not ignore hunk of files marked as 'deleted'
Patrick Mezard <pmezard@gmail.com>
parents:
14452
diff
changeset
|
784 |
> +++ /dev/null |
e597ef52a7c2
patch: dot not ignore hunk of files marked as 'deleted'
Patrick Mezard <pmezard@gmail.com>
parents:
14452
diff
changeset
|
785 |
> @@ -1,1 +0,0 @@ |
e597ef52a7c2
patch: dot not ignore hunk of files marked as 'deleted'
Patrick Mezard <pmezard@gmail.com>
parents:
14452
diff
changeset
|
786 |
> -badhunk |
e597ef52a7c2
patch: dot not ignore hunk of files marked as 'deleted'
Patrick Mezard <pmezard@gmail.com>
parents:
14452
diff
changeset
|
787 |
> \ No newline at end of file |
e597ef52a7c2
patch: dot not ignore hunk of files marked as 'deleted'
Patrick Mezard <pmezard@gmail.com>
parents:
14452
diff
changeset
|
788 |
> EOF |
e597ef52a7c2
patch: dot not ignore hunk of files marked as 'deleted'
Patrick Mezard <pmezard@gmail.com>
parents:
14452
diff
changeset
|
789 |
applying patch from stdin |
e597ef52a7c2
patch: dot not ignore hunk of files marked as 'deleted'
Patrick Mezard <pmezard@gmail.com>
parents:
14452
diff
changeset
|
790 |
patching file linkb |
e597ef52a7c2
patch: dot not ignore hunk of files marked as 'deleted'
Patrick Mezard <pmezard@gmail.com>
parents:
14452
diff
changeset
|
791 |
Hunk #1 FAILED at 0 |
e597ef52a7c2
patch: dot not ignore hunk of files marked as 'deleted'
Patrick Mezard <pmezard@gmail.com>
parents:
14452
diff
changeset
|
792 |
1 out of 1 hunks FAILED -- saving rejects to file linkb.rej |
e597ef52a7c2
patch: dot not ignore hunk of files marked as 'deleted'
Patrick Mezard <pmezard@gmail.com>
parents:
14452
diff
changeset
|
793 |
abort: patch failed to apply |
e597ef52a7c2
patch: dot not ignore hunk of files marked as 'deleted'
Patrick Mezard <pmezard@gmail.com>
parents:
14452
diff
changeset
|
794 |
[255] |
e597ef52a7c2
patch: dot not ignore hunk of files marked as 'deleted'
Patrick Mezard <pmezard@gmail.com>
parents:
14452
diff
changeset
|
795 |
$ hg st |
e597ef52a7c2
patch: dot not ignore hunk of files marked as 'deleted'
Patrick Mezard <pmezard@gmail.com>
parents:
14452
diff
changeset
|
796 |
? b.rej |
e597ef52a7c2
patch: dot not ignore hunk of files marked as 'deleted'
Patrick Mezard <pmezard@gmail.com>
parents:
14452
diff
changeset
|
797 |
? linkb.rej |
e597ef52a7c2
patch: dot not ignore hunk of files marked as 'deleted'
Patrick Mezard <pmezard@gmail.com>
parents:
14452
diff
changeset
|
798 |
|
16910
ad229181ddbe
tests: remove 'hghave symlink' from test-import-git.t
Mads Kiilerich <mads@kiilerich.com>
parents:
16898
diff
changeset
|
799 |
#endif |
ad229181ddbe
tests: remove 'hghave symlink' from test-import-git.t
Mads Kiilerich <mads@kiilerich.com>
parents:
16898
diff
changeset
|
800 |
|
16506
fc4e0fecf403
patch: fix patch hunk/metdata synchronization (issue3384)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
801 |
Test corner case involving copies and multiple hunks (issue3384) |
fc4e0fecf403
patch: fix patch hunk/metdata synchronization (issue3384)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
802 |
|
fc4e0fecf403
patch: fix patch hunk/metdata synchronization (issue3384)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
803 |
$ hg revert -qa |
fc4e0fecf403
patch: fix patch hunk/metdata synchronization (issue3384)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
804 |
$ hg import --no-commit - <<EOF |
fc4e0fecf403
patch: fix patch hunk/metdata synchronization (issue3384)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
805 |
> diff --git a/a b/c |
fc4e0fecf403
patch: fix patch hunk/metdata synchronization (issue3384)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
806 |
> copy from a |
fc4e0fecf403
patch: fix patch hunk/metdata synchronization (issue3384)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
807 |
> copy to c |
fc4e0fecf403
patch: fix patch hunk/metdata synchronization (issue3384)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
808 |
> --- a/a |
fc4e0fecf403
patch: fix patch hunk/metdata synchronization (issue3384)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
809 |
> +++ b/c |
fc4e0fecf403
patch: fix patch hunk/metdata synchronization (issue3384)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
810 |
> @@ -1,1 +1,2 @@ |
fc4e0fecf403
patch: fix patch hunk/metdata synchronization (issue3384)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
811 |
> a |
fc4e0fecf403
patch: fix patch hunk/metdata synchronization (issue3384)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
812 |
> +a |
fc4e0fecf403
patch: fix patch hunk/metdata synchronization (issue3384)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
813 |
> @@ -2,1 +2,2 @@ |
fc4e0fecf403
patch: fix patch hunk/metdata synchronization (issue3384)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
814 |
> a |
fc4e0fecf403
patch: fix patch hunk/metdata synchronization (issue3384)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
815 |
> +a |
fc4e0fecf403
patch: fix patch hunk/metdata synchronization (issue3384)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
816 |
> diff --git a/a b/a |
fc4e0fecf403
patch: fix patch hunk/metdata synchronization (issue3384)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
817 |
> --- a/a |
fc4e0fecf403
patch: fix patch hunk/metdata synchronization (issue3384)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
818 |
> +++ b/a |
fc4e0fecf403
patch: fix patch hunk/metdata synchronization (issue3384)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
819 |
> @@ -1,1 +1,2 @@ |
fc4e0fecf403
patch: fix patch hunk/metdata synchronization (issue3384)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
820 |
> a |
fc4e0fecf403
patch: fix patch hunk/metdata synchronization (issue3384)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
821 |
> +b |
fc4e0fecf403
patch: fix patch hunk/metdata synchronization (issue3384)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
822 |
> EOF |
fc4e0fecf403
patch: fix patch hunk/metdata synchronization (issue3384)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
823 |
applying patch from stdin |
fc4e0fecf403
patch: fix patch hunk/metdata synchronization (issue3384)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
824 |
|
28341
8286f551b7ee
patch: when importing from email, RFC2047-decode From/Subject headers
Julien Cristau <julien.cristau@logilab.fr>
parents:
24390
diff
changeset
|
825 |
Test email metadata |
8286f551b7ee
patch: when importing from email, RFC2047-decode From/Subject headers
Julien Cristau <julien.cristau@logilab.fr>
parents:
24390
diff
changeset
|
826 |
|
8286f551b7ee
patch: when importing from email, RFC2047-decode From/Subject headers
Julien Cristau <julien.cristau@logilab.fr>
parents:
24390
diff
changeset
|
827 |
$ hg revert -qa |
8286f551b7ee
patch: when importing from email, RFC2047-decode From/Subject headers
Julien Cristau <julien.cristau@logilab.fr>
parents:
24390
diff
changeset
|
828 |
$ hg --encoding utf-8 import - <<EOF |
8286f551b7ee
patch: when importing from email, RFC2047-decode From/Subject headers
Julien Cristau <julien.cristau@logilab.fr>
parents:
24390
diff
changeset
|
829 |
> From: =?UTF-8?q?Rapha=C3=ABl=20Hertzog?= <hertzog@debian.org> |
8286f551b7ee
patch: when importing from email, RFC2047-decode From/Subject headers
Julien Cristau <julien.cristau@logilab.fr>
parents:
24390
diff
changeset
|
830 |
> Subject: [PATCH] =?UTF-8?q?=C5=A7=E2=82=AC=C3=9F=E1=B9=AA?= |
8286f551b7ee
patch: when importing from email, RFC2047-decode From/Subject headers
Julien Cristau <julien.cristau@logilab.fr>
parents:
24390
diff
changeset
|
831 |
> |
8286f551b7ee
patch: when importing from email, RFC2047-decode From/Subject headers
Julien Cristau <julien.cristau@logilab.fr>
parents:
24390
diff
changeset
|
832 |
> diff --git a/a b/a |
8286f551b7ee
patch: when importing from email, RFC2047-decode From/Subject headers
Julien Cristau <julien.cristau@logilab.fr>
parents:
24390
diff
changeset
|
833 |
> --- a/a |
8286f551b7ee
patch: when importing from email, RFC2047-decode From/Subject headers
Julien Cristau <julien.cristau@logilab.fr>
parents:
24390
diff
changeset
|
834 |
> +++ b/a |
8286f551b7ee
patch: when importing from email, RFC2047-decode From/Subject headers
Julien Cristau <julien.cristau@logilab.fr>
parents:
24390
diff
changeset
|
835 |
> @@ -1,1 +1,2 @@ |
8286f551b7ee
patch: when importing from email, RFC2047-decode From/Subject headers
Julien Cristau <julien.cristau@logilab.fr>
parents:
24390
diff
changeset
|
836 |
> a |
8286f551b7ee
patch: when importing from email, RFC2047-decode From/Subject headers
Julien Cristau <julien.cristau@logilab.fr>
parents:
24390
diff
changeset
|
837 |
> +a |
8286f551b7ee
patch: when importing from email, RFC2047-decode From/Subject headers
Julien Cristau <julien.cristau@logilab.fr>
parents:
24390
diff
changeset
|
838 |
> EOF |
8286f551b7ee
patch: when importing from email, RFC2047-decode From/Subject headers
Julien Cristau <julien.cristau@logilab.fr>
parents:
24390
diff
changeset
|
839 |
applying patch from stdin |
8286f551b7ee
patch: when importing from email, RFC2047-decode From/Subject headers
Julien Cristau <julien.cristau@logilab.fr>
parents:
24390
diff
changeset
|
840 |
$ hg --encoding utf-8 log -r . |
28886
c64926b365b6
test-import: fix output on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
28341
diff
changeset
|
841 |
changeset: *:* (glob) |
28341
8286f551b7ee
patch: when importing from email, RFC2047-decode From/Subject headers
Julien Cristau <julien.cristau@logilab.fr>
parents:
24390
diff
changeset
|
842 |
tag: tip |
8286f551b7ee
patch: when importing from email, RFC2047-decode From/Subject headers
Julien Cristau <julien.cristau@logilab.fr>
parents:
24390
diff
changeset
|
843 |
user: Rapha\xc3\xabl Hertzog <hertzog@debian.org> (esc) |
8286f551b7ee
patch: when importing from email, RFC2047-decode From/Subject headers
Julien Cristau <julien.cristau@logilab.fr>
parents:
24390
diff
changeset
|
844 |
date: * (glob) |
8286f551b7ee
patch: when importing from email, RFC2047-decode From/Subject headers
Julien Cristau <julien.cristau@logilab.fr>
parents:
24390
diff
changeset
|
845 |
summary: \xc5\xa7\xe2\x82\xac\xc3\x9f\xe1\xb9\xaa (esc) |
8286f551b7ee
patch: when importing from email, RFC2047-decode From/Subject headers
Julien Cristau <julien.cristau@logilab.fr>
parents:
24390
diff
changeset
|
846 |
|
8286f551b7ee
patch: when importing from email, RFC2047-decode From/Subject headers
Julien Cristau <julien.cristau@logilab.fr>
parents:
24390
diff
changeset
|
847 |
|
14431
a6b543e05305
test-git-import: test patching existing copy targets
Patrick Mezard <pmezard@gmail.com>
parents:
14385
diff
changeset
|
848 |
$ cd .. |