Show More
@@ -12,16 +12,11 b' import ancestor, bdiff, revlog, util, os' | |||
|
12 | 12 | class changectx(object): |
|
13 | 13 | """A changecontext object makes access to data related to a particular |
|
14 | 14 | changeset convenient.""" |
|
15 |
def __init__(self, repo, changeid= |
|
|
15 | def __init__(self, repo, changeid=''): | |
|
16 | 16 | """changeid is a revision number, node, or tag""" |
|
17 | if changeid == '': | |
|
18 | changeid = '.' | |
|
17 | 19 | self._repo = repo |
|
18 | ||
|
19 | if not changeid and changeid != 0: | |
|
20 | p1, p2 = self._repo.dirstate.parents() | |
|
21 | self._rev = self._repo.changelog.rev(p1) | |
|
22 | self._node = p1 | |
|
23 | return | |
|
24 | ||
|
25 | 20 | self._node = self._repo.lookup(changeid) |
|
26 | 21 | self._rev = self._repo.changelog.rev(self._node) |
|
27 | 22 |
General Comments 0
You need to be logged in to leave comments.
Login now