##// END OF EJS Templates
merge with stable
Matt Mackall -
r29328:60621cec merge default
parent child Browse files
Show More
@@ -127,3 +127,4 b' 740156eedf2c450aee58b1a90b0e826f47c5da64'
127 f85de28eae32e7d3064b1a1321309071bbaaa069 0 iQIVAwUAVyZQaiBXgaxoKi1yAQJhCQ//WrRZ55k3VI/OgY+I/HvgFHOC0sbhe207Kedxvy00a3AtXM6wa5E95GNX04QxUfTWUf5ZHDfEgj0/mQywNrH1oJG47iPZSs+qXNLqtgAaXtrih6r4/ruUwFCRFxqK9mkhjG61SKicw3Q7uGva950g6ZUE5BsZ7XJWgoDcJzWKR+AH992G6H//Fhi4zFQAmB34++sm80wV6wMxVKA/qhQzetooTR2x9qrHpvCKMzKllleJe48yzPLJjQoaaVgXCDav0eIePFNw0WvVSldOEp/ADDdTGa65qsC1rO2BB1Cu5+frJ/vUoo0PwIgqgD6p2i41hfIKvkp6130TxmRVxUx+ma8gBYEpPIabV0flLU72gq8lMlGBBSnQ+fcZsfs/Ug0xRN0tzkEScmZFiDxRGk0y7IalXzv6irwOyC2fZCajXGJDzkROQXWMgy9eKkwuFhZBmPVYtrATSq3jHLVmJg5vfdeiVzA6NKxAgGm2z8AsRrijKK8WRqFYiH6xcWKG5u+FroPQdKa0nGCkPSTH3tvC6fAHTVm7JeXch5QE/LiS9Y575pM2PeIP+k+Fr1ugK0AEvYJAXa5UIIcdszPyI+TwPTtWaQ83X99qGAdmRWLvSYjqevOVr7F/fhO3XKFXRCcHA3EzVYnG7nWiVACYF3H2UgN4PWjStbx/Qhhdi9xAuks=
127 f85de28eae32e7d3064b1a1321309071bbaaa069 0 iQIVAwUAVyZQaiBXgaxoKi1yAQJhCQ//WrRZ55k3VI/OgY+I/HvgFHOC0sbhe207Kedxvy00a3AtXM6wa5E95GNX04QxUfTWUf5ZHDfEgj0/mQywNrH1oJG47iPZSs+qXNLqtgAaXtrih6r4/ruUwFCRFxqK9mkhjG61SKicw3Q7uGva950g6ZUE5BsZ7XJWgoDcJzWKR+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yo3asQolhHXwasv8+5CQxowjGfyVg7N/kyyjgmJljI+rCi74VfnsEhvG/J4GNr8JLVQmSICfALqQjw7XN8doKthYhwOfIY2vY419613v4oeBQXSsItKC/tfKw9lYvlk4qJKDffJQFyAekgv43ovWqHNkl4LaR6ubtjOsxCnxHfr7OtpX3muM9MLT/obBax5I3EsmiDTQBOjbvI6TcLczs5tVCnTa1opQsPUcEmdA4WpUEiTnLl9lk9le/BIImfYfEP33oVYmubRlKhJYnUiu89ao9L+48FBoqCY88HqbjQI1GO6icfRJN/+NLVeE9wubltbWFETH6e2Q+Ex4+lkul1tQMLPcPt10suMHnEo3/FcOTPt6/DKeMpsYgckHSJq5KzTg632xifyySmb9qkpdGGpY9lRal6FHw3rAhRBqucMgxso4BwC51h04RImtCUQPoA3wpb4BvCHba/thpsUFnHefOvsu3ei4JyHXZK84LPwOj31PcucNFdGDTW6jvKrF1vVUIVS9uMJkJXPu0V4i/oEQSUKifJZivROlpvj1eHy3KeMtjq2kjGyXY2KdzxpT8wX/oYJhCtm1XWMui5f24XBjE6xOcjjm8k4=
129 aaabed77791a75968a12b8c43ad263631a23ee81 0 iQIVAwUAVzpH4CBXgaxoKi1yAQLm5A/9GUYv9CeIepjcdWSBAtNhCBJcqgk2cBcV0XaeQomfxqYWfbW2fze6eE+TrXPKTX1ajycgqquMyo3asQolhHXwasv8+5CQxowjGfyVg7N/kyyjgmJljI+rCi74VfnsEhvG/J4GNr8JLVQmSICfALqQjw7XN8doKthYhwOfIY2vY419613v4oeBQXSsItKC/tfKw9lYvlk4qJKDffJQFyAekgv43ovWqHNkl4LaR6ubtjOsxCnxHfr7OtpX3muM9MLT/obBax5I3EsmiDTQBOjbvI6TcLczs5tVCnTa1opQsPUcEmdA4WpUEiTnLl9lk9le/BIImfYfEP33oVYmubRlKhJYnUiu89ao9L+48FBoqCY88HqbjQI1GO6icfRJN/+NLVeE9wubltbWFETH6e2Q+Ex4+lkul1tQMLPcPt10suMHnEo3/FcOTPt6/DKeMpsYgckHSJq5KzTg632xifyySmb9qkpdGGpY9lRal6FHw3rAhRBqucMgxso4BwC51h04RImtCUQPoA3wpb4BvCHba/thpsUFnHefOvsu3ei4JyHXZK84LPwOj31PcucNFdGDTW6jvKrF1vVUIVS9uMJkJXPu0V4i/oEQSUKifJZivROlpvj1eHy3KeMtjq2kjGyXY2KdzxpT8wX/oYJhCtm1XWMui5f24XBjE6xOcjjm8k4=
130 a9764ab80e11bcf6a37255db7dd079011f767c6c 0 iQIVAwUAV09KHyBXgaxoKi1yAQJBWg/+OywRrqU+zvnL1tHJ95PgatsF7S4ZAHZFR098+oCjUDtKpvnm71o2TKiY4D5cckyD2KNwLWg/qW6V+5+2EYU0Y/ViwPVcngib/ZeJP+Nr44TK3YZMRmfFuUEEzA7sZ2r2Gm8eswv//W79I0hXJeFd/o6FgLnn7AbOjcOn3IhWdGAP6jUHv9zyJigQv6K9wgyvAnK1RQE+2CgMcoyeqao/zs23IPXI6XUHOwfrQ7XrQ83+ciMqN7XNRx+TKsUQoYeUew4AanoDSMPAQ4kIudsP5tOgKeLRPmHX9zg6Y5S1nTpLRNdyAxuNuyZtkQxDYcG5Hft/SIx27tZUo3gywHL2U+9RYD2nvXqaWzT3sYB2sPBOiq7kjHRgvothkXemAFsbq2nKFrN0PRua9WG4l3ny0xYmDFPlJ/s0E9XhmQaqy+uXtVbA2XdLEvE6pQ0YWbHEKMniW26w6LJkx4IV6RX/7Kpq7byw/bW65tu/BzgISKau5FYLY4CqZJH7f8QBg3XWpzB91AR494tdsD+ugM45wrY/6awGQx9CY5SAzGqTyFuSFQxgB2rBurb01seZPf8nqG8V13UYXfX/O3/WMOBMr7U/RVqmAA0ZMYOyEwfVUmHqrFjkxpXX+JdNKRiA1GJp5sdRpCxSeXdQ/Ni6AAGZV2IyRb4G4Y++1vP4yPBalas=
@@ -140,3 +140,4 b' 740156eedf2c450aee58b1a90b0e826f47c5da64'
140 f85de28eae32e7d3064b1a1321309071bbaaa069 3.8
140 f85de28eae32e7d3064b1a1321309071bbaaa069 3.8
141 a56296f55a5e1038ea5016dace2076b693c28a56 3.8.1
141 a56296f55a5e1038ea5016dace2076b693c28a56 3.8.1
142 aaabed77791a75968a12b8c43ad263631a23ee81 3.8.2
142 aaabed77791a75968a12b8c43ad263631a23ee81 3.8.2
143 a9764ab80e11bcf6a37255db7dd079011f767c6c 3.8.3
@@ -148,7 +148,7 b' static int equatelines(struct line *a, i'
148 static int longest_match(struct line *a, struct line *b, struct pos *pos,
148 static int longest_match(struct line *a, struct line *b, struct pos *pos,
149 int a1, int a2, int b1, int b2, int *omi, int *omj)
149 int a1, int a2, int b1, int b2, int *omi, int *omj)
150 {
150 {
151 int mi = a1, mj = b1, mk = 0, mb = 0, i, j, k, half;
151 int mi = a1, mj = b1, mk = 0, i, j, k, half;
152
152
153 /* window our search on large regions to better bound
153 /* window our search on large regions to better bound
154 worst-case performance. by choosing a window at the end, we
154 worst-case performance. by choosing a window at the end, we
@@ -166,10 +166,17 b' static int longest_match(struct line *a,'
166 /* loop through all lines match a[i] in b */
166 /* loop through all lines match a[i] in b */
167 for (; j >= b1; j = b[j].n) {
167 for (; j >= b1; j = b[j].n) {
168 /* does this extend an earlier match? */
168 /* does this extend an earlier match? */
169 if (i > a1 && j > b1 && pos[j - 1].pos == i - 1)
169 for (k = 1; j - k >= b1 && i - k >= a1; k++) {
170 k = pos[j - 1].len + 1;
170 /* reached an earlier match? */
171 else
171 if (pos[j - k].pos == i - k) {
172 k = 1;
172 k += pos[j - k].len;
173 break;
174 }
175 /* previous line mismatch? */
176 if (a[i - k].e != b[j - k].e)
177 break;
178 }
179
173 pos[j].pos = i;
180 pos[j].pos = i;
174 pos[j].len = k;
181 pos[j].len = k;
175
182
@@ -188,18 +195,15 b' static int longest_match(struct line *a,'
188 mj = mj - mk + 1;
195 mj = mj - mk + 1;
189 }
196 }
190
197
191 /* expand match to include neighboring popular lines */
198 /* expand match to include subsequent popular lines */
192 while (mi - mb > a1 && mj - mb > b1 &&
193 a[mi - mb - 1].e == b[mj - mb - 1].e)
194 mb++;
195 while (mi + mk < a2 && mj + mk < b2 &&
199 while (mi + mk < a2 && mj + mk < b2 &&
196 a[mi + mk].e == b[mj + mk].e)
200 a[mi + mk].e == b[mj + mk].e)
197 mk++;
201 mk++;
198
202
199 *omi = mi - mb;
203 *omi = mi;
200 *omj = mj - mb;
204 *omj = mj;
201
205
202 return mk + mb;
206 return mk;
203 }
207 }
204
208
205 static struct hunk *recurse(struct line *a, struct line *b, struct pos *pos,
209 static struct hunk *recurse(struct line *a, struct line *b, struct pos *pos,
@@ -1453,7 +1453,7 b' def handlecheckheads(op, inpart):'
1453 # Trigger a transaction so that we are guaranteed to have the lock now.
1453 # Trigger a transaction so that we are guaranteed to have the lock now.
1454 if op.ui.configbool('experimental', 'bundle2lazylocking'):
1454 if op.ui.configbool('experimental', 'bundle2lazylocking'):
1455 op.gettransaction()
1455 op.gettransaction()
1456 if heads != op.repo.heads():
1456 if sorted(heads) != sorted(op.repo.heads()):
1457 raise error.PushRaced('repository changed while pushing - '
1457 raise error.PushRaced('repository changed while pushing - '
1458 'please try again')
1458 'please try again')
1459
1459
@@ -861,7 +861,7 b' static PyMethodDef lazymanifest_methods['
861 {"iterkeys", (PyCFunction)lazymanifest_getkeysiter, METH_NOARGS,
861 {"iterkeys", (PyCFunction)lazymanifest_getkeysiter, METH_NOARGS,
862 "Iterate over file names in this lazymanifest."},
862 "Iterate over file names in this lazymanifest."},
863 {"iterentries", (PyCFunction)lazymanifest_getentriesiter, METH_NOARGS,
863 {"iterentries", (PyCFunction)lazymanifest_getentriesiter, METH_NOARGS,
864 "Iterate over (path, nodeid, flags) typles in this lazymanifest."},
864 "Iterate over (path, nodeid, flags) tuples in this lazymanifest."},
865 {"copy", (PyCFunction)lazymanifest_copy, METH_NOARGS,
865 {"copy", (PyCFunction)lazymanifest_copy, METH_NOARGS,
866 "Make a copy of this lazymanifest."},
866 "Make a copy of this lazymanifest."},
867 {"filtercopy", (PyCFunction)lazymanifest_filtercopy, METH_O,
867 {"filtercopy", (PyCFunction)lazymanifest_filtercopy, METH_O,
@@ -88,7 +88,7 b" We currently can't detect an rbc cache w"
88 $ damage "log -qr branch(b2)" rbc-names-v1
88 $ damage "log -qr branch(b2)" rbc-names-v1
89 --- before * (glob)
89 --- before * (glob)
90 +++ after * (glob)
90 +++ after * (glob)
91 @@ -1,8 +0,0 @@
91 @@ -1,8 +?,0 @@ (glob)
92 -2:5fb7d38b9dc4
92 -2:5fb7d38b9dc4
93 -3:60b597ffdafa
93 -3:60b597ffdafa
94 -4:b1174d11b69e
94 -4:b1174d11b69e
@@ -1135,7 +1135,7 b' make sure we show changed files, rather '
1135 test for Git CVE-2016-3068
1135 test for Git CVE-2016-3068
1136 $ hg init malicious-subrepository
1136 $ hg init malicious-subrepository
1137 $ cd malicious-subrepository
1137 $ cd malicious-subrepository
1138 $ echo "s = [git]ext::sh -c echo% pwned% >&2" > .hgsub
1138 $ echo "s = [git]ext::sh -c echo% pwned:% \$PWNED_MSG% >pwned.txt" > .hgsub
1139 $ git init s
1139 $ git init s
1140 Initialized empty Git repository in $TESTTMP/tc/malicious-subrepository/s/.git/
1140 Initialized empty Git repository in $TESTTMP/tc/malicious-subrepository/s/.git/
1141 $ cd s
1141 $ cd s
@@ -1145,24 +1145,31 b' test for Git CVE-2016-3068'
1145 $ hg add .hgsub
1145 $ hg add .hgsub
1146 $ hg commit -m "add subrepo"
1146 $ hg commit -m "add subrepo"
1147 $ cd ..
1147 $ cd ..
1148 $ rm -f pwned.txt
1148 $ unset GIT_ALLOW_PROTOCOL
1149 $ unset GIT_ALLOW_PROTOCOL
1149 $ hg clone malicious-subrepository malicious-subrepository-protected
1150 $ PWNED_MSG="your git is too old or mercurial has regressed" hg clone \
1151 > malicious-subrepository malicious-subrepository-protected
1150 Cloning into '$TESTTMP/tc/malicious-subrepository-protected/s'... (glob)
1152 Cloning into '$TESTTMP/tc/malicious-subrepository-protected/s'... (glob)
1151 fatal: transport 'ext' not allowed
1153 fatal: transport 'ext' not allowed
1152 updating to branch default
1154 updating to branch default
1153 cloning subrepo s from ext::sh -c echo% pwned% >&2
1155 cloning subrepo s from ext::sh -c echo% pwned:% $PWNED_MSG% >pwned.txt
1154 abort: git clone error 128 in s (in subrepo s)
1156 abort: git clone error 128 in s (in subrepo s)
1155 [255]
1157 [255]
1158 $ f -Dq pwned.txt
1159 pwned.txt: file not found
1156
1160
1157 whitelisting of ext should be respected (that's the git submodule behaviour)
1161 whitelisting of ext should be respected (that's the git submodule behaviour)
1158 $ env GIT_ALLOW_PROTOCOL=ext hg clone malicious-subrepository malicious-subrepository-clone-allowed
1162 $ rm -f pwned.txt
1163 $ env GIT_ALLOW_PROTOCOL=ext PWNED_MSG="you asked for it" hg clone \
1164 > malicious-subrepository malicious-subrepository-clone-allowed
1159 Cloning into '$TESTTMP/tc/malicious-subrepository-clone-allowed/s'... (glob)
1165 Cloning into '$TESTTMP/tc/malicious-subrepository-clone-allowed/s'... (glob)
1160 pwned
1161 fatal: Could not read from remote repository.
1166 fatal: Could not read from remote repository.
1162
1167
1163 Please make sure you have the correct access rights
1168 Please make sure you have the correct access rights
1164 and the repository exists.
1169 and the repository exists.
1165 updating to branch default
1170 updating to branch default
1166 cloning subrepo s from ext::sh -c echo% pwned% >&2
1171 cloning subrepo s from ext::sh -c echo% pwned:% $PWNED_MSG% >pwned.txt
1167 abort: git clone error 128 in s (in subrepo s)
1172 abort: git clone error 128 in s (in subrepo s)
1168 [255]
1173 [255]
1174 $ f -Dq pwned.txt
1175 pwned: you asked for it
General Comments 0
You need to be logged in to leave comments. Login now