equal
deleted
inserted
replaced
442 |
442 |
443 return None |
443 return None |
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]) + "+" |
455 |
460 |
456 def __nonzero__(self): |
461 def __nonzero__(self): |