comparison src/org/tmatesoft/hg/repo/HgWorkingCopyStatusCollector.java @ 493:ba36f66c32b4

Refactor to keep knowledge about repository control files and their location in respect to .hg/ in a single place (facilitate future adoption of shared repositories)
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Thu, 18 Oct 2012 18:36:13 +0200
parents b3c16d1aede0
children c1c8f6859d3f
comparison
equal deleted inserted replaced
492:e4eaa23e3442 493:ba36f66c32b4
348 // flags modified, no need to do expensive content check 348 // flags modified, no need to do expensive content check
349 inspector.modified(fname); 349 inspector.modified(fname);
350 } else { 350 } else {
351 HgDataFile df = repo.getFileNode(fname); 351 HgDataFile df = repo.getFileNode(fname);
352 if (!df.exists()) { 352 if (!df.exists()) {
353 String msg = String.format("File %s known as normal in dirstate (%d, %d), doesn't exist at %s", fname, r.modificationTime(), r.size(), repo.getStoragePath(df)); 353 // TODO pass Internals right into HgWCSC cons
354 Internals implRepo = HgInternals.getImplementationRepo(repo);
355 String msg = String.format("File %s known as normal in dirstate (%d, %d), doesn't exist at %s", fname, r.modificationTime(), r.size(), implRepo.getStoragePath(df));
354 throw new HgInvalidFileException(msg, null).setFileName(fname); 356 throw new HgInvalidFileException(msg, null).setFileName(fname);
355 } 357 }
356 Nodeid rev = getDirstateParentManifest().nodeid(fname); 358 Nodeid rev = getDirstateParentManifest().nodeid(fname);
357 // rev might be null here if fname comes to dirstate as a result of a merge operation 359 // rev might be null here if fname comes to dirstate as a result of a merge operation
358 // where one of the parents (first parent) had no fname file, but second parent had. 360 // where one of the parents (first parent) had no fname file, but second parent had.