Mercurial > jhg
comparison src/org/tmatesoft/hg/repo/HgMergeState.java @ 367:2fadf8695f8a
Use 'revision index' instead of the vague 'local revision number' concept in the API
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Fri, 16 Dec 2011 15:37:27 +0100 |
parents | a0864b2892cd |
children | ee8264d80747 |
comparison
equal
deleted
inserted
replaced
366:189dc6dc1c3e | 367:2fadf8695f8a |
---|---|
112 // latter is pool that can create objects on demand, former is just cache | 112 // latter is pool that can create objects on demand, former is just cache |
113 PathPool pathPool = new PathPool(new PathRewrite.Empty()); | 113 PathPool pathPool = new PathPool(new PathRewrite.Empty()); |
114 final ManifestRevision m1 = new ManifestRevision(nodeidPool, fnamePool); | 114 final ManifestRevision m1 = new ManifestRevision(nodeidPool, fnamePool); |
115 final ManifestRevision m2 = new ManifestRevision(nodeidPool, fnamePool); | 115 final ManifestRevision m2 = new ManifestRevision(nodeidPool, fnamePool); |
116 if (!wcp2.isNull()) { | 116 if (!wcp2.isNull()) { |
117 final int rp2 = repo.getChangelog().getLocalRevision(wcp2); | 117 final int rp2 = repo.getChangelog().getRevisionIndex(wcp2); |
118 repo.getManifest().walk(rp2, rp2, m2); | 118 repo.getManifest().walk(rp2, rp2, m2); |
119 } | 119 } |
120 BufferedReader br = new BufferedReader(new FileReader(f)); | 120 BufferedReader br = new BufferedReader(new FileReader(f)); |
121 String s = br.readLine(); | 121 String s = br.readLine(); |
122 stateParent = nodeidPool.unify(Nodeid.fromAscii(s)); | 122 stateParent = nodeidPool.unify(Nodeid.fromAscii(s)); |
123 final int rp1 = repo.getChangelog().getLocalRevision(stateParent); | 123 final int rp1 = repo.getChangelog().getRevisionIndex(stateParent); |
124 repo.getManifest().walk(rp1, rp1, m1); | 124 repo.getManifest().walk(rp1, rp1, m1); |
125 while ((s = br.readLine()) != null) { | 125 while ((s = br.readLine()) != null) { |
126 String[] r = s.split("\\00"); | 126 String[] r = s.split("\\00"); |
127 Path p1fname = pathPool.path(r[3]); | 127 Path p1fname = pathPool.path(r[3]); |
128 Nodeid nidP1 = m1.nodeid(p1fname); | 128 Nodeid nidP1 = m1.nodeid(p1fname); |