public synchronized Map<String, Long> getRevisionMap() throws IOException { if (revisionMap == null) { revisionMap = SubversionSCM.parseRevisionFile(build); } return revisionMap; }
public synchronized Map<String, Long> getRevisionMap() throws IOException { if (revisionMap == null) { revisionMap = SubversionSCM.parseRevisionFile(build); } return revisionMap; }
/** * Please consider using the non-static version {@link #parseSvnRevisionFile(Run)}! */ /*package*/ static Map<String,Long> parseRevisionFile(Run<?,?> build) throws IOException { return parseRevisionFile(build,true,false); }
static Map<String, Long> parseRevisionFile(AbstractBuild<?, ?> build) throws IOException { return parseRevisionFile(build, false); }
static Map<String, Long> parseRevisionFile(AbstractBuild<?, ?> build) throws IOException { return parseRevisionFile(build, false); }
/*package*/ Map<String,Long> parseSvnRevisionFile(Run<?,?> build) throws IOException { return parseRevisionFile(build); }
public SubversionChangeLogBuilder(AbstractBuild<?,?> build, BuildListener listener, SubversionSCM scm) throws IOException { previousRevisions = SubversionSCM.parseRevisionFile(build.getPreviousBuild()); thisRevisions = SubversionSCM.parseRevisionFile(build); this.listener = listener; this.scm = scm; this.build = build; }
public SubversionChangeLogBuilder(AbstractBuild<?,?> build, BuildListener listener, SubversionSCM scm) throws IOException { previousRevisions = SubversionSCM.parseRevisionFile(build.getPreviousBuild()); thisRevisions = SubversionSCM.parseRevisionFile(build); this.listener = listener; this.scm = scm; this.build = build; }
public synchronized Map<String,Long> getRevisionMap() throws IOException { if(revisionMap==null) revisionMap = SubversionSCM.parseRevisionFile(getRun()); return revisionMap; }
@Override public SCMRevisionState calcRevisionsFromBuild(Run<?, ?> build, FilePath workspace, Launcher launcher, TaskListener listener) throws IOException, InterruptedException { // exclude locations that are svn:external-ed with a fixed revision. Map<String,Long> wsRev = parseRevisionFile(build,true,true); return new SVNRevisionState(wsRev); }
/** * Sets the <tt>SVN_REVISION</tt> environment variable during the build. */ @Override public void buildEnvVars(AbstractBuild<?, ?> build, Map<String, String> env) { super.buildEnvVars(build, env); ModuleLocation[] svnLocations = getLocations(build); try { Map<String, Long> revisions = parseRevisionFile(build); if (svnLocations.length == 1) { Long rev = revisions.get(svnLocations[0].remote); if (rev != null) { env.put("SVN_REVISION", rev.toString()); env.put("SVN_URL", svnLocations[0].getURL()); } } else if (svnLocations.length > 1) { for (int i = 0; i < svnLocations.length; i++) { Long rev = revisions.get(svnLocations[i].remote); if (rev != null) { env.put("SVN_REVISION_" + (i + 1), rev.toString()); env.put("SVN_URL_" + (i + 1), svnLocations[i].getURL()); } } } } catch (IOException e) { // ignore this error LOGGER.log(Level.FINEST, "Exception while building envVars. Error will be ignored.", e); } }
/** * Sets the <tt>SVN_REVISION</tt> environment variable during the build. */ @Override public void buildEnvVars(AbstractBuild<?, ?> build, Map<String, String> env) { super.buildEnvVars(build, env); ModuleLocation[] svnLocations = getLocations(build); try { Map<String, Long> revisions = parseRevisionFile(build); if (svnLocations.length == 1) { Long rev = revisions.get(svnLocations[0].remote); if (rev != null) { env.put("SVN_REVISION", rev.toString()); env.put("SVN_URL", svnLocations[0].getURL()); } } else if (svnLocations.length > 1) { for (int i = 0; i < svnLocations.length; i++) { Long rev = revisions.get(svnLocations[i].remote); if (rev != null) { env.put("SVN_REVISION_" + (i + 1), rev.toString()); env.put("SVN_URL_" + (i + 1), svnLocations[i].getURL()); } } } } catch (IOException e) { // ignore this error LOGGER.log(Level.FINEST, "Exception while building envVars. Error will be ignored.", e); } }
@Override public SCMRevisionState calcRevisionsFromBuild(AbstractBuild<?, ?> build, Launcher launcher, TaskListener listener) throws IOException, InterruptedException { // exclude locations that are svn:external-ed with a fixed revision. Map<String, Long> wsRev = parseRevisionFile(build, true); for (External e : parseExternalsFile(build.getProject())) { if (e.isRevisionFixed()) { wsRev.remove(e.url); } } return new SVNRevisionState(wsRev); }
@Override public SCMRevisionState calcRevisionsFromBuild(AbstractBuild<?, ?> build, Launcher launcher, TaskListener listener) throws IOException, InterruptedException { // exclude locations that are svn:external-ed with a fixed revision. Map<String, Long> wsRev = parseRevisionFile(build, true); for (External e : parseExternalsFile(build.getProject())) { if (e.isRevisionFixed()) { wsRev.remove(e.url); } } return new SVNRevisionState(wsRev); }