Mercurial > hg
changeset 19551:e07c69145724
basectx: move __getitem__ from changectx
author | Sean Farley <sean.michael.farley@gmail.com> |
---|---|
date | Mon, 05 Aug 2013 17:22:05 -0500 |
parents | 0c8ad779eb36 |
children | 6b76070c4b54 |
files | mercurial/context.py |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/context.py Mon Aug 05 17:21:38 2013 -0500 +++ b/mercurial/context.py Mon Aug 05 17:22:05 2013 -0500 @@ -56,6 +56,9 @@ def __contains__(self, key): return key in self._manifest + def __getitem__(self, key): + return self.filectx(key) + @propertycache def substate(self): return subrepo.state(self, self._repo.ui) @@ -200,9 +203,6 @@ p = p[:-1] return [changectx(self._repo, x) for x in p] - def __getitem__(self, key): - return self.filectx(key) - def __iter__(self): for f in sorted(self._manifest): yield f