comparison mercurial/context.py @ 23777:a4951adebfb0

status: don't override _buildstatus() in workingcommitctx Now that the caching into _status is done in workingctx._dirstatestatus(), which workingcommitctx._dirstatestatus() does not call, there is no caching to prevent in _buildstatus(), so stop overriding it.
author Martin von Zweigbergk <martinvonz@google.com>
date Thu, 08 Jan 2015 13:29:06 -0800
parents 70bf92b87410
children 81349f4b47f4
comparison
equal deleted inserted replaced
23776:70bf92b87410 23777:a4951adebfb0
1645 def __init__(self, repo, changes, 1645 def __init__(self, repo, changes,
1646 text="", user=None, date=None, extra=None): 1646 text="", user=None, date=None, extra=None):
1647 super(workingctx, self).__init__(repo, text, user, date, extra, 1647 super(workingctx, self).__init__(repo, text, user, date, extra,
1648 changes) 1648 changes)
1649 1649
1650 def _buildstatus(self, other, s, match,
1651 listignored, listclean, listunknown):
1652 """Prevent ``workingctx._buildstatus`` from changing ``self._status``
1653 """
1654 s = self._dirstatestatus(match, listignored, listclean, listunknown)
1655 if other != self._repo['.']:
1656 # workingctx._buildstatus doesn't change self._status in this case
1657 superself = super(workingcommitctx, self)
1658 s = superself._buildstatus(other, s, match,
1659 listignored, listclean, listunknown)
1660 return s
1661
1662 def _dirstatestatus(self, match=None, ignored=False, clean=False, 1650 def _dirstatestatus(self, match=None, ignored=False, clean=False,
1663 unknown=False): 1651 unknown=False):
1664 """Return matched files only in ``self._status`` 1652 """Return matched files only in ``self._status``
1665 1653
1666 Uncommitted files appear "clean" via this context, even if 1654 Uncommitted files appear "clean" via this context, even if