mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-01 19:15:52 +01:00
Add multiple svn externals support
This commit is contained in:
@@ -193,20 +193,22 @@ public class SvnBrowseCommand extends AbstractSvnCommand
|
|||||||
|
|
||||||
repository.getDir(entry.getRelativePath(), revision, properties, (Collection) null);
|
repository.getDir(entry.getRelativePath(), revision, properties, (Collection) null);
|
||||||
|
|
||||||
String externals = properties.getStringValue(SVNProperty.EXTERNALS).replaceAll("[\\r\\n]+", "");
|
String[] externals = properties.getStringValue(SVNProperty.EXTERNALS).split("\\r?\\n");
|
||||||
String subRepoUrl = "";
|
for (String external : externals) {
|
||||||
String subRepoPath = "";
|
String subRepoUrl = "";
|
||||||
for (String external : externals.split(" ")) {
|
String subRepoPath = "";
|
||||||
if (shouldSetExternal(external)) {
|
for (String externalPart : external.split(" ")) {
|
||||||
subRepoUrl = external;
|
if (shouldSetExternal(externalPart)) {
|
||||||
} else if (!external.contains("-r") && !external.isEmpty()) {
|
subRepoUrl = externalPart;
|
||||||
subRepoPath = external;
|
} else if (!externalPart.contains("-r") && !externalPart.isEmpty()) {
|
||||||
|
subRepoPath = externalPart;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (Util.isNotEmpty(externals)) {
|
if (Util.isNotEmpty(external)) {
|
||||||
SubRepository subRepository = new SubRepository(subRepoUrl);
|
SubRepository subRepository = new SubRepository(subRepoUrl);
|
||||||
fileObject.addChild(createSubRepoDirectory(subRepository, subRepoPath));
|
fileObject.addChild(createSubRepoDirectory(subRepository, subRepoPath));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (SVNException ex) {
|
} catch (SVNException ex) {
|
||||||
logger.error("could not fetch file properties", ex);
|
logger.error("could not fetch file properties", ex);
|
||||||
|
|||||||
Reference in New Issue
Block a user