Show More
@@ -444,11 +444,16 b' class filectx(object):' | |||||
444 |
|
444 | |||
445 | class workingctx(changectx): |
|
445 | class workingctx(changectx): | |
446 | """A workingctx object makes access to data related to |
|
446 | """A workingctx object makes access to data related to | |
447 |
the current working directory convenient. |
|
447 | the current working directory convenient. | |
448 | def __init__(self, repo): |
|
448 | parents - a pair of parent nodeids, or None to use the dirstate. | |
|
449 | """ | |||
|
450 | def __init__(self, repo, parents=None): | |||
449 | self._repo = repo |
|
451 | self._repo = repo | |
450 | self._rev = None |
|
452 | self._rev = None | |
451 | self._node = None |
|
453 | self._node = None | |
|
454 | if parents: | |||
|
455 | p1, p2 = parents | |||
|
456 | self._parents = [self._repo.changectx(p) for p in (p1, p2)] | |||
452 |
|
457 | |||
453 | def __str__(self): |
|
458 | def __str__(self): | |
454 | return str(self._parents[0]) + "+" |
|
459 | return str(self._parents[0]) + "+" |
@@ -491,8 +491,8 b' class localrepository(repo.repository):' | |||||
491 | def changectx(self, changeid=None): |
|
491 | def changectx(self, changeid=None): | |
492 | return context.changectx(self, changeid) |
|
492 | return context.changectx(self, changeid) | |
493 |
|
493 | |||
494 | def workingctx(self): |
|
494 | def workingctx(self, parents=None): | |
495 | return context.workingctx(self) |
|
495 | return context.workingctx(self, parents) | |
496 |
|
496 | |||
497 | def parents(self, changeid=None): |
|
497 | def parents(self, changeid=None): | |
498 | ''' |
|
498 | ''' |
General Comments 0
You need to be logged in to leave comments.
Login now