From patchwork Thu Sep 5 20:07:14 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [20,of,48,RFC] commitablectx: move date from workingctx From: Sean Farley X-Patchwork-Id: 2357 Message-Id: <79a93450bc29d7b2b611.1378411634@laptop.local> To: mercurial-devel@selenic.com Date: Thu, 05 Sep 2013 15:07:14 -0500 # HG changeset patch # User Sean Farley # Date 1376514212 18000 # Wed Aug 14 16:03:32 2013 -0500 # Node ID 79a93450bc29d7b2b6113b84c5f561d5c9cc2758 # Parent f62cbdee6fa949652cf723b830834238e470525e commitablectx: move date from workingctx diff --git a/mercurial/context.py b/mercurial/context.py --- a/mercurial/context.py +++ b/mercurial/context.py @@ -961,10 +961,12 @@ self._status = stat[:4] return stat def user(self): return self._user or self._repo.ui.username() + def date(self): + return self._date 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. @@ -988,12 +990,10 @@ p = self._repo.dirstate.parents() if p[1] == nullid: p = p[:-1] return [changectx(self._repo, x) for x in p] - def date(self): - return self._date def description(self): return self._text def files(self): return sorted(self._status[0] + self._status[1] + self._status[2])