Mercurial > hg4j
comparison src/org/tmatesoft/hg/repo/HgStatusCollector.java @ 135:3959bffb14e9
explicit op name instead math op to get last rev number
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Wed, 16 Feb 2011 22:00:39 +0100 |
parents | 4a948ec83980 |
children | 8248aae33f7d |
comparison
equal
deleted
inserted
replaced
134:afac8ddc5dd2 | 135:3959bffb14e9 |
---|---|
103 } | 103 } |
104 if (inspector instanceof Record) { | 104 if (inspector instanceof Record) { |
105 ((Record) inspector).init(rev1, rev2, this); | 105 ((Record) inspector).init(rev1, rev2, this); |
106 } | 106 } |
107 if (rev1 == TIP) { | 107 if (rev1 == TIP) { |
108 rev1 = repo.getManifest().getRevisionCount() - 1; | 108 rev1 = repo.getManifest().getLastRevision(); |
109 } | 109 } |
110 if (rev2 == TIP) { | 110 if (rev2 == TIP) { |
111 rev2 = repo.getManifest().getRevisionCount() - 1; // XXX add Revlog.tip() func ? | 111 rev2 = repo.getManifest().getLastRevision(); |
112 } | 112 } |
113 // in fact, rev1 and rev2 are often next (or close) to each other, | 113 // in fact, rev1 and rev2 are often next (or close) to each other, |
114 // thus, we can optimize Manifest reads here (manifest.walk(rev1, rev2)) | 114 // thus, we can optimize Manifest reads here (manifest.walk(rev1, rev2)) |
115 ManifestRevisionInspector r1, r2 ; | 115 ManifestRevisionInspector r1, r2 ; |
116 if (!cache.containsKey(rev1) && !cache.containsKey(rev2) && Math.abs(rev1 - rev2) < 5 /*subjective equivalent of 'close enough'*/) { | 116 if (!cache.containsKey(rev1) && !cache.containsKey(rev2) && Math.abs(rev1 - rev2) < 5 /*subjective equivalent of 'close enough'*/) { |