Show More
@@ -242,9 +242,11 b' class dirstate(object):' | |||
|
242 | 242 | return self._rootdir + f |
|
243 | 243 | |
|
244 | 244 | def flagfunc(self, buildfallback): |
|
245 | if self._checklink and self._checkexec: | |
|
245 | if not (self._checklink and self._checkexec): | |
|
246 | fallback = buildfallback() | |
|
246 | 247 | |
|
247 |
|
|
|
248 | def check_both(x): | |
|
249 | """This platform supports symlinks and exec permissions""" | |
|
248 | 250 |
|
|
249 | 251 |
|
|
250 | 252 |
|
@@ -255,12 +257,8 b' class dirstate(object):' | |||
|
255 | 257 |
|
|
256 | 258 |
|
|
257 | 259 | |
|
258 | return f | |
|
259 | ||
|
260 | fallback = buildfallback() | |
|
261 | if self._checklink: | |
|
262 | ||
|
263 | def f(x): | |
|
260 | def check_link(x): | |
|
261 | """This platform only supports symlinks""" | |
|
264 | 262 |
|
|
265 | 263 |
|
|
266 | 264 |
|
@@ -271,10 +269,8 b' class dirstate(object):' | |||
|
271 | 269 |
|
|
272 | 270 |
|
|
273 | 271 | |
|
274 | return f | |
|
275 | if self._checkexec: | |
|
276 | ||
|
277 | def f(x): | |
|
272 | def check_exec(x): | |
|
273 | """This platform only supports exec permissions""" | |
|
278 | 274 |
|
|
279 | 275 |
|
|
280 | 276 |
|
@@ -285,10 +281,10 b' class dirstate(object):' | |||
|
285 | 281 |
|
|
286 | 282 |
|
|
287 | 283 | |
|
288 | return f | |
|
289 | else: | |
|
290 | ||
|
291 | def f(x): | |
|
284 | def check_fallback(x): | |
|
285 | """This platform supports neither symlinks nor exec permissions, so | |
|
286 | check the fallback in the dirstate if it exists, otherwise figure it | |
|
287 | out the more expensive way from the parents.""" | |
|
292 | 288 |
|
|
293 | 289 |
|
|
294 | 290 |
|
@@ -300,7 +296,14 b' class dirstate(object):' | |||
|
300 | 296 |
|
|
301 | 297 |
|
|
302 | 298 | |
|
303 | return f | |
|
299 | if self._checklink and self._checkexec: | |
|
300 | return check_both | |
|
301 | elif self._checklink: | |
|
302 | return check_link | |
|
303 | elif self._checkexec: | |
|
304 | return check_exec | |
|
305 | else: | |
|
306 | return check_fallback | |
|
304 | 307 | |
|
305 | 308 | @propertycache |
|
306 | 309 | def _cwd(self): |
General Comments 0
You need to be logged in to leave comments.
Login now