equal
deleted
inserted
replaced
466 We assume the 4 byte header has been read and validated and the file handle |
466 We assume the 4 byte header has been read and validated and the file handle |
467 is at the 2 byte compression identifier. |
467 is at the 2 byte compression identifier. |
468 """ |
468 """ |
469 if len(repo): |
469 if len(repo): |
470 raise error.Abort( |
470 raise error.Abort( |
471 _(b'cannot apply stream clone bundle on non-empty ' b'repo') |
471 _(b'cannot apply stream clone bundle on non-empty repo') |
472 ) |
472 ) |
473 |
473 |
474 filecount, bytecount, requirements = readbundle1header(fp) |
474 filecount, bytecount, requirements = readbundle1header(fp) |
475 missingreqs = requirements - repo.supportedformats |
475 missingreqs = requirements - repo.supportedformats |
476 if missingreqs: |
476 if missingreqs: |
477 raise error.Abort( |
477 raise error.Abort( |
478 _(b'unable to apply stream clone: ' b'unsupported format: %s') |
478 _(b'unable to apply stream clone: unsupported format: %s') |
479 % b', '.join(sorted(missingreqs)) |
479 % b', '.join(sorted(missingreqs)) |
480 ) |
480 ) |
481 |
481 |
482 consumev1(repo, fp, filecount, bytecount) |
482 consumev1(repo, fp, filecount, bytecount) |
483 |
483 |
713 from . import localrepo |
713 from . import localrepo |
714 |
714 |
715 missingreqs = [r for r in requirements if r not in repo.supported] |
715 missingreqs = [r for r in requirements if r not in repo.supported] |
716 if missingreqs: |
716 if missingreqs: |
717 raise error.Abort( |
717 raise error.Abort( |
718 _(b'unable to apply stream clone: ' b'unsupported format: %s') |
718 _(b'unable to apply stream clone: unsupported format: %s') |
719 % b', '.join(sorted(missingreqs)) |
719 % b', '.join(sorted(missingreqs)) |
720 ) |
720 ) |
721 |
721 |
722 consumev2(repo, fp, filecount, filesize) |
722 consumev2(repo, fp, filecount, filesize) |
723 |
723 |