# HG changeset patch # User Benoit Boissinot # Date 1187908756 -7200 # Node ID b0bc8cf41ffc9eba6eda36ea986f56c7abaefa44 # Parent 316ce5e85b3e7893e5e624445d13856261fad284# Parent bddb4ff134c0a258d77a80cee4344a20d78e935b merge with -stable diff -r 316ce5e85b3e -r b0bc8cf41ffc mercurial/httprepo.py --- a/mercurial/httprepo.py Fri Aug 24 00:38:08 2007 +0200 +++ b/mercurial/httprepo.py Fri Aug 24 00:39:16 2007 +0200 @@ -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))) diff -r 316ce5e85b3e -r b0bc8cf41ffc mercurial/localrepo.py --- a/mercurial/localrepo.py Fri Aug 24 00:38:08 2007 +0200 +++ b/mercurial/localrepo.py Fri Aug 24 00:39:16 2007 +0200 @@ -151,6 +151,8 @@ except revlog.LookupError: pass fp = self.wfile('.hgtags', 'wb') + if prevtags: + fp.write(prevtags) # committed tags are stored in UTF-8 writetag(fp, name, util.fromlocal, prevtags) diff -r 316ce5e85b3e -r b0bc8cf41ffc mercurial/sshrepo.py --- a/mercurial/sshrepo.py Fri Aug 24 00:38:08 2007 +0200 +++ b/mercurial/sshrepo.py Fri Aug 24 00:39:16 2007 +0200 @@ -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_(hg.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): diff -r 316ce5e85b3e -r b0bc8cf41ffc mercurial/util.py --- a/mercurial/util.py Fri Aug 24 00:38:08 2007 +0200 +++ b/mercurial/util.py Fri Aug 24 00:39:16 2007 +0200 @@ -476,6 +476,15 @@ try: pat = '(?:%s)' % '|'.join([regex(k, p, tail) for (k, p) in pats]) return re.compile(pat).match + except OverflowError: + # We're using a Python with a tiny regex engine and we + # made it explode, so we'll divide the pattern list in two + # until it works + l = len(pats) + if l < 2: + raise + a, b = matchfn(pats[:l/2], tail), matchfn(pats[l/2:], tail) + return lambda s: a(s) or b(s) except re.error: for k, p in pats: try: diff -r 316ce5e85b3e -r b0bc8cf41ffc tests/run-tests.py --- a/tests/run-tests.py Fri Aug 24 00:38:08 2007 +0200 +++ b/tests/run-tests.py Fri Aug 24 00:39:16 2007 +0200 @@ -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: