Show More
@@ -593,37 +593,7 b' class localrepository(repo.repository):' | |||||
593 | partial[branch] = bheads |
|
593 | partial[branch] = bheads | |
594 |
|
594 | |||
595 | def lookup(self, key): |
|
595 | def lookup(self, key): | |
596 | if isinstance(key, int): |
|
596 | return self[key].node() | |
597 | return self.changelog.node(key) |
|
|||
598 | elif key == '.': |
|
|||
599 | return self.dirstate.p1() |
|
|||
600 | elif key == 'null': |
|
|||
601 | return nullid |
|
|||
602 | elif key == 'tip': |
|
|||
603 | return self.changelog.tip() |
|
|||
604 | n = self.changelog._match(key) |
|
|||
605 | if n: |
|
|||
606 | return n |
|
|||
607 | if key in self._bookmarks: |
|
|||
608 | return self._bookmarks[key] |
|
|||
609 | if key in self.tags(): |
|
|||
610 | return self.tags()[key] |
|
|||
611 | if key in self.branchtags(): |
|
|||
612 | return self.branchtags()[key] |
|
|||
613 | n = self.changelog._partialmatch(key) |
|
|||
614 | if n: |
|
|||
615 | return n |
|
|||
616 |
|
||||
617 | # can't find key, check if it might have come from damaged dirstate |
|
|||
618 | if key in self.dirstate.parents(): |
|
|||
619 | raise error.Abort(_("working directory has unknown parent '%s'!") |
|
|||
620 | % short(key)) |
|
|||
621 | try: |
|
|||
622 | if len(key) == 20: |
|
|||
623 | key = hex(key) |
|
|||
624 | except TypeError: |
|
|||
625 | pass |
|
|||
626 | raise error.RepoLookupError(_("unknown revision '%s'") % key) |
|
|||
627 |
|
597 | |||
628 | def lookupbranch(self, key, remote=None): |
|
598 | def lookupbranch(self, key, remote=None): | |
629 | repo = remote or self |
|
599 | repo = remote or self |
General Comments 0
You need to be logged in to leave comments.
Login now