##// END OF EJS Templates
merge with stable
Thomas Arendsen Hein -
r4474:08ae4511 merge default
parent child Browse files
Show More
@@ -1593,7 +1593,14 def incoming(ui, repo, source="default",
1593
1593
1594 other = hg.repository(ui, source)
1594 other = hg.repository(ui, source)
1595 ui.status(_('comparing with %s\n') % source)
1595 ui.status(_('comparing with %s\n') % source)
1596 incoming = repo.findincoming(other, force=opts["force"])
1596 revs = None
1597 if opts['rev']:
1598 if 'lookup' in other.capabilities:
1599 revs = [other.lookup(rev) for rev in opts['rev']]
1600 else:
1601 error = _("Other repository doesn't support revision lookup, so a rev cannot be specified.")
1602 raise util.Abort(error)
1603 incoming = repo.findincoming(other, heads=revs, force=opts["force"])
1597 if not incoming:
1604 if not incoming:
1598 try:
1605 try:
1599 os.unlink(opts["bundle"])
1606 os.unlink(opts["bundle"])
@@ -1607,7 +1614,12 def incoming(ui, repo, source="default",
1607 fname = opts["bundle"]
1614 fname = opts["bundle"]
1608 if fname or not other.local():
1615 if fname or not other.local():
1609 # create a bundle (uncompressed if other repo is not local)
1616 # create a bundle (uncompressed if other repo is not local)
1610 cg = other.changegroup(incoming, "incoming")
1617 if revs is None:
1618 cg = other.changegroup(incoming, "incoming")
1619 else:
1620 if 'changegroupsubset' not in other.capabilities:
1621 raise util.Abort(_("Partial incoming cannot be done because other repository doesn't support changegroupsubset."))
1622 cg = other.changegroupsubset(incoming, revs, 'incoming')
1611 bundletype = other.local() and "HG10BZ" or "HG10UN"
1623 bundletype = other.local() and "HG10BZ" or "HG10UN"
1612 fname = cleanup = changegroup.writebundle(cg, fname, bundletype)
1624 fname = cleanup = changegroup.writebundle(cg, fname, bundletype)
1613 # keep written bundle?
1625 # keep written bundle?
@@ -1617,9 +1629,6 def incoming(ui, repo, source="default",
1617 # use the created uncompressed bundlerepo
1629 # use the created uncompressed bundlerepo
1618 other = bundlerepo.bundlerepository(ui, repo.root, fname)
1630 other = bundlerepo.bundlerepository(ui, repo.root, fname)
1619
1631
1620 revs = None
1621 if opts['rev']:
1622 revs = [other.lookup(rev) for rev in opts['rev']]
1623 o = other.changelog.nodesbetween(incoming, revs)[0]
1632 o = other.changelog.nodesbetween(incoming, revs)[0]
1624 if opts['newest_first']:
1633 if opts['newest_first']:
1625 o.reverse()
1634 o.reverse()
@@ -73,6 +73,7 date: Mon Jan 12 13:46:40 1970 +0
73 summary: 3
73 summary: 3
74
74
75 changeset: 4:1f3a964b6022
75 changeset: 4:1f3a964b6022
76 tag: tip
76 user: test
77 user: test
77 date: Mon Jan 12 13:46:40 1970 +0000
78 date: Mon Jan 12 13:46:40 1970 +0000
78 summary: 4
79 summary: 4
General Comments 0
You need to be logged in to leave comments. Login now