Lines 232-247
public class MercurialInterceptor extend
Link Here
|
232 |
|
232 |
|
233 |
RequestProcessor rp = hg.getRequestProcessor(root.getAbsolutePath()); |
233 |
RequestProcessor rp = hg.getRequestProcessor(root.getAbsolutePath()); |
234 |
|
234 |
|
|
|
235 |
Mercurial.LOG.log(Level.FINE, "hgMoveImplementation(): File: {0} {1}", new Object[] {srcFile, dstFile}); // NOI18N |
236 |
|
237 |
if (srcFile.isDirectory()) { |
238 |
srcFile.renameTo(dstFile); |
239 |
} |
235 |
Runnable moveImpl = new Runnable() { |
240 |
Runnable moveImpl = new Runnable() { |
236 |
public void run() { |
241 |
public void run() { |
237 |
try { |
242 |
try { |
238 |
if (srcFile.isDirectory()) { |
243 |
if (dstFile.isDirectory()) { |
239 |
srcFile.renameTo(dstFile); |
|
|
240 |
HgCommand.doRenameAfter(root, srcFile, dstFile); |
244 |
HgCommand.doRenameAfter(root, srcFile, dstFile); |
241 |
return; |
245 |
return; |
242 |
} |
246 |
} |
243 |
int status = hg.getFileStatusCache().getStatus(srcFile).getStatus(); |
247 |
int status = hg.getFileStatusCache().getStatus(srcFile).getStatus(); |
244 |
if (status == FileInformation.STATUS_NOTVERSIONED_NEWLOCALLY) { |
248 |
Mercurial.LOG.log(Level.FINE, "hgMoveImplementation(): Status: {0} {1}", new Object[] {srcFile, status}); // NOI18N |
|
|
249 |
if (status == FileInformation.STATUS_NOTVERSIONED_NEWLOCALLY || |
250 |
status == FileInformation.STATUS_NOTVERSIONED_EXCLUDED) { |
245 |
srcFile.renameTo(dstFile); |
251 |
srcFile.renameTo(dstFile); |
246 |
} else if (status == FileInformation.STATUS_VERSIONED_ADDEDLOCALLY) { |
252 |
} else if (status == FileInformation.STATUS_VERSIONED_ADDEDLOCALLY) { |
247 |
srcFile.renameTo(dstFile); |
253 |
srcFile.renameTo(dstFile); |
Lines 256-262
public class MercurialInterceptor extend
Link Here
|
256 |
} |
262 |
} |
257 |
}; |
263 |
}; |
258 |
|
264 |
|
259 |
rp.post(moveImpl).waitFinished(); |
265 |
rp.post(moveImpl); |
260 |
} |
266 |
} |
261 |
|
267 |
|
262 |
public void afterMove(final File from, final File to) { |
268 |
public void afterMove(final File from, final File to) { |
Lines 340-345
public class MercurialInterceptor extend
Link Here
|
340 |
HgProgressSupport supportCreate = new HgProgressSupport() { |
346 |
HgProgressSupport supportCreate = new HgProgressSupport() { |
341 |
public void perform() { |
347 |
public void perform() { |
342 |
Mercurial.LOG.log(Level.FINE, "fileChangedImpl(): File: {0}", file); // NOI18N |
348 |
Mercurial.LOG.log(Level.FINE, "fileChangedImpl(): File: {0}", file); // NOI18N |
|
|
349 |
// There is no point in refreshing the cache for ignored files. |
350 |
if (!HgUtils.isIgnored(file, false)) { |
351 |
cache.refresh(file, FileStatusCache.REPOSITORY_STATUS_UNKNOWN); |
352 |
} |
353 |
|
343 |
cache.refresh(file, FileStatusCache.REPOSITORY_STATUS_UNKNOWN); |
354 |
cache.refresh(file, FileStatusCache.REPOSITORY_STATUS_UNKNOWN); |
344 |
} |
355 |
} |
345 |
}; |
356 |
}; |