Merge with crew-stable
authorAlexis S. L. Carvalho <alexis@cecm.usp.br>
Fri, 17 Aug 2007 23:20:13 -0300
changeset 5196 86e95b93559a
parent 5195 33015dac5df5 (current diff)
parent 5190 6d5ed61c508c (diff)
child 5197 55860a45bbf2
Merge with crew-stable
mercurial/httprepo.py
mercurial/sshrepo.py
--- a/mercurial/httprepo.py	Fri Aug 17 20:18:05 2007 -0300
+++ b/mercurial/httprepo.py	Fri Aug 17 23:20:13 2007 -0300
@@ -253,7 +253,7 @@
         if user:
             ui.debug(_('http auth: user %s, password %s\n') %
                      (user, passwd and '*' * len(passwd) or 'not set'))
-            passmgr.add_password(None, host, user, passwd or '')
+            passmgr.add_password(None, self._url, user, passwd or '')
 
         handlers.extend((urllib2.HTTPBasicAuthHandler(passmgr),
                          httpdigestauthhandler(passmgr)))
--- a/mercurial/sshrepo.py	Fri Aug 17 20:18:05 2007 -0300
+++ b/mercurial/sshrepo.py	Fri Aug 17 23:20:13 2007 -0300
@@ -175,6 +175,7 @@
     def unbundle(self, cg, heads, source):
         d = self.call("unbundle", heads=' '.join(map(hex, heads)))
         if d:
+            # remote may send "unsynced changes"
             self.raise_(repo.RepoError(_("push refused: %s") % d))
 
         while 1:
@@ -188,14 +189,15 @@
         self.pipeo.flush()
 
         self.readerr()
-        d = self.pipei.readline()
-        if d != '\n':
-            return 1
-
         l = int(self.pipei.readline())
         r = self.pipei.read(l)
-        if not r:
-            return 1
+        if r:
+            # remote may send "unsynced changes"
+            self.raise_(hg.RepoError(_("push failed: %s") % r))
+
+        self.readerr()
+        l = int(self.pipei.readline())
+        r = self.pipei.read(l)
         return int(r)
 
     def addchangegroup(self, cg, source, url):
--- a/tests/run-tests.py	Fri Aug 17 20:18:05 2007 -0300
+++ b/tests/run-tests.py	Fri Aug 17 23:20:13 2007 -0300
@@ -136,8 +136,9 @@
 
     os.chdir("..") # Get back to hg root
     cmd = ('%s setup.py clean --all'
-           ' install --force --home="%s" --install-lib="%s" >%s 2>&1'
-           % (sys.executable, INST, PYTHONDIR, installerrs))
+           ' install --force --home="%s" --install-lib="%s"'
+           ' --install-scripts="%s" >%s 2>&1'
+           % (sys.executable, INST, PYTHONDIR, BINDIR, installerrs))
     vlog("# Running", cmd)
     if os.system(cmd) == 0:
         if not verbose: