Tue, 18 Sep 2018 16:47:09 -0700 global: replace most uses of RevlogError with StorageError (API)
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 18 Sep 2018 16:47:09 -0700] rev 39777
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
Tue, 18 Sep 2018 16:45:13 -0700 error: introduce StorageError
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 18 Sep 2018 16:45:13 -0700] rev 39776
error: introduce StorageError Errors in revlogs are often represented by RevlogError. It's fine for revlogs to raise a revlog-specific exception. But in the context of multiple storage backends, it doesn't make sense to be throwing or catching an exception with "revlog" in its name when revlogs may not even be in play. This commit introduces a new generic StorageError type for representing errors in the storage layer. RevlogError is an instance of this type. Interface documentation and tests referencing RevlogError has been updated to specify StorageError should be used. .. api:: ``error.StorageError`` has been introduced to represent errors in storage. It should be used in place of ``error.RevlogError`` unless the error is known to come from a revlog. Differential Revision: https://phab.mercurial-scm.org/D4654
Tue, 18 Sep 2018 16:28:17 -0700 revlog: drop LookupError alias (API)
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 18 Sep 2018 16:28:17 -0700] rev 39775
revlog: drop LookupError alias (API) This alias is especially bad because it shadows the built-in LookupError type. This has caused me confusion in the past when reading revlog code. Qualifying all uses with "error." will make it obvious that we're using a Mercurial error type. Differential Revision: https://phab.mercurial-scm.org/D4653
(0) -30000 -10000 -3000 -1000 -300 -100 -30 -10 -3 +3 +10 +30 +100 +300 +1000 +3000 +10000 tip