Mercurial > public > mercurial-scm > hg-stable
diff mercurial/context.py @ 23080:c586cb50872b stable
context.status: remove incorrect swapping of added/removed in workingctx
The comment in workingctx.status() says that "calling 'super' subtly
reveresed the contexts", but that is simply not true, so we should not
be swapping added and removed fields.
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Fri, 24 Oct 2014 15:52:20 -0500 |
parents | c1aede895072 |
children | e9165c18f8df |
line wrap: on
line diff
--- a/mercurial/context.py Thu Oct 23 13:17:37 2014 -0700 +++ b/mercurial/context.py Fri Oct 24 15:52:20 2014 -0500 @@ -1499,13 +1499,9 @@ 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 = list(s) - s[1], s[2] = s[2], s[1] - return scmutil.status(*s) + return super(workingctx, self).status(other, match, listignored, + listclean, listunknown, + listsubrepos) class committablefilectx(basefilectx): """A committablefilectx provides common functionality for a file context