comparison mercurial/context.py @ 19678:897c2dbc0256

commitablectx: move description from workingctx
author Sean Farley <sean.michael.farley@gmail.com>
date Wed, 14 Aug 2013 16:09:30 -0500
parents e11415510352
children f21804f1582e
comparison
equal deleted inserted replaced
19677:e11415510352 19678:897c2dbc0256
963 963
964 def user(self): 964 def user(self):
965 return self._user or self._repo.ui.username() 965 return self._user or self._repo.ui.username()
966 def date(self): 966 def date(self):
967 return self._date 967 return self._date
968 def description(self):
969 return self._text
968 970
969 class workingctx(commitablectx): 971 class workingctx(commitablectx):
970 """A workingctx object makes access to data related to 972 """A workingctx object makes access to data related to
971 the current working directory convenient. 973 the current working directory convenient.
972 date - any valid date string or (unixtime, offset), or None. 974 date - any valid date string or (unixtime, offset), or None.
990 p = self._repo.dirstate.parents() 992 p = self._repo.dirstate.parents()
991 if p[1] == nullid: 993 if p[1] == nullid:
992 p = p[:-1] 994 p = p[:-1]
993 return [changectx(self._repo, x) for x in p] 995 return [changectx(self._repo, x) for x in p]
994 996
995 def description(self):
996 return self._text
997 def files(self): 997 def files(self):
998 return sorted(self._status[0] + self._status[1] + self._status[2]) 998 return sorted(self._status[0] + self._status[1] + self._status[2])
999 999
1000 def modified(self): 1000 def modified(self):
1001 return self._status[0] 1001 return self._status[0]