comparison src/org/tmatesoft/hg/repo/HgDataFile.java @ 426:063b0663495a

HgManifest#getFileRevisions refactored into #walkFileRevisions to match pattern throught rest of the library
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Wed, 28 Mar 2012 19:34:37 +0200
parents 48f993aa2f41
children 32184ddcf46d
comparison
equal deleted inserted replaced
425:48f993aa2f41 426:063b0663495a
56 * come handy. 56 * come handy.
57 * 57 *
58 * @author Artem Tikhomirov 58 * @author Artem Tikhomirov
59 * @author TMate Software Ltd. 59 * @author TMate Software Ltd.
60 */ 60 */
61 public class HgDataFile extends Revlog { 61 public final class HgDataFile extends Revlog {
62 62
63 // absolute from repo root? 63 // absolute from repo root?
64 // slashes, unix-style? 64 // slashes, unix-style?
65 // repo location agnostic, just to give info to user, not to access real storage 65 // repo location agnostic, just to give info to user, not to access real storage
66 private final Path path; 66 private final Path path;
75 super(hgRepo); 75 super(hgRepo);
76 path = filePath; 76 path = filePath;
77 } 77 }
78 78
79 // exists is not the best name possible. now it means no file with such name was ever known to the repo. 79 // exists is not the best name possible. now it means no file with such name was ever known to the repo.
80 // it might be confused with files existed before but lately removed. 80 // it might be confused with files existed before but lately removed. TODO HgFileNode.exists makes more sense.
81 // or HgDataFile.known()
81 public boolean exists() { 82 public boolean exists() {
82 return content != null; // XXX need better impl 83 return content != null; // XXX need better impl
83 } 84 }
84 85
85 // human-readable (i.e. "COPYING", not "store/data/_c_o_p_y_i_n_g.i") 86 /**
87 * Human-readable file name, i.e. "COPYING", not "store/data/_c_o_p_y_i_n_g.i"
88 */
86 public Path getPath() { 89 public Path getPath() {
87 return path; // hgRepo.backresolve(this) -> name? In this case, what about hashed long names? 90 return path; // hgRepo.backresolve(this) -> name? In this case, what about hashed long names?
88 } 91 }
89 92
90 /** 93 /**