# HG changeset patch # User Sean Farley # Date 2014-03-11 23:28:09 # Node ID 3925d9460d274224fedc697c91d748be4813c6ab # Parent f251b92d9ed98db18d40f7af0a1dac8cdb3c0b32 committablectx: move status to workingctx This method was accidentally placed into the committablectx class. It contains logic for querying the dirstate so we move it to the correct class. diff --git a/mercurial/context.py b/mercurial/context.py --- a/mercurial/context.py +++ b/mercurial/context.py @@ -931,22 +931,6 @@ class committablectx(basectx): def _date(self): return util.makedate() - def status(self, ignored=False, clean=False, unknown=False): - """Explicit status query - Unless this method is used to query the working copy status, the - _status property will implicitly read the status using its default - arguments.""" - stat = self._repo.status(ignored=ignored, clean=clean, unknown=unknown) - self._unknown = self._ignored = self._clean = None - if unknown: - self._unknown = stat[4] - if ignored: - self._ignored = stat[5] - if clean: - self._clean = stat[6] - self._status = stat[:4] - return stat - def user(self): return self._user or self._repo.ui.username() def date(self): @@ -1229,6 +1213,22 @@ class workingctx(committablectx): pass return modified, fixup + def status(self, ignored=False, clean=False, unknown=False): + """Explicit status query + Unless this method is used to query the working copy status, the + _status property will implicitly read the status using its default + arguments.""" + stat = self._repo.status(ignored=ignored, clean=clean, unknown=unknown) + self._unknown = self._ignored = self._clean = None + if unknown: + self._unknown = stat[4] + if ignored: + self._ignored = stat[5] + if clean: + self._clean = stat[6] + self._status = stat[:4] + return stat + class committablefilectx(basefilectx): """A committablefilectx provides common functionality for a file context