comparison mercurial/context.py @ 19675:84249d49f37c

commitablectx: move user from workingctx
author Sean Farley <sean.michael.farley@gmail.com>
date Wed, 14 Aug 2013 15:57:24 -0500
parents ec5b2e2b947f
children 103525f36337
comparison
equal deleted inserted replaced
19674:ec5b2e2b947f 19675:84249d49f37c
955 if clean: 955 if clean:
956 self._clean = stat[6] 956 self._clean = stat[6]
957 self._status = stat[:4] 957 self._status = stat[:4]
958 return stat 958 return stat
959 959
960 def user(self):
961 return self._user or self._repo.ui.username()
962
960 class workingctx(commitablectx): 963 class workingctx(commitablectx):
961 """A workingctx object makes access to data related to 964 """A workingctx object makes access to data related to
962 the current working directory convenient. 965 the current working directory convenient.
963 date - any valid date string or (unixtime, offset), or None. 966 date - any valid date string or (unixtime, offset), or None.
964 user - username string, or None. 967 user - username string, or None.
985 p = self._repo.dirstate.parents() 988 p = self._repo.dirstate.parents()
986 if p[1] == nullid: 989 if p[1] == nullid:
987 p = p[:-1] 990 p = p[:-1]
988 return [changectx(self._repo, x) for x in p] 991 return [changectx(self._repo, x) for x in p]
989 992
990 def user(self):
991 return self._user or self._repo.ui.username()
992 def date(self): 993 def date(self):
993 return self._date 994 return self._date
994 def description(self): 995 def description(self):
995 return self._text 996 return self._text
996 def files(self): 997 def files(self):