(Arne Babenhauserheide)
2012-10-28: simplify more simplify more
diff --git a/staticsite.py b/staticsite.py
--- a/staticsite.py
+++ b/staticsite.py
@@ -314,7 +314,8 @@ def getoutgoing(ui, repo, otheruri, othe
def cleanupfn():
"""non-operation cleanup function (default)."""
pass
- # cannot do that for ftp or freenet repos
+ # cannot do that for ftp or freenet insertion uris (freenet
+ # separates insertion and retrieval by private/public key)
isftpuri = otheruri.startswith("ftp://")
isfreenetpriv = "AQECAAE/" in otheruri
if isftpuri or isfreenetpriv:
@@ -324,30 +325,21 @@ def getoutgoing(ui, repo, otheruri, othe
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)
- if revs:
- revs = [repo.lookup(rev) for rev in revs]
- other, chlist, cleanupfn = hg.bundlerepo.getremotechanges(ui, other, repo,
- revs, False, False)
+
+ def outgoingchanges(repo, other):
+ from mercurial import discovery
+ fco = discovery.findcommonoutgoing
+ og = fco(repo, other, force=True)
+ return og.missing
+
+ try:
+ chlist = outgoingchanges(repo, other)
except (AttributeError, util.Abort):
other.ui.popbuffer()
other = getlocalother(repo, ui, otheruri, othername)
other.ui.pushbuffer()
+ chlist = outgoingchanges(repo, other)
- 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.ui.popbuffer()
return chlist, cleanupfn, other