Show More
@@ -1351,6 +1351,30 class workingctx(committablectx): | |||||
1351 | listunknown) |
|
1351 | listunknown) | |
1352 | return s |
|
1352 | return s | |
1353 |
|
1353 | |||
|
1354 | def _matchstatus(self, other, s, match, listignored, listclean, | |||
|
1355 | listunknown): | |||
|
1356 | """override the match method with a filter for directory patterns | |||
|
1357 | ||||
|
1358 | We use inheritance to customize the match.bad method only in cases of | |||
|
1359 | workingctx since it belongs only to the working directory when | |||
|
1360 | comparing against the parent changeset. | |||
|
1361 | ||||
|
1362 | If we aren't comparing against the working directory's parent, then we | |||
|
1363 | just use the default match object sent to us. | |||
|
1364 | """ | |||
|
1365 | superself = super(workingctx, self) | |||
|
1366 | match = superself._matchstatus(other, s, match, listignored, listclean, | |||
|
1367 | listunknown) | |||
|
1368 | if other != self._repo['.']: | |||
|
1369 | def bad(f, msg): | |||
|
1370 | # 'f' may be a directory pattern from 'match.files()', | |||
|
1371 | # so 'f not in ctx1' is not enough | |||
|
1372 | if f not in other and f not in other.dirs(): | |||
|
1373 | self._repo.ui.warn('%s: %s\n' % | |||
|
1374 | (self._repo.dirstate.pathto(f), msg)) | |||
|
1375 | match.bad = bad | |||
|
1376 | return match | |||
|
1377 | ||||
1354 | def status(self, ignored=False, clean=False, unknown=False, match=None): |
|
1378 | def status(self, ignored=False, clean=False, unknown=False, match=None): | |
1355 | """Explicit status query |
|
1379 | """Explicit status query | |
1356 | Unless this method is used to query the working copy status, the |
|
1380 | Unless this method is used to query the working copy status, the |
General Comments 0
You need to be logged in to leave comments.
Login now