equal
deleted
inserted
replaced
1482 |
1482 |
1483 |
1483 |
1484 @command( |
1484 @command( |
1485 b'bundle', |
1485 b'bundle', |
1486 [ |
1486 [ |
|
1487 |
|
1488 ( |
|
1489 b'', |
|
1490 b'exact', |
|
1491 None, |
|
1492 _(b'compute the base from the revision specified'), |
|
1493 ), |
1487 ( |
1494 ( |
1488 b'f', |
1495 b'f', |
1489 b'force', |
1496 b'force', |
1490 None, |
1497 None, |
1491 _(b'run even when the destination is unrelated'), |
1498 _(b'run even when the destination is unrelated'), |
1551 permissions, copy/rename information, and revision history. |
1558 permissions, copy/rename information, and revision history. |
1552 |
1559 |
1553 Returns 0 on success, 1 if no changes found. |
1560 Returns 0 on success, 1 if no changes found. |
1554 """ |
1561 """ |
1555 opts = pycompat.byteskwargs(opts) |
1562 opts = pycompat.byteskwargs(opts) |
|
1563 |
1556 revs = None |
1564 revs = None |
1557 if b'rev' in opts: |
1565 if b'rev' in opts: |
1558 revstrings = opts[b'rev'] |
1566 revstrings = opts[b'rev'] |
1559 revs = logcmdutil.revrange(repo, revstrings) |
1567 revs = logcmdutil.revrange(repo, revstrings) |
1560 if revstrings and not revs: |
1568 if revstrings and not revs: |
1584 raise error.InputError( |
1592 raise error.InputError( |
1585 _(b"--all is incompatible with specifying destinations") |
1593 _(b"--all is incompatible with specifying destinations") |
1586 ) |
1594 ) |
1587 if opts.get(b'base'): |
1595 if opts.get(b'base'): |
1588 ui.warn(_(b"ignoring --base because --all was specified\n")) |
1596 ui.warn(_(b"ignoring --base because --all was specified\n")) |
|
1597 if opts.get(b'exact'): |
|
1598 ui.warn(_(b"ignoring --exact because --all was specified\n")) |
1589 base = [nullrev] |
1599 base = [nullrev] |
|
1600 elif opts.get(b'exact'): |
|
1601 if dests: |
|
1602 raise error.InputError( |
|
1603 _(b"--exact is incompatible with specifying destinations") |
|
1604 ) |
|
1605 if opts.get(b'base'): |
|
1606 ui.warn(_(b"ignoring --base because --exact was specified\n")) |
|
1607 base = repo.revs(b'parents(%ld) - %ld', revs, revs) |
|
1608 if not base: |
|
1609 base = [nullrev] |
1590 else: |
1610 else: |
1591 base = logcmdutil.revrange(repo, opts.get(b'base')) |
1611 base = logcmdutil.revrange(repo, opts.get(b'base')) |
1592 if cgversion not in changegroup.supportedoutgoingversions(repo): |
1612 if cgversion not in changegroup.supportedoutgoingversions(repo): |
1593 raise error.Abort( |
1613 raise error.Abort( |
1594 _(b"repository does not support bundle version %s") % cgversion |
1614 _(b"repository does not support bundle version %s") % cgversion |