Mercurial > hg4j
diff src/org/tmatesoft/hg/util/FileWalker.java @ 461:613c883e360e
Do not walk into nested repositories at all, ignore not only .hg but whole nested repo
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Wed, 20 Jun 2012 16:51:18 +0200 |
parents | 48f993aa2f41 |
children | bd5926e24aa3 |
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/util/FileWalker.java Wed Jun 20 16:49:43 2012 +0200 +++ b/src/org/tmatesoft/hg/util/FileWalker.java Wed Jun 20 16:51:18 2012 +0200 @@ -130,7 +130,11 @@ continue; } if (isDir) { - if (!".hg/".equals(path.toString())) { + // do not dive into <repo>/.hg and + // if there's .hg/ under f/, it's a nested repository, which shall not be walked into + if (".hg".equals(f.getName()) || new File(f, ".hg").isDirectory()) { + continue; + } else { dirQueue.addLast(f); } } else {