Merge branch '3.1.x'
This commit is contained in:
@@ -264,7 +264,7 @@ public class JGitEnvironmentRepository extends AbstractScmEnvironmentRepository
|
||||
if (this.defaultLabel.equals(label) && JGitEnvironmentProperties.MAIN_LABEL.equals(this.defaultLabel)
|
||||
&& tryMasterBranch) {
|
||||
logger.info("Could not refresh default label " + label, e);
|
||||
logger.info("Will try to checkout master label instead.");
|
||||
logger.info("Will try to refresh master label instead.");
|
||||
version = refresh(JGitEnvironmentProperties.MASTER_LABEL);
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -179,9 +179,11 @@ public class MultipleJGitEnvironmentRepository extends JGitEnvironmentRepository
|
||||
}
|
||||
catch (Exception e) {
|
||||
if (MultipleJGitEnvironmentProperties.MAIN_LABEL.equals(label) && isTryMasterBranch()) {
|
||||
logger.info("Cannot find Environment with default label " + getDefaultLabel(), e);
|
||||
logger.info("Will try to find Environment master label instead.");
|
||||
candidate = getRepository(this, application, profile, MultipleJGitEnvironmentProperties.MASTER_LABEL);
|
||||
return findOneFromCandidate(candidate, application, profile,
|
||||
MultipleJGitEnvironmentProperties.MASTER_LABEL, includeOrigin);
|
||||
MultipleJGitEnvironmentProperties.MASTER_LABEL, includeOrigin);
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user