LUCENE-5385: further optimize "fake check" to be as cheap as possible

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1556046 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Uwe Schindler 2014-01-06 21:56:47 +00:00
parent 5efc4132f1
commit d904c950b8
1 changed files with 6 additions and 4 deletions

View File

@ -115,13 +115,11 @@
File basedir = new File(project.getProperty('basedir')).getAbsoluteFile();
int baseLen = basedir.toString().length();
def convertRelative = {
file -> '.' + file.getAbsolutePath().substring(baseLen).replace(File.separatorChar, (char)'/');
}
// do some fake check, to verify if this is valid SVN working copy. If this fails ignore checks but log some useful message.
task.log('Initializing working copy...');
try {
statusClient.doStatus(basedir, false);
wcClient.doInfo(basedir, SVNRevision.WORKING);
} catch (SVNException ex) {
def ec = ex.getErrorMessage().getErrorCode();
int code = ec.getCode();
@ -141,6 +139,10 @@
}
}
def convertRelative = {
file -> '.' + file.getAbsolutePath().substring(baseLen).replace(File.separatorChar, (char)'/');
}
Set missingProps = new TreeSet(), unversioned = new TreeSet(), changed = new TreeSet();
task.log('Getting all versioned and unversioned files...');