From patchwork Thu Sep 5 20:07:23 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [29,of,48,RFC] commitablectx: move clean from workingctx From: Sean Farley X-Patchwork-Id: 2367 Message-Id: To: mercurial-devel@selenic.com Date: Thu, 05 Sep 2013 15:07:23 -0500 # HG changeset patch # User Sean Farley # Date 1376515362 18000 # Wed Aug 14 16:22:42 2013 -0500 # Node ID f1a22f9501eb519d76c98351fa1c7ac6717461e7 # Parent 5179b78504fe65feda5e4d6aa6d00da19c7096cb commitablectx: move clean from workingctx diff --git a/mercurial/context.py b/mercurial/context.py --- a/mercurial/context.py +++ b/mercurial/context.py @@ -982,10 +982,13 @@ assert self._unknown is not None # must call status first return self._unknown def ignored(self): assert self._ignored is not None # must call status first return self._ignored + def clean(self): + assert self._clean is not None # must call status first + return self._clean class workingctx(commitablectx): """A workingctx object makes access to data related to the current working directory convenient. date - any valid date string or (unixtime, offset), or None. @@ -1009,13 +1012,10 @@ p = self._repo.dirstate.parents() if p[1] == nullid: p = p[:-1] return [changectx(self._repo, x) for x in p] - def clean(self): - assert self._clean is not None # must call status first - return self._clean def branch(self): return encoding.tolocal(self._extra['branch']) def closesbranch(self): return 'close' in self._extra def extra(self):