comparison hgext/transplant.py @ 39777:b63dee7bd0d9

global: replace most uses of RevlogError with StorageError (API) When catching errors in storage, we should be catching StorageError instead of RevlogError. When throwing errors related to storage, we shouldn't be using RevlogError unless we know the error stemmed from revlogs. And we only reliably know that if we're in revlog.py or are inheriting from a type defined in revlog.py. Differential Revision: https://phab.mercurial-scm.org/D4655
author Gregory Szorc <gregory.szorc@gmail.com>
date Tue, 18 Sep 2018 16:47:09 -0700
parents c7eb9bce6041
children c303d65d2e34
comparison
equal deleted inserted replaced
39776:cb65d4b7e429 39777:b63dee7bd0d9
501 return matchfn 501 return matchfn
502 502
503 def hasnode(repo, node): 503 def hasnode(repo, node):
504 try: 504 try:
505 return repo.changelog.rev(node) is not None 505 return repo.changelog.rev(node) is not None
506 except error.RevlogError: 506 except error.StorageError:
507 return False 507 return False
508 508
509 def browserevs(ui, repo, nodes, opts): 509 def browserevs(ui, repo, nodes, opts):
510 '''interactively transplant changesets''' 510 '''interactively transplant changesets'''
511 displayer = logcmdutil.changesetdisplayer(ui, repo, opts) 511 displayer = logcmdutil.changesetdisplayer(ui, repo, opts)