# HG changeset patch # User Matt Mackall # Date 2011-09-13 04:02:45 # Node ID bfe903b1ff4eaa081ff4374b6d3744a0936b928e # Parent adad8d68fb1f0cdebb1b6acd717b13dd500a3935 # Parent 31c9e2a702d128c5d0e2aa35eaa8cf5434029910 merge with stable diff --git a/mercurial/patch.py b/mercurial/patch.py --- a/mercurial/patch.py +++ b/mercurial/patch.py @@ -1199,7 +1199,7 @@ def iterhunks(fp): m = gitre.match(x) if not m: continue - if gitpatches is None: + if not gitpatches: # scan whole input for git metadata gitpatches = [('a/' + gp.path, 'b/' + gp.path, gp) for gp in scangitpatch(lr, x)] diff --git a/mercurial/ui.py b/mercurial/ui.py --- a/mercurial/ui.py +++ b/mercurial/ui.py @@ -667,9 +667,9 @@ class ui(object): printed.''' if self.tracebackflag: if exc: - traceback.print_exception(exc[0], exc[1], exc[2]) + traceback.print_exception(exc[0], exc[1], exc[2], file=self.ferr) else: - traceback.print_exc() + traceback.print_exc(file=self.ferr) return self.tracebackflag def geteditor(self): diff --git a/tests/test-setdiscovery.t b/tests/test-setdiscovery.t --- a/tests/test-setdiscovery.t +++ b/tests/test-setdiscovery.t @@ -288,7 +288,7 @@ One with >200 heads, which used to use u reading DAG from stdin $ hg heads -t --template . | wc -c - 261 + *261 (re) $ hg clone -b a . a adding changesets