equal
deleted
inserted
replaced
29 |
29 |
30 from .. import ( |
30 from .. import ( |
31 error, |
31 error, |
32 mdiff, |
32 mdiff, |
33 util, |
33 util, |
|
34 ) |
|
35 |
|
36 from . import ( |
|
37 flagutil, |
34 ) |
38 ) |
35 |
39 |
36 # maximum <delta-chain-data>/<revision-text-length> ratio |
40 # maximum <delta-chain-data>/<revision-text-length> ratio |
37 LIMIT_DELTA2TEXT = 2 |
41 LIMIT_DELTA2TEXT = 2 |
38 |
42 |
519 # equivalent to non-raw text |
523 # equivalent to non-raw text |
520 basetext = revlog.revision(baserev, _df=fh, raw=False) |
524 basetext = revlog.revision(baserev, _df=fh, raw=False) |
521 fulltext = mdiff.patch(basetext, delta) |
525 fulltext = mdiff.patch(basetext, delta) |
522 |
526 |
523 try: |
527 try: |
524 validatehash = revlog._processflagsraw(fulltext, flags) |
528 validatehash = flagutil.processflagsraw(revlog, fulltext, flags) |
525 if validatehash: |
529 if validatehash: |
526 revlog.checkhash(fulltext, expectednode, p1=p1, p2=p2) |
530 revlog.checkhash(fulltext, expectednode, p1=p1, p2=p2) |
527 if flags & REVIDX_ISCENSORED: |
531 if flags & REVIDX_ISCENSORED: |
528 raise error.StorageError(_('node %s is not censored') % |
532 raise error.StorageError(_('node %s is not censored') % |
529 expectednode) |
533 expectednode) |