# HG changeset patch # User Martin von Zweigbergk # Date 2019-02-21 05:57:39 # Node ID 2ba96fca85284333d6046309597a07940dfc1db7 # Parent 19979b8b87e2b690b0d0a9b0ec7f187ba8596501 committablectx: move status-related methods closer together The modified()/added()/removed()/deleted() clearly belong very close to status(). I separated them in committablectx by the new p[12]copies() methods. This brings the close again. Sorry about the churn. Differential Revision: https://phab.mercurial-scm.org/D5996 diff --git a/mercurial/context.py b/mercurial/context.py --- a/mercurial/context.py +++ b/mercurial/context.py @@ -1183,6 +1183,14 @@ class committablectx(basectx): def files(self): return sorted(self._status.modified + self._status.added + self._status.removed) + def modified(self): + return self._status.modified + def added(self): + return self._status.added + def removed(self): + return self._status.removed + def deleted(self): + return self._status.deleted @propertycache def _copies(self): p1copies = {} @@ -1203,14 +1211,6 @@ class committablectx(basectx): return self._copies[0] def p2copies(self): return self._copies[1] - def modified(self): - return self._status.modified - def added(self): - return self._status.added - def removed(self): - return self._status.removed - def deleted(self): - return self._status.deleted def branch(self): return encoding.tolocal(self._extra['branch']) def closesbranch(self):