Unnecessary parameter --ignore removed from appropriate status commands.

*If there are a lot of ignored files we try to parse each and it may be slow.
This commit is contained in:
Nadya Zabrodina
2014-01-24 12:02:23 +04:00
parent e0f86d52db
commit 1c85aca8ef
2 changed files with 7 additions and 5 deletions
@@ -268,7 +268,7 @@ public class HgRegularUpdater implements HgUpdater {
if (parentAfterUpdate.equals(parentBeforeUpdate)) { // nothing to update => returning not to capture local uncommitted changes
return;
}
HgStatusCommand statusCommand = new HgStatusCommand.Builder(true).baseRevision(parentBeforeUpdate).targetRevision(
HgStatusCommand statusCommand = new HgStatusCommand.Builder(true).ignored(false).unknown(false).baseRevision(parentBeforeUpdate).targetRevision(
parentAfterUpdate).build(project);
Set<HgChange> changes = statusCommand.execute(repo);
for (HgChange change : changes) {
@@ -470,13 +470,15 @@ public abstract class HgUtil {
if (rev1 != null) {
revNumber1 = rev1.getRevisionNumber();
//rev2==null means "compare with local version"
statusCommand = new HgStatusCommand.Builder(true).copySource(false).baseRevision(revNumber1)
statusCommand = new HgStatusCommand.Builder(true).ignored(false).unknown(false).copySource(false).baseRevision(revNumber1)
.targetRevision(rev2 != null ? rev2.getRevisionNumber() : null).build(project);
}
else {
LOG.assertTrue(rev2 != null, "revision1 and revision2 can't both be null. Path: " + path); //rev1 and rev2 can't be null both//
//get initial changes//
statusCommand = new HgStatusCommand.Builder(true).copySource(false).baseRevision(rev2.getRevisionNumber()).build(project);
statusCommand =
new HgStatusCommand.Builder(true).ignored(false).unknown(false).copySource(false).baseRevision(rev2.getRevisionNumber())
.build(project);
}
Collection<HgChange> hgChanges = statusCommand.execute(root, Collections.singleton(path));
@@ -484,11 +486,11 @@ public abstract class HgUtil {
//convert output changes to standart Change class
for (HgChange hgChange : hgChanges) {
FileStatus status = convertHgDiffStatus(hgChange.getStatus());
if (status != FileStatus.UNKNOWN && status!= FileStatus.IGNORED) {
if (status != FileStatus.UNKNOWN) {
changes.add(createChange(project, root, hgChange.beforeFile().getRelativePath(), revNumber1,
hgChange.afterFile().getRelativePath(),
rev2 != null ? rev2.getRevisionNumber() : null, status));
}
}
}
return changes;
}