equal
deleted
inserted
replaced
396 or fileid is not None |
396 or fileid is not None |
397 or changectx is not None), \ |
397 or changectx is not None), \ |
398 ("bad args: changeid=%r, fileid=%r, changectx=%r" |
398 ("bad args: changeid=%r, fileid=%r, changectx=%r" |
399 % (changeid, fileid, changectx)) |
399 % (changeid, fileid, changectx)) |
400 |
400 |
401 if filelog: |
401 if filelog is not None: |
402 self._filelog = filelog |
402 self._filelog = filelog |
403 |
403 |
404 if changeid is not None: |
404 if changeid is not None: |
405 self._changeid = changeid |
405 self._changeid = changeid |
406 if changectx is not None: |
406 if changectx is not None: |
435 def _filelog(self): |
435 def _filelog(self): |
436 return self._repo.file(self._path) |
436 return self._repo.file(self._path) |
437 |
437 |
438 @propertycache |
438 @propertycache |
439 def _changeid(self): |
439 def _changeid(self): |
440 if '_changectx' in self.__dict__: |
440 if '_changeid' in self.__dict__: |
|
441 return self._changeid |
|
442 elif '_changectx' in self.__dict__: |
441 return self._changectx.rev() |
443 return self._changectx.rev() |
442 else: |
444 else: |
443 return self._filelog.linkrev(self._filerev) |
445 return self._filelog.linkrev(self._filerev) |
444 |
446 |
445 @propertycache |
447 @propertycache |
1165 self._repo = repo |
1167 self._repo = repo |
1166 self._path = path |
1168 self._path = path |
1167 self._changeid = None |
1169 self._changeid = None |
1168 self._filerev = self._filenode = None |
1170 self._filerev = self._filenode = None |
1169 |
1171 |
1170 if filelog: |
1172 if filelog is not None: |
1171 self._filelog = filelog |
1173 self._filelog = filelog |
1172 if workingctx: |
1174 if workingctx: |
1173 self._changectx = workingctx |
1175 self._changectx = workingctx |
1174 |
1176 |
1175 @propertycache |
1177 @propertycache |