diff mercurial/bundlerepo.py @ 18138:8ab0640c3090 stable

bundlerepo: don't return the peer without bundlerepo from getremotechanges Problem: getremotechanges would return the 'other' repo if nothing was incoming and there thus wasn't any bundle to base the repo on. The 'other' could be a http peer which only implement the functionality available over the http protocol. Transplant could thus fail with TypeError: argument of type 'httppeer' is not iterable Solution: Return the local repo instead of the remote peer if there is no reason to place a bundlerepo on top of the local repo.
author Mads Kiilerich <madski@unity3d.com>
date Fri, 28 Dec 2012 11:16:01 +0100
parents 1d710fe5ee0e
children 11d1a9143adb
line wrap: on
line diff
--- a/mercurial/bundlerepo.py	Mon Dec 24 13:26:13 2012 +0100
+++ b/mercurial/bundlerepo.py	Fri Dec 28 11:16:01 2012 +0100
@@ -347,7 +347,7 @@
                 os.unlink(bundlename)
         except OSError:
             pass
-        return other, [], other.close
+        return repo, [], other.close
 
     bundle = None
     bundlerepo = None