[PATCH 18 of 48 RFC] commitablectx: move user from workingctx
Sean Farley
sean.michael.farley at gmail.com
Thu Sep 5 20:07:12 UTC 2013
# HG changeset patch
# User Sean Farley <sean.michael.farley at gmail.com>
# Date 1376513844 18000
# Wed Aug 14 15:57:24 2013 -0500
# Node ID ab2af026ad1aa11afa88f43c45067f5e6422bd3e
# Parent 275fafe6656b04af2fb0f7ea2f04ff7b8d5ce05c
commitablectx: move user from workingctx
diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -955,10 +955,13 @@
if clean:
self._clean = stat[6]
self._status = stat[:4]
return stat
+ def user(self):
+ return self._user or self._repo.ui.username()
+
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.
user - username string, or None.
@@ -985,12 +988,10 @@
p = self._repo.dirstate.parents()
if p[1] == nullid:
p = p[:-1]
return [changectx(self._repo, x) for x in p]
- def user(self):
- return self._user or self._repo.ui.username()
def date(self):
return self._date
def description(self):
return self._text
def files(self):
More information about the Mercurial-devel
mailing list