Mercurial > hg4j
comparison src/org/tmatesoft/hg/repo/HgManifest.java @ 601:8143c1f77d45
Remove debug timestamps
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Mon, 06 May 2013 17:10:46 +0200 |
parents | 46f29b73e51e |
children | 66f1cc23b906 |
comparison
equal
deleted
inserted
replaced
600:46f29b73e51e | 601:8143c1f77d45 |
---|---|
664 if (changelog2manifest[i] == BAD_REVISION) { | 664 if (changelog2manifest[i] == BAD_REVISION) { |
665 undefinedChangelogRevision.add(i); | 665 undefinedChangelogRevision.add(i); |
666 } | 666 } |
667 } | 667 } |
668 if (undefinedChangelogRevision.size() > 0) { | 668 if (undefinedChangelogRevision.size() > 0) { |
669 final long t1 = System.nanoTime(); | |
670 final IntMap<Nodeid> missingCsetToManifest = new IntMap<Nodeid>(undefinedChangelogRevision.size()); | 669 final IntMap<Nodeid> missingCsetToManifest = new IntMap<Nodeid>(undefinedChangelogRevision.size()); |
671 int[] undefinedClogRevs = undefinedChangelogRevision.toArray(); | 670 int[] undefinedClogRevs = undefinedChangelogRevision.toArray(); |
672 // undefinedChangelogRevision is sorted by the nature it's created | 671 // undefinedChangelogRevision is sorted by the nature it's created |
673 HgManifest.this.getRepo().getChangelog().rangeInternal(new HgChangelog.Inspector() { | 672 HgManifest.this.getRepo().getChangelog().rangeInternal(new HgChangelog.Inspector() { |
674 | 673 |
675 public void next(int revisionIndex, Nodeid nodeid, RawChangeset cset) { | 674 public void next(int revisionIndex, Nodeid nodeid, RawChangeset cset) { |
676 missingCsetToManifest.put(revisionIndex, cset.manifest()); | 675 missingCsetToManifest.put(revisionIndex, cset.manifest()); |
677 } | 676 } |
678 }, undefinedClogRevs); | 677 }, undefinedClogRevs); |
679 assert missingCsetToManifest.size() == undefinedChangelogRevision.size(); | 678 assert missingCsetToManifest.size() == undefinedChangelogRevision.size(); |
680 final long t2 = System.nanoTime(); | |
681 for (int u : undefinedClogRevs) { | 679 for (int u : undefinedClogRevs) { |
682 Nodeid manifest = missingCsetToManifest.get(u); | 680 Nodeid manifest = missingCsetToManifest.get(u); |
683 if (manifest == null || manifest.isNull()) { | 681 if (manifest == null || manifest.isNull()) { |
684 HgManifest.this.getRepo().getSessionContext().getLog().dump(getClass(), Severity.Warn, "Changeset %d has no associated manifest entry", u); | 682 HgManifest.this.getRepo().getSessionContext().getLog().dump(getClass(), Severity.Warn, "Changeset %d has no associated manifest entry", u); |
685 // keep BAD_REVISION in the changelog2manifest map. | 683 // keep BAD_REVISION in the changelog2manifest map. |
694 changelog2manifest[u] = manifestRevIndex; | 692 changelog2manifest[u] = manifestRevIndex; |
695 } else { | 693 } else { |
696 changelog2manifest[u] = HgManifest.this.getRevisionIndex(manifest); | 694 changelog2manifest[u] = HgManifest.this.getRevisionIndex(manifest); |
697 } | 695 } |
698 } | 696 } |
699 final long t3 = System.nanoTime(); | |
700 System.out.printf("\tRevisionMapper#finish(), %d missing revs: %d + %d us\n", undefinedChangelogRevision.size(), (t2-t1) / 1000, (t3-t2) / 1000); | |
701 } | 697 } |
702 } | 698 } |
703 } | 699 } |
704 | 700 |
705 /** | 701 /** |