Mercurial > hg
comparison mercurial/revlogutils/deltas.py @ 39773:2cd93a8d4bde
revlog: drop RevlogError alias (API)
error.RevlogError was moved from revlog.py in 08cabecfa8a8 in
2009. revlog.RevlogError has remained as an alias ever since.
Let's drop the alias and use error.RevlogError directly.
Differential Revision: https://phab.mercurial-scm.org/D4651
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Tue, 18 Sep 2018 16:18:37 -0700 |
parents | a911932d5003 |
children | 4a2466b2a434 |
comparison
equal
deleted
inserted
replaced
39772:ae531f5e583c | 39773:2cd93a8d4bde |
---|---|
31 from .. import ( | 31 from .. import ( |
32 error, | 32 error, |
33 mdiff, | 33 mdiff, |
34 ) | 34 ) |
35 | 35 |
36 RevlogError = error.RevlogError | |
37 CensoredNodeError = error.CensoredNodeError | 36 CensoredNodeError = error.CensoredNodeError |
38 | 37 |
39 # maximum <delta-chain-data>/<revision-text-length> ratio | 38 # maximum <delta-chain-data>/<revision-text-length> ratio |
40 LIMIT_DELTA2TEXT = 2 | 39 LIMIT_DELTA2TEXT = 2 |
41 | 40 |
458 res = revlog._processflags(fulltext, flags, 'read', raw=True) | 457 res = revlog._processflags(fulltext, flags, 'read', raw=True) |
459 fulltext, validatehash = res | 458 fulltext, validatehash = res |
460 if validatehash: | 459 if validatehash: |
461 revlog.checkhash(fulltext, expectednode, p1=p1, p2=p2) | 460 revlog.checkhash(fulltext, expectednode, p1=p1, p2=p2) |
462 if flags & REVIDX_ISCENSORED: | 461 if flags & REVIDX_ISCENSORED: |
463 raise RevlogError(_('node %s is not censored') % expectednode) | 462 raise error.RevlogError(_('node %s is not censored') % expectednode) |
464 except CensoredNodeError: | 463 except CensoredNodeError: |
465 # must pass the censored index flag to add censored revisions | 464 # must pass the censored index flag to add censored revisions |
466 if not flags & REVIDX_ISCENSORED: | 465 if not flags & REVIDX_ISCENSORED: |
467 raise | 466 raise |
468 return fulltext | 467 return fulltext |