comparison src/org/tmatesoft/hg/repo/HgDataFile.java @ 621:99ad1e3a4e4d

RevlogStream: be aware of existence (not HgDataFile), facilitate use of an added HgDataFile over a commit; Rollback: be more sensitive about file changes (file size is not enough: write/rollback leaves it intact); tests
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Sat, 18 May 2013 22:23:57 +0200
parents 868b2ffdcd5c
children b4948b159ab1
comparison
equal deleted inserted replaced
620:272ecffccc8a 621:99ad1e3a4e4d
73 /*package-local*/HgDataFile(HgRepository hgRepo, Path filePath, RevlogStream content) { 73 /*package-local*/HgDataFile(HgRepository hgRepo, Path filePath, RevlogStream content) {
74 super(hgRepo, content, false); 74 super(hgRepo, content, false);
75 path = filePath; 75 path = filePath;
76 } 76 }
77 77
78 /*package-local*/HgDataFile(HgRepository hgRepo, Path filePath) {
79 super(hgRepo);
80 path = filePath;
81 }
82
83 // exists is not the best name possible. now it means no file with such name was ever known to the repo. 78 // exists is not the best name possible. now it means no file with such name was ever known to the repo.
84 // it might be confused with files existed before but lately removed. TODO HgFileNode.exists makes more sense. 79 // it might be confused with files existed before but lately removed. TODO HgFileNode.exists makes more sense.
85 // or HgDataFile.known() 80 // or HgDataFile.known()
86 public boolean exists() { 81 public boolean exists() {
87 return content != null; // XXX need better impl 82 return content.exists();
88 } 83 }
89 84
90 /** 85 /**
91 * Human-readable file name, i.e. "COPYING", not "store/data/_c_o_p_y_i_n_g.i" 86 * Human-readable file name, i.e. "COPYING", not "store/data/_c_o_p_y_i_n_g.i"
92 */ 87 */