Show More
@@ -16,7 +16,7 b' class changectx(object):' | |||||
16 | """changeid is a revision number, node, or tag""" |
|
16 | """changeid is a revision number, node, or tag""" | |
17 | self._repo = repo |
|
17 | self._repo = repo | |
18 |
|
18 | |||
19 | if not changeid: |
|
19 | if not changeid and changeid != 0: | |
20 | p1, p2 = self._repo.dirstate.parents() |
|
20 | p1, p2 = self._repo.dirstate.parents() | |
21 | self._rev = self._repo.changelog.rev(p1) |
|
21 | self._rev = self._repo.changelog.rev(p1) | |
22 | if self._rev == -1: |
|
22 | if self._rev == -1: | |
@@ -94,14 +94,14 b' class filectx(object):' | |||||
94 | self._repo = repo |
|
94 | self._repo = repo | |
95 | self._path = path |
|
95 | self._path = path | |
96 |
|
96 | |||
97 | assert changeid or fileid |
|
97 | assert changeid is not None or fileid is not None | |
98 |
|
98 | |||
99 | if filelog: |
|
99 | if filelog: | |
100 | self._filelog = filelog |
|
100 | self._filelog = filelog | |
101 | else: |
|
101 | else: | |
102 | self._filelog = self._repo.file(self._path) |
|
102 | self._filelog = self._repo.file(self._path) | |
103 |
|
103 | |||
104 |
if |
|
104 | if fileid is None: | |
105 | # if given a changeset id, go ahead and look up the file |
|
105 | # if given a changeset id, go ahead and look up the file | |
106 | self._changeid = changeid |
|
106 | self._changeid = changeid | |
107 | self._changectx = self.changectx() |
|
107 | self._changectx = self.changectx() |
General Comments 0
You need to be logged in to leave comments.
Login now