author | Nicolas Dumazet <nicdumz.commits@gmail.com> |
Mon, 16 Aug 2010 10:58:03 +0900 | |
changeset 11907 | 863567a1364f |
parent 10928 | 377d879e9d1b |
child 12574 | 77600d697d0e |
permissions | -rwxr-xr-x |
2864 | 1 |
#!/bin/sh |
2 |
||
3 |
hg init a |
|
4 |
cd a |
|
5 |
||
6 |
echo % new file |
|
10928
377d879e9d1b
test-git-import: better testing, check nodeids
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
10061
diff
changeset
|
7 |
hg import -d "1000000 0" -mnew - <<EOF |
2864 | 8 |
diff --git a/new b/new |
9 |
new file mode 100644 |
|
10 |
index 0000000..7898192 |
|
11 |
--- /dev/null |
|
12 |
+++ b/new |
|
13 |
@@ -0,0 +1 @@ |
|
14 |
+a |
|
15 |
EOF |
|
10928
377d879e9d1b
test-git-import: better testing, check nodeids
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
10061
diff
changeset
|
16 |
hg tip -q |
2864 | 17 |
|
3589
1c9b6f1237e0
test for git empty new files
Brendan Cully <brendan@kublai.com>
parents:
2864
diff
changeset
|
18 |
echo % new empty file |
10928
377d879e9d1b
test-git-import: better testing, check nodeids
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
10061
diff
changeset
|
19 |
hg import -d "1000000 0" -mempty - <<EOF |
3589
1c9b6f1237e0
test for git empty new files
Brendan Cully <brendan@kublai.com>
parents:
2864
diff
changeset
|
20 |
diff --git a/empty b/empty |
1c9b6f1237e0
test for git empty new files
Brendan Cully <brendan@kublai.com>
parents:
2864
diff
changeset
|
21 |
new file mode 100644 |
1c9b6f1237e0
test for git empty new files
Brendan Cully <brendan@kublai.com>
parents:
2864
diff
changeset
|
22 |
EOF |
10928
377d879e9d1b
test-git-import: better testing, check nodeids
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
10061
diff
changeset
|
23 |
hg tip -q |
3589
1c9b6f1237e0
test for git empty new files
Brendan Cully <brendan@kublai.com>
parents:
2864
diff
changeset
|
24 |
hg locate empty |
1c9b6f1237e0
test for git empty new files
Brendan Cully <brendan@kublai.com>
parents:
2864
diff
changeset
|
25 |
|
2864 | 26 |
echo % chmod +x |
10928
377d879e9d1b
test-git-import: better testing, check nodeids
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
10061
diff
changeset
|
27 |
hg import -d "1000000 0" -msetx - <<EOF |
2864 | 28 |
diff --git a/new b/new |
29 |
old mode 100644 |
|
30 |
new mode 100755 |
|
31 |
EOF |
|
10928
377d879e9d1b
test-git-import: better testing, check nodeids
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
10061
diff
changeset
|
32 |
hg tip -q |
2864 | 33 |
|
34 |
test -x new || echo failed |
|
35 |
||
36 |
echo % copy |
|
10928
377d879e9d1b
test-git-import: better testing, check nodeids
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
10061
diff
changeset
|
37 |
hg import -d "1000000 0" -mcopy - <<EOF |
2864 | 38 |
diff --git a/new b/copy |
39 |
old mode 100755 |
|
40 |
new mode 100644 |
|
41 |
similarity index 100% |
|
42 |
copy from new |
|
43 |
copy to copy |
|
44 |
diff --git a/new b/copyx |
|
45 |
similarity index 100% |
|
46 |
copy from new |
|
47 |
copy to copyx |
|
48 |
EOF |
|
10928
377d879e9d1b
test-git-import: better testing, check nodeids
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
10061
diff
changeset
|
49 |
hg tip -q |
2864 | 50 |
|
5073
4cd52978e188
test-git-import: fake executable permissions.
Patrick Mezard <pmezard@gmail.com>
parents:
4679
diff
changeset
|
51 |
if "$TESTDIR/hghave" -q execbit; then |
4cd52978e188
test-git-import: fake executable permissions.
Patrick Mezard <pmezard@gmail.com>
parents:
4679
diff
changeset
|
52 |
test -f copy -a ! -x copy || echo failed |
4cd52978e188
test-git-import: fake executable permissions.
Patrick Mezard <pmezard@gmail.com>
parents:
4679
diff
changeset
|
53 |
test -x copyx || echo failed |
4cd52978e188
test-git-import: fake executable permissions.
Patrick Mezard <pmezard@gmail.com>
parents:
4679
diff
changeset
|
54 |
else |
4cd52978e188
test-git-import: fake executable permissions.
Patrick Mezard <pmezard@gmail.com>
parents:
4679
diff
changeset
|
55 |
test -f copy || echo failed |
4cd52978e188
test-git-import: fake executable permissions.
Patrick Mezard <pmezard@gmail.com>
parents:
4679
diff
changeset
|
56 |
fi |
2864 | 57 |
cat copy |
58 |
hg cat copy |
|
59 |
||
60 |
echo % rename |
|
10928
377d879e9d1b
test-git-import: better testing, check nodeids
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
10061
diff
changeset
|
61 |
hg import -d "1000000 0" -mrename - <<EOF |
2864 | 62 |
diff --git a/copy b/rename |
63 |
similarity index 100% |
|
64 |
rename from copy |
|
65 |
rename to rename |
|
66 |
EOF |
|
10928
377d879e9d1b
test-git-import: better testing, check nodeids
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
10061
diff
changeset
|
67 |
hg tip -q |
2864 | 68 |
|
69 |
hg locate |
|
70 |
||
71 |
echo % delete |
|
10928
377d879e9d1b
test-git-import: better testing, check nodeids
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
10061
diff
changeset
|
72 |
hg import -d "1000000 0" -mdelete - <<EOF |
2864 | 73 |
diff --git a/copyx b/copyx |
74 |
deleted file mode 100755 |
|
75 |
index 7898192..0000000 |
|
76 |
--- a/copyx |
|
77 |
+++ /dev/null |
|
78 |
@@ -1 +0,0 @@ |
|
79 |
-a |
|
80 |
EOF |
|
10928
377d879e9d1b
test-git-import: better testing, check nodeids
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
10061
diff
changeset
|
81 |
hg tip -q |
2864 | 82 |
|
83 |
hg locate |
|
84 |
test -f copyx && echo failed || true |
|
85 |
||
86 |
echo % regular diff |
|
10928
377d879e9d1b
test-git-import: better testing, check nodeids
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
10061
diff
changeset
|
87 |
hg import -d "1000000 0" -mregular - <<EOF |
2864 | 88 |
diff --git a/rename b/rename |
89 |
index 7898192..72e1fe3 100644 |
|
90 |
--- a/rename |
|
91 |
+++ b/rename |
|
92 |
@@ -1 +1,5 @@ |
|
93 |
a |
|
94 |
+a |
|
95 |
+a |
|
96 |
+a |
|
97 |
+a |
|
98 |
EOF |
|
10928
377d879e9d1b
test-git-import: better testing, check nodeids
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
10061
diff
changeset
|
99 |
hg tip -q |
2864 | 100 |
|
101 |
echo % copy and modify |
|
10928
377d879e9d1b
test-git-import: better testing, check nodeids
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
10061
diff
changeset
|
102 |
hg import -d "1000000 0" -mcopymod - <<EOF |
2864 | 103 |
diff --git a/rename b/copy2 |
104 |
similarity index 80% |
|
105 |
copy from rename |
|
106 |
copy to copy2 |
|
107 |
index 72e1fe3..b53c148 100644 |
|
108 |
--- a/rename |
|
109 |
+++ b/copy2 |
|
110 |
@@ -1,5 +1,5 @@ |
|
111 |
a |
|
112 |
a |
|
113 |
-a |
|
114 |
+b |
|
115 |
a |
|
116 |
a |
|
117 |
EOF |
|
10928
377d879e9d1b
test-git-import: better testing, check nodeids
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
10061
diff
changeset
|
118 |
hg tip -q |
2864 | 119 |
|
120 |
hg cat copy2 |
|
121 |
||
122 |
echo % rename and modify |
|
10928
377d879e9d1b
test-git-import: better testing, check nodeids
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
10061
diff
changeset
|
123 |
hg import -d "1000000 0" -mrenamemod - <<EOF |
2864 | 124 |
diff --git a/copy2 b/rename2 |
125 |
similarity index 80% |
|
126 |
rename from copy2 |
|
127 |
rename to rename2 |
|
128 |
index b53c148..8f81e29 100644 |
|
129 |
--- a/copy2 |
|
130 |
+++ b/rename2 |
|
131 |
@@ -1,5 +1,5 @@ |
|
132 |
a |
|
133 |
a |
|
134 |
b |
|
135 |
-a |
|
136 |
+c |
|
137 |
a |
|
138 |
EOF |
|
10928
377d879e9d1b
test-git-import: better testing, check nodeids
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
10061
diff
changeset
|
139 |
hg tip -q |
2864 | 140 |
|
141 |
hg locate copy2 |
|
142 |
hg cat rename2 |
|
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
|
143 |
|
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
|
144 |
echo % one file renamed multiple times |
10928
377d879e9d1b
test-git-import: better testing, check nodeids
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
10061
diff
changeset
|
145 |
hg import -d "1000000 0" -mmultirenames - <<EOF |
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
|
146 |
diff --git a/rename2 b/rename3 |
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
|
147 |
rename from rename2 |
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
|
148 |
rename to rename3 |
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
|
149 |
diff --git a/rename2 b/rename3-2 |
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
|
150 |
rename from rename2 |
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
|
151 |
rename to rename3-2 |
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
|
152 |
EOF |
10928
377d879e9d1b
test-git-import: better testing, check nodeids
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
10061
diff
changeset
|
153 |
hg tip -q |
10061
9e2ab10728a2
Make {file_copies} usable as a --template key
Patrick Mezard <pmezard@gmail.com>
parents:
10060
diff
changeset
|
154 |
hg log -vr. --template '{rev} {files} / {file_copies}\n' |
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
|
155 |
|
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
|
156 |
hg locate rename2 rename3 rename3-2 |
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
|
157 |
hg cat rename3 |
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
|
158 |
echo |
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
|
159 |
hg cat rename3-2 |
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
|
160 |
|
ab5600428b08
handle files with both git binary patches and copy/rename ops
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3701
diff
changeset
|
161 |
echo foo > foo |
ab5600428b08
handle files with both git binary patches and copy/rename ops
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3701
diff
changeset
|
162 |
hg add foo |
ab5600428b08
handle files with both git binary patches and copy/rename ops
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3701
diff
changeset
|
163 |
hg ci -m 'add foo' |
ab5600428b08
handle files with both git binary patches and copy/rename ops
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3701
diff
changeset
|
164 |
echo % binary files and regular patch hunks |
10928
377d879e9d1b
test-git-import: better testing, check nodeids
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
10061
diff
changeset
|
165 |
hg import -d "1000000 0" -m binaryregular - <<EOF |
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
|
166 |
diff --git a/binary b/binary |
ab5600428b08
handle files with both git binary patches and copy/rename ops
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3701
diff
changeset
|
167 |
new file mode 100644 |
ab5600428b08
handle files with both git binary patches and copy/rename ops
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3701
diff
changeset
|
168 |
index 0000000000000000000000000000000000000000..593f4708db84ac8fd0f5cc47c634f38c013fe9e4 |
ab5600428b08
handle files with both git binary patches and copy/rename ops
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3701
diff
changeset
|
169 |
GIT binary patch |
ab5600428b08
handle files with both git binary patches and copy/rename ops
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3701
diff
changeset
|
170 |
literal 4 |
ab5600428b08
handle files with both git binary patches and copy/rename ops
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3701
diff
changeset
|
171 |
Lc\${NkU|;|M00aO5 |
ab5600428b08
handle files with both git binary patches and copy/rename ops
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3701
diff
changeset
|
172 |
|
ab5600428b08
handle files with both git binary patches and copy/rename ops
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3701
diff
changeset
|
173 |
diff --git a/foo b/foo2 |
ab5600428b08
handle files with both git binary patches and copy/rename ops
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3701
diff
changeset
|
174 |
rename from foo |
ab5600428b08
handle files with both git binary patches and copy/rename ops
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3701
diff
changeset
|
175 |
rename to foo2 |
ab5600428b08
handle files with both git binary patches and copy/rename ops
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3701
diff
changeset
|
176 |
EOF |
10928
377d879e9d1b
test-git-import: better testing, check nodeids
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
10061
diff
changeset
|
177 |
hg tip -q |
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
|
178 |
cat foo2 |
3736 | 179 |
hg manifest --debug | grep binary |
3717
9e248cfd8b94
handle files with more than one git binary patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3716
diff
changeset
|
180 |
|
9e248cfd8b94
handle files with more than one git binary patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3716
diff
changeset
|
181 |
echo % many binary files |
10928
377d879e9d1b
test-git-import: better testing, check nodeids
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
10061
diff
changeset
|
182 |
hg import -d "1000000 0" -m multibinary - <<EOF |
3717
9e248cfd8b94
handle files with more than one git binary patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3716
diff
changeset
|
183 |
diff --git a/mbinary1 b/mbinary1 |
9e248cfd8b94
handle files with more than one git binary patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3716
diff
changeset
|
184 |
new file mode 100644 |
9e248cfd8b94
handle files with more than one git binary patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3716
diff
changeset
|
185 |
index 0000000000000000000000000000000000000000..593f4708db84ac8fd0f5cc47c634f38c013fe9e4 |
9e248cfd8b94
handle files with more than one git binary patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3716
diff
changeset
|
186 |
GIT binary patch |
9e248cfd8b94
handle files with more than one git binary patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3716
diff
changeset
|
187 |
literal 4 |
9e248cfd8b94
handle files with more than one git binary patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3716
diff
changeset
|
188 |
Lc\${NkU|;|M00aO5 |
9e248cfd8b94
handle files with more than one git binary patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3716
diff
changeset
|
189 |
|
9e248cfd8b94
handle files with more than one git binary patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3716
diff
changeset
|
190 |
diff --git a/mbinary2 b/mbinary2 |
9e248cfd8b94
handle files with more than one git binary patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3716
diff
changeset
|
191 |
new file mode 100644 |
9e248cfd8b94
handle files with more than one git binary patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3716
diff
changeset
|
192 |
index 0000000000000000000000000000000000000000..112363ac1917b417ffbd7f376ca786a1e5fa7490 |
9e248cfd8b94
handle files with more than one git binary patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3716
diff
changeset
|
193 |
GIT binary patch |
9e248cfd8b94
handle files with more than one git binary patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3716
diff
changeset
|
194 |
literal 5 |
9e248cfd8b94
handle files with more than one git binary patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3716
diff
changeset
|
195 |
Mc\${NkU|\`?^000jF3jhEB |
9e248cfd8b94
handle files with more than one git binary patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3716
diff
changeset
|
196 |
|
9e248cfd8b94
handle files with more than one git binary patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3716
diff
changeset
|
197 |
EOF |
10928
377d879e9d1b
test-git-import: better testing, check nodeids
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
10061
diff
changeset
|
198 |
hg tip -q |
3736 | 199 |
hg manifest --debug | grep mbinary |
4679
826659bd8053
git patches: correct handling of filenames with spaces
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3736
diff
changeset
|
200 |
|
826659bd8053
git patches: correct handling of filenames with spaces
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3736
diff
changeset
|
201 |
echo % filenames with spaces |
10928
377d879e9d1b
test-git-import: better testing, check nodeids
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
10061
diff
changeset
|
202 |
hg import -d "1000000 0" -m spaces - <<EOF |
4679
826659bd8053
git patches: correct handling of filenames with spaces
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3736
diff
changeset
|
203 |
diff --git a/foo bar b/foo bar |
826659bd8053
git patches: correct handling of filenames with spaces
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3736
diff
changeset
|
204 |
new file mode 100644 |
826659bd8053
git patches: correct handling of filenames with spaces
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3736
diff
changeset
|
205 |
index 0000000..257cc56 |
826659bd8053
git patches: correct handling of filenames with spaces
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3736
diff
changeset
|
206 |
--- /dev/null |
826659bd8053
git patches: correct handling of filenames with spaces
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3736
diff
changeset
|
207 |
+++ b/foo bar |
826659bd8053
git patches: correct handling of filenames with spaces
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3736
diff
changeset
|
208 |
@@ -0,0 +1 @@ |
826659bd8053
git patches: correct handling of filenames with spaces
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3736
diff
changeset
|
209 |
+foo |
826659bd8053
git patches: correct handling of filenames with spaces
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3736
diff
changeset
|
210 |
EOF |
10928
377d879e9d1b
test-git-import: better testing, check nodeids
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
10061
diff
changeset
|
211 |
hg tip -q |
4679
826659bd8053
git patches: correct handling of filenames with spaces
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3736
diff
changeset
|
212 |
cat "foo bar" |
826659bd8053
git patches: correct handling of filenames with spaces
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3736
diff
changeset
|
213 |
|
5403
477136fa6571
Always copy the necessary files before applying a git patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5073
diff
changeset
|
214 |
echo % copy then modify the original file |
10928
377d879e9d1b
test-git-import: better testing, check nodeids
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
10061
diff
changeset
|
215 |
hg import -d "1000000 0" -m copy-mod-orig - <<EOF |
5403
477136fa6571
Always copy the necessary files before applying a git patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5073
diff
changeset
|
216 |
diff --git a/foo2 b/foo2 |
477136fa6571
Always copy the necessary files before applying a git patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5073
diff
changeset
|
217 |
index 257cc56..fe08ec6 100644 |
477136fa6571
Always copy the necessary files before applying a git patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5073
diff
changeset
|
218 |
--- a/foo2 |
477136fa6571
Always copy the necessary files before applying a git patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5073
diff
changeset
|
219 |
+++ b/foo2 |
477136fa6571
Always copy the necessary files before applying a git patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5073
diff
changeset
|
220 |
@@ -1 +1,2 @@ |
477136fa6571
Always copy the necessary files before applying a git patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5073
diff
changeset
|
221 |
foo |
477136fa6571
Always copy the necessary files before applying a git patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5073
diff
changeset
|
222 |
+new line |
477136fa6571
Always copy the necessary files before applying a git patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5073
diff
changeset
|
223 |
diff --git a/foo2 b/foo3 |
477136fa6571
Always copy the necessary files before applying a git patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5073
diff
changeset
|
224 |
similarity index 100% |
477136fa6571
Always copy the necessary files before applying a git patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5073
diff
changeset
|
225 |
copy from foo2 |
477136fa6571
Always copy the necessary files before applying a git patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5073
diff
changeset
|
226 |
copy to foo3 |
477136fa6571
Always copy the necessary files before applying a git patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5073
diff
changeset
|
227 |
EOF |
10928
377d879e9d1b
test-git-import: better testing, check nodeids
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
10061
diff
changeset
|
228 |
hg tip -q |
5403
477136fa6571
Always copy the necessary files before applying a git patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5073
diff
changeset
|
229 |
|
477136fa6571
Always copy the necessary files before applying a git patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5073
diff
changeset
|
230 |
cat foo3 |