Show More
@@ -1554,7 +1554,14 b' def incoming(ui, repo, source="default",' | |||
|
1554 | 1554 | setremoteconfig(ui, opts) |
|
1555 | 1555 | |
|
1556 | 1556 | other = hg.repository(ui, source) |
|
1557 | incoming = repo.findincoming(other, force=opts["force"]) | |
|
1557 | revs = None | |
|
1558 | if opts['rev']: | |
|
1559 | if 'lookup' in other.capabilities: | |
|
1560 | revs = [other.lookup(rev) for rev in opts['rev']] | |
|
1561 | else: | |
|
1562 | error = _("Other repository doesn't support revision lookup, so a rev cannot be specified.") | |
|
1563 | raise util.Abort(error) | |
|
1564 | incoming = repo.findincoming(other, heads=revs, force=opts["force"]) | |
|
1558 | 1565 | if not incoming: |
|
1559 | 1566 | ui.status(_("no changes found\n")) |
|
1560 | 1567 | return |
@@ -1564,7 +1571,12 b' def incoming(ui, repo, source="default",' | |||
|
1564 | 1571 | fname = opts["bundle"] |
|
1565 | 1572 | if fname or not other.local(): |
|
1566 | 1573 | # create a bundle (uncompressed if other repo is not local) |
|
1567 | cg = other.changegroup(incoming, "incoming") | |
|
1574 | if revs is None: | |
|
1575 | cg = other.changegroup(incoming, "incoming") | |
|
1576 | else: | |
|
1577 | if 'changegroupsubset' not in other.capabilities: | |
|
1578 | raise util.Abort(_("Partial incoming cannot be done because other repository doesn't support changegroupsubset.")) | |
|
1579 | cg = other.changegroupsubset(incoming, revs, 'incoming') | |
|
1568 | 1580 | bundletype = other.local() and "HG10BZ" or "HG10UN" |
|
1569 | 1581 | fname = cleanup = changegroup.writebundle(cg, fname, bundletype) |
|
1570 | 1582 | # keep written bundle? |
@@ -1574,9 +1586,6 b' def incoming(ui, repo, source="default",' | |||
|
1574 | 1586 | # use the created uncompressed bundlerepo |
|
1575 | 1587 | other = bundlerepo.bundlerepository(ui, repo.root, fname) |
|
1576 | 1588 | |
|
1577 | revs = None | |
|
1578 | if opts['rev']: | |
|
1579 | revs = [other.lookup(rev) for rev in opts['rev']] | |
|
1580 | 1589 | o = other.changelog.nodesbetween(incoming, revs)[0] |
|
1581 | 1590 | if opts['newest_first']: |
|
1582 | 1591 | o.reverse() |
General Comments 0
You need to be logged in to leave comments.
Login now