/*
- * Copyright (C) 2010 Mathieu Baudier <mbaudier@argeo.org>
+ * Copyright (C) 2007-2012 Mathieu Baudier
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
package org.argeo.slc.core.deploy;
import java.io.File;
private String url;
private Boolean clean = false;
+ private Boolean changed = null;
+
public void run() {
+ changed = null;
if (clean) {
try {
+ log.info("Clean " + dir);
FileUtils.deleteDirectory(dir);
} catch (IOException e) {
throw new SlcException("Cannot delete checkout directory "
}
dir.mkdirs();
}
- versioningDriver.checkout(url, dir, true);
+ log.info("Checkout " + url + " to " + dir);
+ changed = versioningDriver.checkout(url, dir, true);
if (log.isDebugEnabled())
log.debug("Synchronized " + url + " to " + dir);
}
this.clean = clean;
}
+ /** Whether last call has changed the directory */
+ public Boolean getChanged() {
+ if (changed == null)
+ throw new SlcException("Sync has not run");
+ return changed;
+ }
+
}