comparison mercurial/commands.py @ 51314:7e6aae033d8d

branching: merge stable into default
author Raphaël Gomès <rgomes@octobus.net>
date Thu, 11 Jan 2024 17:52:13 +0100
parents d6e5bec550f1 c17cf2d51ff4
children 508fd40dc86a
comparison
equal deleted inserted replaced
51307:87bfd1703597 51314:7e6aae033d8d
1591 if cgversion == b's1': 1591 if cgversion == b's1':
1592 raise error.InputError( 1592 raise error.InputError(
1593 _(b'packed bundles cannot be produced by "hg bundle"'), 1593 _(b'packed bundles cannot be produced by "hg bundle"'),
1594 hint=_(b"use 'hg debugcreatestreamclonebundle'"), 1594 hint=_(b"use 'hg debugcreatestreamclonebundle'"),
1595 ) 1595 )
1596 1596 base_opt = opts.get('base')
1597 if opts.get('all'): 1597 if opts.get('all'):
1598 if dests: 1598 if dests:
1599 raise error.InputError( 1599 raise error.InputError(
1600 _(b"--all is incompatible with specifying destinations") 1600 _(b"--all is incompatible with specifying destinations")
1601 ) 1601 )
1602 if opts.get('base'): 1602 if base_opt:
1603 ui.warn(_(b"ignoring --base because --all was specified\n")) 1603 ui.warn(_(b"ignoring --base because --all was specified\n"))
1604 if opts.get('exact'): 1604 if opts.get('exact'):
1605 ui.warn(_(b"ignoring --exact because --all was specified\n")) 1605 ui.warn(_(b"ignoring --exact because --all was specified\n"))
1606 base = [nullrev] 1606 base = [nullrev]
1607 elif opts.get('exact'): 1607 elif opts.get('exact'):
1608 if dests: 1608 if dests:
1609 raise error.InputError( 1609 raise error.InputError(
1610 _(b"--exact is incompatible with specifying destinations") 1610 _(b"--exact is incompatible with specifying destinations")
1611 ) 1611 )
1612 if opts.get('base'): 1612 if base_opt:
1613 ui.warn(_(b"ignoring --base because --exact was specified\n")) 1613 ui.warn(_(b"ignoring --base because --exact was specified\n"))
1614 base = repo.revs(b'parents(%ld) - %ld', revs, revs) 1614 base = repo.revs(b'parents(%ld) - %ld', revs, revs)
1615 if not base: 1615 if not base:
1616 base = [nullrev] 1616 base = [nullrev]
1617 elif base_opt:
1618 base = logcmdutil.revrange(repo, base_opt)
1619 if not base:
1620 # base specified, but nothing was selected
1621 base = [nullrev]
1617 else: 1622 else:
1618 base = logcmdutil.revrange(repo, opts.get('base')) 1623 base = None
1619 if cgversion not in changegroup.supportedoutgoingversions(repo): 1624 if cgversion not in changegroup.supportedoutgoingversions(repo):
1620 raise error.Abort( 1625 raise error.Abort(
1621 _(b"repository does not support bundle version %s") % cgversion 1626 _(b"repository does not support bundle version %s") % cgversion
1622 ) 1627 )
1623 1628
1624 if base: 1629 if base is not None:
1625 if dests: 1630 if dests:
1626 raise error.InputError( 1631 raise error.InputError(
1627 _(b"--base is incompatible with specifying destinations") 1632 _(b"--base is incompatible with specifying destinations")
1628 ) 1633 )
1629 cl = repo.changelog 1634 cl = repo.changelog