##// END OF EJS Templates
merge with stable
Benoit Boissinot -
r10929:c2bf61e4 merge default
parent child Browse files
Show More
@@ -687,7 +687,7 b' class workingctx(changectx):'
687 node, flag = self._repo.manifest.find(mnode, orig)
687 node, flag = self._repo.manifest.find(mnode, orig)
688 ff = self._repo.dirstate.flagfunc(lambda x: flag or None)
688 ff = self._repo.dirstate.flagfunc(lambda x: flag or None)
689 try:
689 try:
690 return ff(orig)
690 return ff(path)
691 except OSError:
691 except OSError:
692 pass
692 pass
693
693
@@ -4,7 +4,7 b' hg init a'
4 cd a
4 cd a
5
5
6 echo % new file
6 echo % new file
7 hg import -mnew - <<EOF
7 hg import -d "1000000 0" -mnew - <<EOF
8 diff --git a/new b/new
8 diff --git a/new b/new
9 new file mode 100644
9 new file mode 100644
10 index 0000000..7898192
10 index 0000000..7898192
@@ -13,25 +13,28 b' index 0000000..7898192'
13 @@ -0,0 +1 @@
13 @@ -0,0 +1 @@
14 +a
14 +a
15 EOF
15 EOF
16 hg tip -q
16
17
17 echo % new empty file
18 echo % new empty file
18 hg import -mempty - <<EOF
19 hg import -d "1000000 0" -mempty - <<EOF
19 diff --git a/empty b/empty
20 diff --git a/empty b/empty
20 new file mode 100644
21 new file mode 100644
21 EOF
22 EOF
23 hg tip -q
22 hg locate empty
24 hg locate empty
23
25
24 echo % chmod +x
26 echo % chmod +x
25 hg import -msetx - <<EOF
27 hg import -d "1000000 0" -msetx - <<EOF
26 diff --git a/new b/new
28 diff --git a/new b/new
27 old mode 100644
29 old mode 100644
28 new mode 100755
30 new mode 100755
29 EOF
31 EOF
32 hg tip -q
30
33
31 test -x new || echo failed
34 test -x new || echo failed
32
35
33 echo % copy
36 echo % copy
34 hg import -mcopy - <<EOF
37 hg import -d "1000000 0" -mcopy - <<EOF
35 diff --git a/new b/copy
38 diff --git a/new b/copy
36 old mode 100755
39 old mode 100755
37 new mode 100644
40 new mode 100644
@@ -43,6 +46,7 b' similarity index 100%'
43 copy from new
46 copy from new
44 copy to copyx
47 copy to copyx
45 EOF
48 EOF
49 hg tip -q
46
50
47 if "$TESTDIR/hghave" -q execbit; then
51 if "$TESTDIR/hghave" -q execbit; then
48 test -f copy -a ! -x copy || echo failed
52 test -f copy -a ! -x copy || echo failed
@@ -54,17 +58,18 b' cat copy'
54 hg cat copy
58 hg cat copy
55
59
56 echo % rename
60 echo % rename
57 hg import -mrename - <<EOF
61 hg import -d "1000000 0" -mrename - <<EOF
58 diff --git a/copy b/rename
62 diff --git a/copy b/rename
59 similarity index 100%
63 similarity index 100%
60 rename from copy
64 rename from copy
61 rename to rename
65 rename to rename
62 EOF
66 EOF
67 hg tip -q
63
68
64 hg locate
69 hg locate
65
70
66 echo % delete
71 echo % delete
67 hg import -mdelete - <<EOF
72 hg import -d "1000000 0" -mdelete - <<EOF
68 diff --git a/copyx b/copyx
73 diff --git a/copyx b/copyx
69 deleted file mode 100755
74 deleted file mode 100755
70 index 7898192..0000000
75 index 7898192..0000000
@@ -73,12 +78,13 b' index 7898192..0000000'
73 @@ -1 +0,0 @@
78 @@ -1 +0,0 @@
74 -a
79 -a
75 EOF
80 EOF
81 hg tip -q
76
82
77 hg locate
83 hg locate
78 test -f copyx && echo failed || true
84 test -f copyx && echo failed || true
79
85
80 echo % regular diff
86 echo % regular diff
81 hg import -mregular - <<EOF
87 hg import -d "1000000 0" -mregular - <<EOF
82 diff --git a/rename b/rename
88 diff --git a/rename b/rename
83 index 7898192..72e1fe3 100644
89 index 7898192..72e1fe3 100644
84 --- a/rename
90 --- a/rename
@@ -90,9 +96,10 b' index 7898192..72e1fe3 100644'
90 +a
96 +a
91 +a
97 +a
92 EOF
98 EOF
99 hg tip -q
93
100
94 echo % copy and modify
101 echo % copy and modify
95 hg import -mcopymod - <<EOF
102 hg import -d "1000000 0" -mcopymod - <<EOF
96 diff --git a/rename b/copy2
103 diff --git a/rename b/copy2
97 similarity index 80%
104 similarity index 80%
98 copy from rename
105 copy from rename
@@ -108,11 +115,12 b' index 72e1fe3..b53c148 100644'
108 a
115 a
109 a
116 a
110 EOF
117 EOF
118 hg tip -q
111
119
112 hg cat copy2
120 hg cat copy2
113
121
114 echo % rename and modify
122 echo % rename and modify
115 hg import -mrenamemod - <<EOF
123 hg import -d "1000000 0" -mrenamemod - <<EOF
116 diff --git a/copy2 b/rename2
124 diff --git a/copy2 b/rename2
117 similarity index 80%
125 similarity index 80%
118 rename from copy2
126 rename from copy2
@@ -128,12 +136,13 b' index b53c148..8f81e29 100644'
128 +c
136 +c
129 a
137 a
130 EOF
138 EOF
139 hg tip -q
131
140
132 hg locate copy2
141 hg locate copy2
133 hg cat rename2
142 hg cat rename2
134
143
135 echo % one file renamed multiple times
144 echo % one file renamed multiple times
136 hg import -mmultirenames - <<EOF
145 hg import -d "1000000 0" -mmultirenames - <<EOF
137 diff --git a/rename2 b/rename3
146 diff --git a/rename2 b/rename3
138 rename from rename2
147 rename from rename2
139 rename to rename3
148 rename to rename3
@@ -141,6 +150,7 b' diff --git a/rename2 b/rename3-2'
141 rename from rename2
150 rename from rename2
142 rename to rename3-2
151 rename to rename3-2
143 EOF
152 EOF
153 hg tip -q
144 hg log -vr. --template '{rev} {files} / {file_copies}\n'
154 hg log -vr. --template '{rev} {files} / {file_copies}\n'
145
155
146 hg locate rename2 rename3 rename3-2
156 hg locate rename2 rename3 rename3-2
@@ -152,7 +162,7 b' echo foo > foo'
152 hg add foo
162 hg add foo
153 hg ci -m 'add foo'
163 hg ci -m 'add foo'
154 echo % binary files and regular patch hunks
164 echo % binary files and regular patch hunks
155 hg import -m binaryregular - <<EOF
165 hg import -d "1000000 0" -m binaryregular - <<EOF
156 diff --git a/binary b/binary
166 diff --git a/binary b/binary
157 new file mode 100644
167 new file mode 100644
158 index 0000000000000000000000000000000000000000..593f4708db84ac8fd0f5cc47c634f38c013fe9e4
168 index 0000000000000000000000000000000000000000..593f4708db84ac8fd0f5cc47c634f38c013fe9e4
@@ -164,11 +174,12 b' diff --git a/foo b/foo2'
164 rename from foo
174 rename from foo
165 rename to foo2
175 rename to foo2
166 EOF
176 EOF
177 hg tip -q
167 cat foo2
178 cat foo2
168 hg manifest --debug | grep binary
179 hg manifest --debug | grep binary
169
180
170 echo % many binary files
181 echo % many binary files
171 hg import -m multibinary - <<EOF
182 hg import -d "1000000 0" -m multibinary - <<EOF
172 diff --git a/mbinary1 b/mbinary1
183 diff --git a/mbinary1 b/mbinary1
173 new file mode 100644
184 new file mode 100644
174 index 0000000000000000000000000000000000000000..593f4708db84ac8fd0f5cc47c634f38c013fe9e4
185 index 0000000000000000000000000000000000000000..593f4708db84ac8fd0f5cc47c634f38c013fe9e4
@@ -184,10 +195,11 b' literal 5'
184 Mc\${NkU|\`?^000jF3jhEB
195 Mc\${NkU|\`?^000jF3jhEB
185
196
186 EOF
197 EOF
198 hg tip -q
187 hg manifest --debug | grep mbinary
199 hg manifest --debug | grep mbinary
188
200
189 echo % filenames with spaces
201 echo % filenames with spaces
190 hg import -m spaces - <<EOF
202 hg import -d "1000000 0" -m spaces - <<EOF
191 diff --git a/foo bar b/foo bar
203 diff --git a/foo bar b/foo bar
192 new file mode 100644
204 new file mode 100644
193 index 0000000..257cc56
205 index 0000000..257cc56
@@ -196,10 +208,11 b' index 0000000..257cc56'
196 @@ -0,0 +1 @@
208 @@ -0,0 +1 @@
197 +foo
209 +foo
198 EOF
210 EOF
211 hg tip -q
199 cat "foo bar"
212 cat "foo bar"
200
213
201 echo % copy then modify the original file
214 echo % copy then modify the original file
202 hg import -m copy-mod-orig - <<EOF
215 hg import -d "1000000 0" -m copy-mod-orig - <<EOF
203 diff --git a/foo2 b/foo2
216 diff --git a/foo2 b/foo2
204 index 257cc56..fe08ec6 100644
217 index 257cc56..fe08ec6 100644
205 --- a/foo2
218 --- a/foo2
@@ -212,5 +225,6 b' similarity index 100%'
212 copy from foo2
225 copy from foo2
213 copy to foo3
226 copy to foo3
214 EOF
227 EOF
228 hg tip -q
215
229
216 cat foo3
230 cat foo3
@@ -1,29 +1,37 b''
1 % new file
1 % new file
2 applying patch from stdin
2 applying patch from stdin
3 0:ae3ee40d2079
3 % new empty file
4 % new empty file
4 applying patch from stdin
5 applying patch from stdin
6 1:ab199dc869b5
5 empty
7 empty
6 % chmod +x
8 % chmod +x
7 applying patch from stdin
9 applying patch from stdin
10 2:3a34410f282e
8 % copy
11 % copy
9 applying patch from stdin
12 applying patch from stdin
13 3:37bacb7ca14d
10 a
14 a
11 a
15 a
12 % rename
16 % rename
13 applying patch from stdin
17 applying patch from stdin
18 4:47b81a94361d
14 copyx
19 copyx
15 empty
20 empty
16 new
21 new
17 rename
22 rename
18 % delete
23 % delete
19 applying patch from stdin
24 applying patch from stdin
25 5:d9b001d98336
20 empty
26 empty
21 new
27 new
22 rename
28 rename
23 % regular diff
29 % regular diff
24 applying patch from stdin
30 applying patch from stdin
31 6:ebe901e7576b
25 % copy and modify
32 % copy and modify
26 applying patch from stdin
33 applying patch from stdin
34 7:18f368958ecd
27 a
35 a
28 a
36 a
29 b
37 b
@@ -31,6 +39,7 b' a'
31 a
39 a
32 % rename and modify
40 % rename and modify
33 applying patch from stdin
41 applying patch from stdin
42 8:c32b0d7e6f44
34 a
43 a
35 a
44 a
36 b
45 b
@@ -38,6 +47,7 b' c'
38 a
47 a
39 % one file renamed multiple times
48 % one file renamed multiple times
40 applying patch from stdin
49 applying patch from stdin
50 9:034a6bf95330
41 9 rename2 rename3 rename3-2 / rename3 (rename2)rename3-2 (rename2)
51 9 rename2 rename3 rename3-2 / rename3 (rename2)rename3-2 (rename2)
42 rename3
52 rename3
43 rename3-2
53 rename3-2
@@ -54,15 +64,19 b' c'
54 a
64 a
55 % binary files and regular patch hunks
65 % binary files and regular patch hunks
56 applying patch from stdin
66 applying patch from stdin
67 11:c39bce63e786
57 foo
68 foo
58 045c85ba38952325e126c70962cc0f9d9077bc67 644 binary
69 045c85ba38952325e126c70962cc0f9d9077bc67 644 binary
59 % many binary files
70 % many binary files
60 applying patch from stdin
71 applying patch from stdin
72 12:30b530085242
61 045c85ba38952325e126c70962cc0f9d9077bc67 644 mbinary1
73 045c85ba38952325e126c70962cc0f9d9077bc67 644 mbinary1
62 a874b471193996e7cb034bb301cac7bdaf3e3f46 644 mbinary2
74 a874b471193996e7cb034bb301cac7bdaf3e3f46 644 mbinary2
63 % filenames with spaces
75 % filenames with spaces
64 applying patch from stdin
76 applying patch from stdin
77 13:04750ef42fb3
65 foo
78 foo
66 % copy then modify the original file
79 % copy then modify the original file
67 applying patch from stdin
80 applying patch from stdin
81 14:c4cd9cdeaa74
68 foo
82 foo
General Comments 0
You need to be logged in to leave comments. Login now