Show More
@@ -102,34 +102,35 b' class filectx(object):' | |||
|
102 | 102 | self._filelog = self._repo.file(self._path) |
|
103 | 103 | |
|
104 | 104 | if fileid is None: |
|
105 | # if given a changeset id, go ahead and look up the file | |
|
106 | 105 | self._changeid = changeid |
|
107 | self._changectx = self.changectx() | |
|
108 | self._filenode = self._changectx.filenode(self._path) | |
|
109 | 106 | else: |
|
110 | # else delay changectx creation | |
|
111 | 107 | self._filenode = self._filelog.lookup(fileid) |
|
112 | 108 | self._changeid = self._filelog.linkrev(self._filenode) |
|
113 | self._filerev = self._filelog.rev(self._filenode) | |
|
114 | 109 | |
|
115 |
def |
|
|
116 | try: | |
|
117 | return self._changectx | |
|
118 | except AttributeError: | |
|
110 | def __getattr__(self, name): | |
|
111 | if name == '_changectx': | |
|
119 | 112 | self._changectx = changectx(self._repo, self._changeid) |
|
120 | 113 | return self._changectx |
|
114 | elif name == '_filenode': | |
|
115 | self._filenode = self._changectx.filenode(self._path) | |
|
116 | return self._filenode | |
|
117 | elif name == '_filerev': | |
|
118 | self._filerev = self._filelog.rev(self._filenode) | |
|
119 | return self._filerev | |
|
120 | else: | |
|
121 | raise AttributeError, name | |
|
121 | 122 | |
|
122 | 123 | def filerev(self): return self._filerev |
|
123 | 124 | def filenode(self): return self._filenode |
|
124 | 125 | def filelog(self): return self._filelog |
|
125 | 126 | |
|
126 |
def rev(self): return self.changectx |
|
|
127 |
def node(self): return self.changectx |
|
|
128 |
def user(self): return self.changectx |
|
|
129 |
def date(self): return self.changectx |
|
|
130 |
def files(self): return self.changectx |
|
|
131 |
def description(self): return self.changectx |
|
|
132 |
def manifest(self): return self.changectx |
|
|
127 | def rev(self): return self._changectx.rev() | |
|
128 | def node(self): return self._changectx.node() | |
|
129 | def user(self): return self._changectx.user() | |
|
130 | def date(self): return self._changectx.date() | |
|
131 | def files(self): return self._changectx.files() | |
|
132 | def description(self): return self._changectx.description() | |
|
133 | def manifest(self): return self._changectx.manifest() | |
|
133 | 134 | |
|
134 | 135 | def data(self): return self._filelog.read(self._filenode) |
|
135 | 136 | def renamed(self): return self._filelog.renamed(self._filenode) |
General Comments 0
You need to be logged in to leave comments.
Login now