equal
deleted
inserted
replaced
376 changeid = '.' |
376 changeid = '.' |
377 self._repo = repo |
377 self._repo = repo |
378 |
378 |
379 try: |
379 try: |
380 if isinstance(changeid, int): |
380 if isinstance(changeid, int): |
381 try: |
381 self._node = repo.changelog.node(changeid) |
382 self._node = repo.changelog.node(changeid) |
|
383 except IndexError: |
|
384 raise error.RepoLookupError( |
|
385 _("unknown revision '%s'") % changeid) |
|
386 self._rev = changeid |
382 self._rev = changeid |
387 return |
383 return |
388 if isinstance(changeid, long): |
384 if isinstance(changeid, long): |
389 changeid = str(changeid) |
385 changeid = str(changeid) |
390 if changeid == '.': |
386 if changeid == '.': |
461 try: |
457 try: |
462 if len(changeid) == 20: |
458 if len(changeid) == 20: |
463 changeid = hex(changeid) |
459 changeid = hex(changeid) |
464 except TypeError: |
460 except TypeError: |
465 pass |
461 pass |
466 except Exception: |
462 except IndexError: |
467 raise |
463 pass |
468 raise error.RepoLookupError( |
464 raise error.RepoLookupError( |
469 _("unknown revision '%s'") % changeid) |
465 _("unknown revision '%s'") % changeid) |
470 |
466 |
471 def __hash__(self): |
467 def __hash__(self): |
472 try: |
468 try: |