blob: 6c585b3c203eb092085a6d5051856a8166a825c8 [file] [log] [blame]
if (job.equals(newJob))
return;
if (job.getScms() != null && job.getScms().eClass().equals(BuildscmPackage.eINSTANCE.getSVN())) {
if (newJob.getScms() == null)
newJob.setScms(BuildscmFactory.eINSTANCE.createSVN());
SVN newScm = (SVN) newJob.getScms();
SVN scm = (SVN) job.getScms();
for (SVNLocation svnLocation : scm.getLocations()) {
svnLocation.setLocalPath(job.getName() + "_" + svnLocation.getLocalPath());
}
newScm.getLocations().addAll(scm.getLocations());
}
if (job.getScms() != null && job.getScms().eClass().equals(BuildscmPackage.eINSTANCE.getGIT())) {
if (newJob.getScms() == null)
newJob.setScms(BuildscmFactory.eINSTANCE.createGIT());
GIT newScm = (GIT) newJob.getScms();
GIT scm = (GIT) job.getScms();
newScm.setLocations(scm.getLocations());
}