# HG changeset patch # User Thomas Arendsen Hein # Date 1181388354 -7200 # Node ID 36abb07c79d4ea808f2145f9a4d3e13ade9296be # Parent c3a78a49d7f02f3526383b5d3584b64be5e676dd Removed trailing \n in calls to util.Abort() diff --git a/mercurial/util.py b/mercurial/util.py --- a/mercurial/util.py +++ b/mercurial/util.py @@ -77,7 +77,7 @@ def localsub(s, a, b=None): return u.encode(_encoding, _encodingmode) except UnicodeDecodeError, inst: sub = s[max(0, inst.start-10), inst.start+10] - raise Abort(_("decoding near '%s': %s!\n") % (sub, inst)) + raise Abort(_("decoding near '%s': %s!") % (sub, inst)) # used by parsedate defaultdateformats = ( @@ -650,7 +650,7 @@ def audit_path(path): parts = os.path.normcase(path).split(os.sep) if (os.path.splitdrive(path)[0] or parts[0] in ('.hg', '') or os.pardir in parts): - raise Abort(_("path contains illegal component: %s\n") % path) + raise Abort(_("path contains illegal component: %s") % path) def _makelock_file(info, pathname): ld = os.open(pathname, os.O_CREAT | os.O_WRONLY | os.O_EXCL) diff --git a/tests/test-rename.out b/tests/test-rename.out --- a/tests/test-rename.out +++ b/tests/test-rename.out @@ -284,19 +284,14 @@ M d1/b 1 files updated, 0 files merged, 0 files removed, 0 files unresolved # check illegal path components abort: path contains illegal component: .hg/foo - abort: ../foo not under root abort: path contains illegal component: .hg/foo - ! d1/d11/a1 1 files updated, 0 files merged, 0 files removed, 0 files unresolved abort: path contains illegal component: .hg/a1 - abort: ../a1 not under root abort: path contains illegal component: .hg/a1 - ! d1/d11/a1 1 files updated, 0 files merged, 0 files removed, 0 files unresolved abort: path contains illegal component: .hg/foo - abort: ../../../foo not under root diff --git a/tests/test-walk.out b/tests/test-walk.out --- a/tests/test-walk.out +++ b/tests/test-walk.out @@ -164,7 +164,6 @@ hg debugwalk .hg hg debugwalk ../.hg abort: path contains illegal component: .hg - cd .. hg debugwalk -Ibeans @@ -197,15 +196,12 @@ abort: beans/../.. not under root hg debugwalk .hg abort: path contains illegal component: .hg - hg debugwalk beans/../.hg abort: path contains illegal component: .hg - hg debugwalk beans/../.hg/data abort: path contains illegal component: .hg/data - hg debugwalk beans/.hg beans/.hg: No such file or directory