Mercurial > hg
comparison mercurial/context.py @ 2629:a49534aac47d
context.py: various fixes
- use a normal changeset instead of a context
- define _filenode instead of _node to match the else clause
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Sun, 16 Jul 2006 16:40:24 +0200 |
parents | 9999a796d389 |
children | f23973ea3107 |
comparison
equal
deleted
inserted
replaced
2628:9999a796d389 | 2629:a49534aac47d |
---|---|
77 self._id = changeid | 77 self._id = changeid |
78 self._fileid = fileid | 78 self._fileid = fileid |
79 | 79 |
80 if self._id: | 80 if self._id: |
81 # if given a changeset id, go ahead and look up the file | 81 # if given a changeset id, go ahead and look up the file |
82 self._changeset = changectx(self._repo, self._id) | 82 self._changeset = self._repo.changelog.read(self._id) |
83 node, flag = self._repo.manifest.find(self._changeset[0], path) | 83 node, flag = self._repo.manifest.find(self._changeset[0], path) |
84 self._node = node | |
85 self._filelog = self._repo.file(self._path) | 84 self._filelog = self._repo.file(self._path) |
85 self._filenode = node | |
86 elif self._fileid: | 86 elif self._fileid: |
87 # else be lazy | 87 # else be lazy |
88 self._filelog = self._repo.file(self._path) | 88 self._filelog = self._repo.file(self._path) |
89 self._filenode = self._filelog.lookup(self._fileid) | 89 self._filenode = self._filelog.lookup(self._fileid) |
90 self._filerev = self._filelog.rev(self._filenode) | 90 self._filerev = self._filelog.rev(self._filenode) |