# HG changeset patch # User Matt Mackall # Date 1236207736 21600 # Node ID 346fafc144fc159cc5a8e3c1840b7e1d22658102 # Parent 14b703252f1407f0e9293af5aa03b75b489ae854 audit: be even pickier (issue1450) diff -r 14b703252f14 -r 346fafc144fc mercurial/util.py --- a/mercurial/util.py Thu Feb 12 09:36:15 2009 -0700 +++ b/mercurial/util.py Wed Mar 04 17:02:16 2009 -0600 @@ -822,7 +822,7 @@ if '.hg' in path.lower(): lparts = [p.lower() for p in parts] for p in '.hg', '.hg.': - if p in lparts[1:-1]: + 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)) diff -r 14b703252f14 -r 346fafc144fc tests/test-walk.out --- a/tests/test-walk.out Thu Feb 12 09:36:15 2009 -0700 +++ b/tests/test-walk.out Wed Mar 04 17:02:16 2009 -0600 @@ -159,7 +159,7 @@ f mammals/skunk skunk hg debugwalk .hg -.hg: No such file or directory +abort: path 'mammals/.hg' is inside repo 'mammals' hg debugwalk ../.hg abort: path contains illegal component: .hg @@ -208,7 +208,7 @@ abort: path contains illegal component: .hg/data hg debugwalk beans/.hg -beans/.hg: No such file or directory +abort: path 'beans/.hg' is inside repo 'beans' hg debugwalk glob:* f fennel fennel