1497 |
1497 |
1498 def status(self, other='.', match=None, listignored=False, |
1498 def status(self, other='.', match=None, listignored=False, |
1499 listclean=False, listunknown=False, listsubrepos=False): |
1499 listclean=False, listunknown=False, listsubrepos=False): |
1500 # yet to be determined: what to do if 'other' is a 'workingctx' or a |
1500 # yet to be determined: what to do if 'other' is a 'workingctx' or a |
1501 # 'memctx'? |
1501 # 'memctx'? |
1502 s = super(workingctx, self).status(other, match, listignored, listclean, |
1502 return super(workingctx, self).status(other, match, listignored, |
1503 listunknown, listsubrepos) |
1503 listclean, listunknown, |
1504 # calling 'super' subtly reveresed the contexts, so we flip the results |
1504 listsubrepos) |
1505 # (s[1] is 'added' and s[2] is 'removed') |
|
1506 s = list(s) |
|
1507 s[1], s[2] = s[2], s[1] |
|
1508 return scmutil.status(*s) |
|
1509 |
1505 |
1510 class committablefilectx(basefilectx): |
1506 class committablefilectx(basefilectx): |
1511 """A committablefilectx provides common functionality for a file context |
1507 """A committablefilectx provides common functionality for a file context |
1512 that wants the ability to commit, e.g. workingfilectx or memfilectx.""" |
1508 that wants the ability to commit, e.g. workingfilectx or memfilectx.""" |
1513 def __init__(self, repo, path, filelog=None, ctx=None): |
1509 def __init__(self, repo, path, filelog=None, ctx=None): |