equal
deleted
inserted
replaced
1624 except error.UnsupportedBundleSpecification as e: |
1624 except error.UnsupportedBundleSpecification as e: |
1625 raise error.InputError( |
1625 raise error.InputError( |
1626 pycompat.bytestr(e), |
1626 pycompat.bytestr(e), |
1627 hint=_(b"see 'hg help bundlespec' for supported values for --type"), |
1627 hint=_(b"see 'hg help bundlespec' for supported values for --type"), |
1628 ) |
1628 ) |
|
1629 |
|
1630 has_changegroup = bundlespec.params.get(b"changegroup", False) |
1629 cgversion = bundlespec.params[b"cg.version"] |
1631 cgversion = bundlespec.params[b"cg.version"] |
1630 |
1632 |
1631 # Packed bundles are a pseudo bundle format for now. |
1633 # Packed bundles are a pseudo bundle format for now. |
1632 if cgversion == b's1': |
1634 if cgversion == b's1': |
1633 raise error.InputError( |
1635 raise error.InputError( |
1660 if not base: |
1662 if not base: |
1661 # base specified, but nothing was selected |
1663 # base specified, but nothing was selected |
1662 base = [nullrev] |
1664 base = [nullrev] |
1663 else: |
1665 else: |
1664 base = None |
1666 base = None |
1665 if cgversion not in changegroup.supportedoutgoingversions(repo): |
1667 supported_cg_versions = changegroup.supportedoutgoingversions(repo) |
|
1668 if has_changegroup and cgversion not in supported_cg_versions: |
1666 raise error.Abort( |
1669 raise error.Abort( |
1667 _(b"repository does not support bundle version %s") % cgversion |
1670 _(b"repository does not support bundle version %s") % cgversion |
1668 ) |
1671 ) |
1669 |
1672 |
1670 if base is not None: |
1673 if base is not None: |