Mercurial > jhg
comparison src/org/tmatesoft/hg/repo/HgWorkingCopyStatusCollector.java @ 337:f377f833b780
Issue 17: temporary code to nail down the problem
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Tue, 15 Nov 2011 03:07:28 +0100 |
parents | 15e1961719f2 |
children | a0864b2892cd |
comparison
equal
deleted
inserted
replaced
336:f74e36b7344b | 337:f377f833b780 |
---|---|
28 import java.util.Collections; | 28 import java.util.Collections; |
29 import java.util.NoSuchElementException; | 29 import java.util.NoSuchElementException; |
30 import java.util.Set; | 30 import java.util.Set; |
31 import java.util.TreeSet; | 31 import java.util.TreeSet; |
32 | 32 |
33 import org.tmatesoft.hg.core.HgBadStateException; | |
33 import org.tmatesoft.hg.core.HgDataStreamException; | 34 import org.tmatesoft.hg.core.HgDataStreamException; |
34 import org.tmatesoft.hg.core.HgException; | 35 import org.tmatesoft.hg.core.HgException; |
35 import org.tmatesoft.hg.core.Nodeid; | 36 import org.tmatesoft.hg.core.Nodeid; |
36 import org.tmatesoft.hg.internal.ByteArrayChannel; | 37 import org.tmatesoft.hg.internal.ByteArrayChannel; |
37 import org.tmatesoft.hg.internal.Experimental; | 38 import org.tmatesoft.hg.internal.Experimental; |
269 inspector.modified(fname); | 270 inspector.modified(fname); |
270 } else { | 271 } else { |
271 // size is the same or unknown, and, perhaps, different timestamp | 272 // size is the same or unknown, and, perhaps, different timestamp |
272 // check actual content to avoid false modified files | 273 // check actual content to avoid false modified files |
273 HgDataFile df = repo.getFileNode(fname); | 274 HgDataFile df = repo.getFileNode(fname); |
275 if (!df.exists()) { | |
276 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)); | |
277 throw new HgBadStateException(msg); | |
278 } | |
274 Nodeid rev = getDirstateParentManifest().nodeid(fname); | 279 Nodeid rev = getDirstateParentManifest().nodeid(fname); |
275 // rev might be null here if fname comes to dirstate as a result of a merge operation | 280 // rev might be null here if fname comes to dirstate as a result of a merge operation |
276 // where one of the parents (first parent) had no fname file, but second parent had. | 281 // where one of the parents (first parent) had no fname file, but second parent had. |
277 // E.g. fork revision 3, revision 4 gets .hgtags, few modifications and merge(3,12) | 282 // E.g. fork revision 3, revision 4 gets .hgtags, few modifications and merge(3,12) |
278 // see Issue 14 for details | 283 // see Issue 14 for details |