Mercurial > hg
comparison mercurial/context.py @ 23236:7ea2ef4479f2
context.status: remove overriding in workingctx
The workingctx method simply calls the super method. The only effect
it has is that it uses a different default argument for the 'other'
argument. The only in-tree caller is patch.diff, which always passes
an argument to the method, so it should be safe to remove the
overriding. Having the default argument depend on the type seems
rather dangerous anyway.
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 23 Oct 2014 13:43:20 -0700 |
parents | e53f6b72a0e4 |
children | 98f41a2f8fba |
comparison
equal
deleted
inserted
replaced
23235:4cdc3e2810b9 | 23236:7ea2ef4479f2 |
---|---|
1494 self._repo.ui.warn('%s: %s\n' % | 1494 self._repo.ui.warn('%s: %s\n' % |
1495 (self._repo.dirstate.pathto(f), msg)) | 1495 (self._repo.dirstate.pathto(f), msg)) |
1496 match.bad = bad | 1496 match.bad = bad |
1497 return match | 1497 return match |
1498 | 1498 |
1499 def status(self, other='.', match=None, listignored=False, | |
1500 listclean=False, listunknown=False, listsubrepos=False): | |
1501 # yet to be determined: what to do if 'other' is a 'workingctx' or a | |
1502 # 'memctx'? | |
1503 return super(workingctx, self).status(other, match, listignored, | |
1504 listclean, listunknown, | |
1505 listsubrepos) | |
1506 | |
1507 class committablefilectx(basefilectx): | 1499 class committablefilectx(basefilectx): |
1508 """A committablefilectx provides common functionality for a file context | 1500 """A committablefilectx provides common functionality for a file context |
1509 that wants the ability to commit, e.g. workingfilectx or memfilectx.""" | 1501 that wants the ability to commit, e.g. workingfilectx or memfilectx.""" |
1510 def __init__(self, repo, path, filelog=None, ctx=None): | 1502 def __init__(self, repo, path, filelog=None, ctx=None): |
1511 self._repo = repo | 1503 self._repo = repo |