Mercurial > jhg
comparison src/org/tmatesoft/hg/repo/HgWorkingCopyStatusCollector.java @ 294:32890bab7209
Issue 13: Report filenames as they are known in repository rather than from file system
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Wed, 14 Sep 2011 04:41:57 +0200 |
parents | 9774f47d904d |
children | 981f9f50bb6c |
comparison
equal
deleted
inserted
replaced
293:9774f47d904d | 294:32890bab7209 |
---|---|
173 if (!f.exists()) { | 173 if (!f.exists()) { |
174 // file coming from iterator doesn't exist. | 174 // file coming from iterator doesn't exist. |
175 if ((knownInDirstate = ds.known(fname)) != null) { | 175 if ((knownInDirstate = ds.known(fname)) != null) { |
176 // found in dirstate | 176 // found in dirstate |
177 processed.add(knownInDirstate); | 177 processed.add(knownInDirstate); |
178 if (ds.checkRemoved(fname) == null) { | 178 if (ds.checkRemoved(knownInDirstate) == null) { |
179 inspector.missing(fname); | 179 inspector.missing(knownInDirstate); |
180 } else { | 180 } else { |
181 inspector.removed(fname); | 181 inspector.removed(knownInDirstate); |
182 } | 182 } |
183 // do not report it as removed later | 183 // do not report it as removed later |
184 if (collect != null) { | 184 if (collect != null) { |
185 baseRevFiles.remove(fname); | 185 baseRevFiles.remove(knownInDirstate); |
186 } | 186 } |
187 } else { | 187 } else { |
188 // chances are it was known in baseRevision. We may rely | 188 // chances are it was known in baseRevision. We may rely |
189 // that later iteration over baseRevFiles leftovers would yield correct Removed, | 189 // that later iteration over baseRevFiles leftovers would yield correct Removed, |
190 // but it doesn't hurt to be explicit (provided we know fname *is* inScope of the FileIterator | 190 // but it doesn't hurt to be explicit (provided we know fname *is* inScope of the FileIterator |
205 if ((knownInDirstate = ds.known(fname)) != null) { | 205 if ((knownInDirstate = ds.known(fname)) != null) { |
206 // tracked file. | 206 // tracked file. |
207 // modified, added, removed, clean | 207 // modified, added, removed, clean |
208 processed.add(knownInDirstate); | 208 processed.add(knownInDirstate); |
209 if (collect != null) { // need to check against base revision, not FS file | 209 if (collect != null) { // need to check against base revision, not FS file |
210 checkLocalStatusAgainstBaseRevision(baseRevFiles, collect, baseRevision, fname, f, inspector); | 210 checkLocalStatusAgainstBaseRevision(baseRevFiles, collect, baseRevision, knownInDirstate, f, inspector); |
211 } else { | 211 } else { |
212 checkLocalStatusAgainstFile(fname, f, inspector); | 212 checkLocalStatusAgainstFile(knownInDirstate, f, inspector); |
213 } | 213 } |
214 } else { | 214 } else { |
215 if (hgIgnore.isIgnored(fname)) { // hgignore shall be consulted only for non-tracked files | 215 if (hgIgnore.isIgnored(fname)) { // hgignore shall be consulted only for non-tracked files |
216 inspector.ignored(fname); | 216 inspector.ignored(fname); |
217 } else { | 217 } else { |