Mercurial > jhg
diff src/org/tmatesoft/hg/internal/RepositoryComparator.java @ 207:1bf0a5af2d5d
Conditional debug printouts
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Thu, 28 Apr 2011 03:10:56 +0200 |
parents | 63c9fed4369e |
children | 9ce3b26798c4 |
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/internal/RepositoryComparator.java Thu Apr 28 02:47:44 2011 +0200 +++ b/src/org/tmatesoft/hg/internal/RepositoryComparator.java Thu Apr 28 03:10:56 2011 +0200 @@ -307,8 +307,8 @@ } } if (debug) { + System.out.println("calculateMissingBranches:"); for (BranchChain bc : branches2load) { - System.out.println("calculateMissingBranches:"); bc.dump(); } } @@ -456,7 +456,9 @@ // returned sequence of length 1 means we used element from [head-2] as root int numberOfElementsExcludingRootAndHead = de.headIndex + 1; rootIndex = numberOfElementsExcludingRootAndHead + 1; - System.out.printf("On query %d found out exact number of missing elements: %d\n", totalQueries, numberOfElementsExcludingRootAndHead); + if (debug) { + System.out.printf("On query %d found out exact number of missing elements: %d\n", totalQueries, numberOfElementsExcludingRootAndHead); + } } datas.add(de); // queue up to record result and construct further requests } @@ -479,7 +481,9 @@ } fromRootToHead.addFirst(n); // reverse order } - System.out.println("Total queries:" + totalQueries); + if (debug) { + System.out.println("Total queries:" + totalQueries); + } if (!resultOk) { throw new HgBadStateException("See console for details"); // FIXME }