comparison mercurial/revlogutils/deltas.py @ 42884:1ebf1a1e14dd

flagprocessors: use _processflagsraw in easy cases When there are no ambiguity regarding the `raw` value, we can simply use the new method. Differential Revision: https://phab.mercurial-scm.org/D6803
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 30 Aug 2019 19:13:12 +0200
parents 7a89b044eea4
children dff95420480f
comparison
equal deleted inserted replaced
42883:a3665eed228f 42884:1ebf1a1e14dd
519 # equivalent to non-raw text 519 # equivalent to non-raw text
520 basetext = revlog.revision(baserev, _df=fh, raw=False) 520 basetext = revlog.revision(baserev, _df=fh, raw=False)
521 fulltext = mdiff.patch(basetext, delta) 521 fulltext = mdiff.patch(basetext, delta)
522 522
523 try: 523 try:
524 res = revlog._processflags(fulltext, flags, 'read', raw=True) 524 validatehash = revlog._processflagsraw(fulltext, flags)
525 fulltext, validatehash = res
526 if validatehash: 525 if validatehash:
527 revlog.checkhash(fulltext, expectednode, p1=p1, p2=p2) 526 revlog.checkhash(fulltext, expectednode, p1=p1, p2=p2)
528 if flags & REVIDX_ISCENSORED: 527 if flags & REVIDX_ISCENSORED:
529 raise error.StorageError(_('node %s is not censored') % 528 raise error.StorageError(_('node %s is not censored') %
530 expectednode) 529 expectednode)