Patchwork [3,of,3,hg-2.5] scmutil: localize and improve 'not under root' message

login
register
mail settings
Submitter Mads Kiilerich
Date Jan. 19, 2013, 12:18 a.m.
Message ID <1687ce05bb5059dc0fdf.1358554713@mk-desktop>
Download mbox | patch
Permalink /patch/684/
State Accepted
Commit 4f9a5285851231cff8223575cf2af09d81db1c0b
Headers show

Comments

Mads Kiilerich - Jan. 19, 2013, 12:18 a.m.
# HG changeset patch
# User Mads Kiilerich <madski@unity3d.com>
# Date 1358468669 -3600
# Node ID 1687ce05bb5059dc0fdf4d1d0cb5ba91c18a85a6
# Parent  fa3d243c80436334fc3a2e230b37ceaf42c53007
scmutil: localize and improve 'not under root' message
Matt Mackall - Jan. 19, 2013, 1:34 a.m.
On Sat, 2013-01-19 at 01:18 +0100, Mads Kiilerich wrote:
> # HG changeset patch
> # User Mads Kiilerich <madski@unity3d.com>
> # Date 1358468669 -3600
> # Node ID 1687ce05bb5059dc0fdf4d1d0cb5ba91c18a85a6
> # Parent  fa3d243c80436334fc3a2e230b37ceaf42c53007
> scmutil: localize and improve 'not under root' message

These are queued for default, thanks.

Patch

diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py
--- a/mercurial/scmutil.py
+++ b/mercurial/scmutil.py
@@ -435,7 +435,7 @@ 
                 break
             name = dirname
 
-        raise util.Abort('%s not under root' % myname)
+        raise util.Abort(_("%s not under root '%s'") % (myname, root))
 
 def walkrepos(path, followsym=False, seen_dirs=None, recurse=False):
     '''yield every hg repository under path, always recursively.
diff --git a/tests/test-globalopts.t b/tests/test-globalopts.t
--- a/tests/test-globalopts.t
+++ b/tests/test-globalopts.t
@@ -87,7 +87,7 @@ 
   abort: no repository found in '$TESTTMP' (.hg not found)!
   [255]
   $ hg -R b ann a/a
-  abort: a/a not under root
+  abort: a/a not under root '$TESTTMP/b'
   [255]
   $ hg log
   abort: no repository found in '$TESTTMP' (.hg not found)!
diff --git a/tests/test-parents.t b/tests/test-parents.t
--- a/tests/test-parents.t
+++ b/tests/test-parents.t
@@ -71,7 +71,7 @@ 
   
 
   $ hg parents -r 2 ../a
-  abort: ../a not under root
+  abort: ../a not under root '$TESTTMP/repo'
   [255]
 
 
diff --git a/tests/test-rename.t b/tests/test-rename.t
--- a/tests/test-rename.t
+++ b/tests/test-rename.t
@@ -593,7 +593,7 @@ 
   [255]
   $ hg status -C
   $ hg rename d1/d11/a1 ../foo
-  abort: ../foo not under root
+  abort: ../foo not under root '$TESTTMP'
   [255]
   $ hg status -C
 
@@ -612,7 +612,7 @@ 
   [255]
   $ hg status -C
   $ hg rename d1/d11/a1 ..
-  abort: ../a1 not under root (glob)
+  abort: ../a1 not under root '$TESTTMP'
   [255]
   $ hg status -C
 
@@ -631,7 +631,7 @@ 
   [255]
   $ hg status -C
   $ (cd d1/d11; hg rename ../../d2/b ../../../foo)
-  abort: ../../../foo not under root
+  abort: ../../../foo not under root '$TESTTMP'
   [255]
   $ hg status -C
 
diff --git a/tests/test-symlinks.t b/tests/test-symlinks.t
--- a/tests/test-symlinks.t
+++ b/tests/test-symlinks.t
@@ -82,7 +82,7 @@ 
 this should fail
 
   $ hg status ../z && { echo hg mistakenly exited with status 0; exit 1; } || :
-  abort: ../z not under root
+  abort: ../z not under root '$TESTTMP/x'
   $ cd ..
 
 
diff --git a/tests/test-walk.t b/tests/test-walk.t
--- a/tests/test-walk.t
+++ b/tests/test-walk.t
@@ -181,10 +181,10 @@ 
   f  mammals/Procyonidae/raccoon     mammals/Procyonidae/raccoon
   f  mammals/skunk                   mammals/skunk
   $ hg debugwalk ..
-  abort: .. not under root
+  abort: .. not under root '$TESTTMP/t'
   [255]
   $ hg debugwalk beans/../..
-  abort: beans/../.. not under root
+  abort: beans/../.. not under root '$TESTTMP/t'
   [255]
   $ hg debugwalk .hg
   abort: path contains illegal component: .hg (glob)
@@ -209,7 +209,7 @@ 
   f  beans/pinto     beans/pinto
   f  beans/turtle    beans/turtle
   $ hg debugwalk `pwd`/..
-  abort: $TESTTMP/t/.. not under root
+  abort: $TESTTMP/t/.. not under root '$TESTTMP/t'
   [255]
 
 Test patterns: