(Arne Babenhauserheide)
2012-10-28: First version which works with Mercurial 2.4-rc First version which works with Mercurial 2.4-rc
diff --git a/staticsite.py b/staticsite.py
--- a/staticsite.py
+++ b/staticsite.py
@@ -311,18 +311,20 @@ def getincoming(ui, repo, otheruri, othe
return chlist, cleanupfn, other
def getoutgoing(ui, repo, otheruri, other=None, othername=None):
+ def cleanupfn():
+ """non-operation cleanup function (default)."""
+ pass
# cannot do that for ftp or freenet repos
isftpuri = otheruri.startswith("ftp://")
isfreenetpriv = "AQECAAE/" in otheruri
if isftpuri or isfreenetpriv:
chlist = []
- def cleanupfn():
- pass
return chlist, cleanupfn, other
if not other:
other = hg.peer(repo, {}, otheruri)
other.ui.pushbuffer() # ignore ui events
+ from mercurial import discovery
source, branches = hg.parseurl(repo.root, None)
try:
revs, checkout = hg.addbranchrevs(other, repo, branches, None)
@@ -331,13 +333,21 @@ def getoutgoing(ui, repo, otheruri, othe
other, chlist, cleanupfn = hg.bundlerepo.getremotechanges(ui, other, repo,
revs, False, False)
except (AttributeError, util.Abort):
+ other.ui.popbuffer()
other = getlocalother(repo, ui, otheruri, othername)
- revs, checkout = hg.addbranchrevs(other, repo, branches, None)
- if revs:
- revs = [repo.lookup(rev) for rev in revs]
+ other.ui.pushbuffer()
+
+ fco = discovery.findcommonoutgoing
+ og = fco(repo, other, force=True)
+ chlist = og.missing
+
+ #revs, checkout = hg.addbranchrevs(other, repo, branches, None)
+ #if revs:
+ # revs = [repo.lookup(rev) for rev in revs]
+ #
+ #other, chlist, cleanupfn = hg.localrepo.getremotechanges(ui, other, repo,
+ # revs, False, False)
- other, chlist, cleanupfn = hg.bundlerepo.getremotechanges(ui, other, repo,
- revs, False, False)
other.ui.popbuffer()
return chlist, cleanupfn, other