comparison src/org/tmatesoft/hg/internal/ManifestRevision.java @ 704:7743a9c10bfa

Merge command introduced
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Wed, 14 Aug 2013 20:07:26 +0200
parents dd4f6311af52
children
comparison
equal deleted inserted replaced
703:7839ff0bfd78 704:7743a9c10bfa
21 import java.util.Collection; 21 import java.util.Collection;
22 import java.util.TreeMap; 22 import java.util.TreeMap;
23 23
24 import org.tmatesoft.hg.core.Nodeid; 24 import org.tmatesoft.hg.core.Nodeid;
25 import org.tmatesoft.hg.repo.HgManifest; 25 import org.tmatesoft.hg.repo.HgManifest;
26 import org.tmatesoft.hg.repo.HgRepository;
26 import org.tmatesoft.hg.util.Convertor; 27 import org.tmatesoft.hg.util.Convertor;
27 import org.tmatesoft.hg.util.Path; 28 import org.tmatesoft.hg.util.Path;
28 29
29 /** 30 /**
30 * Specific revision of the manifest. 31 * Specific revision of the manifest.
48 namesPool = filenamePool; 49 namesPool = filenamePool;
49 idsMap = new TreeMap<Path, Nodeid>(); 50 idsMap = new TreeMap<Path, Nodeid>();
50 flagsMap = new TreeMap<Path, HgManifest.Flags>(); 51 flagsMap = new TreeMap<Path, HgManifest.Flags>();
51 } 52 }
52 53
54 public ManifestRevision init(HgRepository hgRepo, int csetIndex) {
55 hgRepo.getManifest().walk(csetIndex, csetIndex, this);
56 return this;
57 }
58
53 public Collection<Path> files() { 59 public Collection<Path> files() {
54 return idsMap.keySet(); 60 return idsMap.keySet();
61 }
62
63 public boolean contains(Path file) {
64 return idsMap.containsKey(file);
55 } 65 }
56 66
57 public Nodeid nodeid(Path fname) { 67 public Nodeid nodeid(Path fname) {
58 return idsMap.get(fname); 68 return idsMap.get(fname);
59 } 69 }