diff --git a/mercurial/util.py b/mercurial/util.py --- a/mercurial/util.py +++ b/mercurial/util.py @@ -530,7 +530,8 @@ class path_auditor(object): if p in lparts[1:]: pos = lparts.index(p) base = os.path.join(*parts[:pos]) - raise Abort(_('path %r is inside repo %r') % (path, base)) + raise Abort(_('path %r is inside nested repo %r') + % (path, base)) def check(prefix): curpath = os.path.join(self.root, prefix) try: @@ -547,7 +548,7 @@ class path_auditor(object): elif (stat.S_ISDIR(st.st_mode) and os.path.isdir(os.path.join(curpath, '.hg'))): if not self.callback or not self.callback(curpath): - raise Abort(_('path %r is inside repo %r') % + raise Abort(_('path %r is inside nested repo %r') % (path, prefix)) parts.pop() prefixes = [] diff --git a/tests/test-audit-path.t b/tests/test-audit-path.t --- a/tests/test-audit-path.t +++ b/tests/test-audit-path.t @@ -53,7 +53,7 @@ attack foo/.hg/test $ hg manifest -r1 foo/.hg/test $ hg update -Cr1 - abort: path 'foo/.hg/test' is inside repo 'foo' + abort: path 'foo/.hg/test' is inside nested repo 'foo' [255] attack back/test where back symlinks to .. diff --git a/tests/test-nested-repo.t b/tests/test-nested-repo.t --- a/tests/test-nested-repo.t +++ b/tests/test-nested-repo.t @@ -11,16 +11,16 @@ Should print nothing: Should fail: $ hg st b/x - abort: path 'b/x' is inside repo 'b' + abort: path 'b/x' is inside nested repo 'b' [255] $ hg add b/x - abort: path 'b/x' is inside repo 'b' + abort: path 'b/x' is inside nested repo 'b' [255] Should fail: $ hg add b b/x - abort: path 'b/x' is inside repo 'b' + abort: path 'b/x' is inside nested repo 'b' [255] $ hg st @@ -34,7 +34,7 @@ Should arguably print nothing: Should fail: $ hg mv a b - abort: path 'b/a' is inside repo 'b' + abort: path 'b/a' is inside nested repo 'b' [255] $ hg st diff --git a/tests/test-walk.t b/tests/test-walk.t --- a/tests/test-walk.t +++ b/tests/test-walk.t @@ -159,7 +159,7 @@ f mammals/Procyonidae/raccoon Procyonidae/raccoon f mammals/skunk skunk $ hg debugwalk .hg - abort: path 'mammals/.hg' is inside repo 'mammals' + abort: path 'mammals/.hg' is inside nested repo 'mammals' [255] $ hg debugwalk ../.hg abort: path contains illegal component: .hg @@ -203,7 +203,7 @@ abort: path contains illegal component: .hg/data [255] $ hg debugwalk beans/.hg - abort: path 'beans/.hg' is inside repo 'beans' + abort: path 'beans/.hg' is inside nested repo 'beans' [255] Test absolute paths: