Show More
@@ -8,7 +8,7 b'' | |||
|
8 | 8 | from node import * |
|
9 | 9 | from i18n import gettext as _ |
|
10 | 10 | from demandload import demandload |
|
11 | demandload(globals(), "ancestor bdiff repo util") | |
|
11 | demandload(globals(), "ancestor bdiff repo revlog util") | |
|
12 | 12 | |
|
13 | 13 | class changectx(object): |
|
14 | 14 | """A changecontext object makes access to data related to a particular |
@@ -104,10 +104,10 b' class changectx(object):' | |||
|
104 | 104 | class filectx(object): |
|
105 | 105 | """A filecontext object makes access to data related to a particular |
|
106 | 106 | filerevision convenient.""" |
|
107 | def __init__(self, repo, path, changeid=None, fileid=None, filelog=None): | |
|
107 | def __init__(self, repo_, path, changeid=None, fileid=None, filelog=None): | |
|
108 | 108 | """changeid can be a changeset revision, node, or tag. |
|
109 | 109 | fileid can be a file revision or node.""" |
|
110 | self._repo = repo | |
|
110 | self._repo = repo_ | |
|
111 | 111 | self._path = path |
|
112 | 112 | |
|
113 | 113 | assert changeid is not None or fileid is not None |
@@ -120,7 +120,10 b' class filectx(object):' | |||
|
120 | 120 | if fileid is None: |
|
121 | 121 | self._changeid = changeid |
|
122 | 122 | else: |
|
123 | self._filenode = self._filelog.lookup(fileid) | |
|
123 | try: | |
|
124 | self._filenode = self._filelog.lookup(fileid) | |
|
125 | except revlog.RevlogError, inst: | |
|
126 | raise repo.LookupError(str(inst)) | |
|
124 | 127 | self._changeid = self._filelog.linkrev(self._filenode) |
|
125 | 128 | |
|
126 | 129 | def __getattr__(self, name): |
General Comments 0
You need to be logged in to leave comments.
Login now