From patchwork Thu Sep 5 20:07:18 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [24,of,48,RFC] commitablectx: move added from workingctx From: Sean Farley X-Patchwork-Id: 2362 Message-Id: <099d75b3133bf6109c1a.1378411638@laptop.local> To: mercurial-devel@selenic.com Date: Thu, 05 Sep 2013 15:07:18 -0500 # HG changeset patch # User Sean Farley # Date 1376514918 18000 # Wed Aug 14 16:15:18 2013 -0500 # Node ID 099d75b3133bf6109c1ab426075d9b30957082c7 # Parent 03874cca7c1612cfd557d218dfc0bcd0c64ff1e2 commitablectx: move added from workingctx diff --git a/mercurial/context.py b/mercurial/context.py --- a/mercurial/context.py +++ b/mercurial/context.py @@ -970,10 +970,12 @@ def files(self): return sorted(self._status[0] + self._status[1] + self._status[2]) def modified(self): return self._status[0] + def added(self): + return self._status[1] 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. @@ -997,12 +999,10 @@ p = self._repo.dirstate.parents() if p[1] == nullid: p = p[:-1] return [changectx(self._repo, x) for x in p] - def added(self): - return self._status[1] def removed(self): return self._status[2] def deleted(self): return self._status[3] def unknown(self):