Comments
Patch
@@ -1436,10 +1436,20 @@ class workingctx(committablectx):
self._repo.ui.warn('%s: %s\n' %
(self._repo.dirstate.pathto(f), msg))
match.bad = bad
return match
+ def status(self, other='.', match=None, listignored=False,
+ listclean=False, listunknown=False, listsubrepos=False):
+ # yet to be determined: what to do if 'other' is a 'workingctx' or a
+ # 'memctx'?
+ s = super(workingctx, self).status(other, match, listignored, listclean,
+ listunknown, listsubrepos)
+ # calling 'super' subtly reveresed the contexts, so we flip the results
+ # (s[1] is 'added' and s[2] is 'removed')
+ s[1], s[2] = s[2], s[1]
+ return s
class committablefilectx(basefilectx):
"""A committablefilectx provides common functionality for a file context
that wants the ability to commit, e.g. workingfilectx or memfilectx."""
def __init__(self, repo, path, filelog=None, ctx=None):