Mercurial > hg
comparison mercurial/context.py @ 19679:f21804f1582e
commitablectx: move files from workingctx
author | Sean Farley <sean.michael.farley@gmail.com> |
---|---|
date | Wed, 14 Aug 2013 16:09:45 -0500 |
parents | 897c2dbc0256 |
children | fc33fcfa08f2 |
comparison
equal
deleted
inserted
replaced
19678:897c2dbc0256 | 19679:f21804f1582e |
---|---|
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): | 968 def description(self): |
969 return self._text | 969 return self._text |
970 def files(self): | |
971 return sorted(self._status[0] + self._status[1] + self._status[2]) | |
970 | 972 |
971 class workingctx(commitablectx): | 973 class workingctx(commitablectx): |
972 """A workingctx object makes access to data related to | 974 """A workingctx object makes access to data related to |
973 the current working directory convenient. | 975 the current working directory convenient. |
974 date - any valid date string or (unixtime, offset), or None. | 976 date - any valid date string or (unixtime, offset), or None. |
991 def _parents(self): | 993 def _parents(self): |
992 p = self._repo.dirstate.parents() | 994 p = self._repo.dirstate.parents() |
993 if p[1] == nullid: | 995 if p[1] == nullid: |
994 p = p[:-1] | 996 p = p[:-1] |
995 return [changectx(self._repo, x) for x in p] | 997 return [changectx(self._repo, x) for x in p] |
996 | |
997 def files(self): | |
998 return sorted(self._status[0] + self._status[1] + self._status[2]) | |
999 | 998 |
1000 def modified(self): | 999 def modified(self): |
1001 return self._status[0] | 1000 return self._status[0] |
1002 def added(self): | 1001 def added(self): |
1003 return self._status[1] | 1002 return self._status[1] |