Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/context.py @ 19680:fc33fcfa08f2
commitablectx: move modified from workingctx
author | Sean Farley <sean.michael.farley@gmail.com> |
---|---|
date | Wed, 14 Aug 2013 16:14:58 -0500 |
parents | f21804f1582e |
children | cfc4ae65023f |
comparison
equal
deleted
inserted
replaced
19679:f21804f1582e | 19680:fc33fcfa08f2 |
---|---|
968 def description(self): | 968 def description(self): |
969 return self._text | 969 return self._text |
970 def files(self): | 970 def files(self): |
971 return sorted(self._status[0] + self._status[1] + self._status[2]) | 971 return sorted(self._status[0] + self._status[1] + self._status[2]) |
972 | 972 |
973 def modified(self): | |
974 return self._status[0] | |
975 | |
973 class workingctx(commitablectx): | 976 class workingctx(commitablectx): |
974 """A workingctx object makes access to data related to | 977 """A workingctx object makes access to data related to |
975 the current working directory convenient. | 978 the current working directory convenient. |
976 date - any valid date string or (unixtime, offset), or None. | 979 date - any valid date string or (unixtime, offset), or None. |
977 user - username string, or None. | 980 user - username string, or None. |
994 p = self._repo.dirstate.parents() | 997 p = self._repo.dirstate.parents() |
995 if p[1] == nullid: | 998 if p[1] == nullid: |
996 p = p[:-1] | 999 p = p[:-1] |
997 return [changectx(self._repo, x) for x in p] | 1000 return [changectx(self._repo, x) for x in p] |
998 | 1001 |
999 def modified(self): | |
1000 return self._status[0] | |
1001 def added(self): | 1002 def added(self): |
1002 return self._status[1] | 1003 return self._status[1] |
1003 def removed(self): | 1004 def removed(self): |
1004 return self._status[2] | 1005 return self._status[2] |
1005 def deleted(self): | 1006 def deleted(self): |