90 |
90 |
91 This internal method provides a way for child objects to override the |
91 This internal method provides a way for child objects to override the |
92 match operator. |
92 match operator. |
93 """ |
93 """ |
94 return match or matchmod.always(self._repo.root, self._repo.getcwd()) |
94 return match or matchmod.always(self._repo.root, self._repo.getcwd()) |
95 |
|
96 def _prestatus(self, other): |
|
97 """provide a hook to allow child objects to preprocess status results |
|
98 |
|
99 For example, this allows other contexts, such as workingctx, to query |
|
100 the dirstate before comparing the manifests. |
|
101 """ |
|
102 pass |
|
103 |
95 |
104 def _poststatus(self, other, s, match, listignored, listclean, listunknown): |
96 def _poststatus(self, other, s, match, listignored, listclean, listunknown): |
105 """provide a hook to allow child objects to postprocess status results |
97 """provide a hook to allow child objects to postprocess status results |
106 |
98 |
107 For example, this allows other contexts, such as workingctx, to filter |
99 For example, this allows other contexts, such as workingctx, to filter |
309 and isinstance(ctx2, changectx)): |
301 and isinstance(ctx2, changectx)): |
310 reversed = True |
302 reversed = True |
311 ctx1, ctx2 = ctx2, ctx1 |
303 ctx1, ctx2 = ctx2, ctx1 |
312 |
304 |
313 match = ctx2._matchstatus(ctx1, match) |
305 match = ctx2._matchstatus(ctx1, match) |
314 ctx2._prestatus(ctx1) |
|
315 r = [[], [], [], [], [], [], []] |
306 r = [[], [], [], [], [], [], []] |
316 r = ctx2._buildstatus(ctx1, r, match, listignored, listclean, |
307 r = ctx2._buildstatus(ctx1, r, match, listignored, listclean, |
317 listunknown) |
308 listunknown) |
318 r = ctx2._poststatus(ctx1, r, match, listignored, listclean, |
309 r = ctx2._poststatus(ctx1, r, match, listignored, listclean, |
319 listunknown) |
310 listunknown) |
1408 for f in removed: |
1399 for f in removed: |
1409 if f in mf: |
1400 if f in mf: |
1410 del mf[f] |
1401 del mf[f] |
1411 return mf |
1402 return mf |
1412 |
1403 |
1413 def _prestatus(self, other): |
|
1414 """override the parent hook with a dirstate query |
|
1415 |
|
1416 We use this _prestatus hook to populate the status with information from |
|
1417 the dirstate. |
|
1418 """ |
|
1419 # doesn't need to call super |
|
1420 pass |
|
1421 |
|
1422 def _poststatus(self, other, s, match, listignored, listclean, listunknown): |
1404 def _poststatus(self, other, s, match, listignored, listclean, listunknown): |
1423 """override the parent hook with a filter for suspect symlinks |
1405 """override the parent hook with a filter for suspect symlinks |
1424 |
1406 |
1425 We use this _poststatus hook to filter out symlinks that might have |
1407 We use this _poststatus hook to filter out symlinks that might have |
1426 accidentally ended up with the entire contents of the file they are |
1408 accidentally ended up with the entire contents of the file they are |