mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-09 01:56:03 +00:00
moved CVS help files to the resources folder to match the modern convention.
This is in preparation of moving CVS to its own plugin. git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@21008 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
5768da22a2
commit
8dbd42ee2b
80 files changed
+63
-50
No files matched your search
@@ -554,7 +554,7 @@ public abstract class Descriptor<T extends Describable<T>> implements Saveable {
|
||||
|
||||
private InputStream getHelpStream(Class c, String suffix) {
|
||||
Locale locale = Stapler.getCurrentRequest().getLocale();
|
||||
String base = c.getName().replace('.', '/') + "/help"+suffix;
|
||||
String base = c.getName().replace('.', '/').replace('$','/') + "/help"+suffix;
|
||||
|
||||
ClassLoader cl = c.getClassLoader();
|
||||
if(cl==null) return null;
|
||||
|
||||
@@ -3102,27 +3102,6 @@ public final class Hudson extends Node implements ItemGroup<TopLevelItem>, Stapl
|
||||
return System.getProperty("os.name").startsWith("mac");
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns all {@code CVSROOT} strings used in the current Hudson installation.
|
||||
*
|
||||
* <p>
|
||||
* Ideally this shouldn't be defined in here
|
||||
* but EL doesn't provide a convenient way of invoking a static function,
|
||||
* so I'm putting it here for now.
|
||||
*/
|
||||
public Set<String> getAllCvsRoots() {
|
||||
Set<String> r = new TreeSet<String>();
|
||||
for( AbstractProject p : getAllItems(AbstractProject.class) ) {
|
||||
SCM scm = p.getScm();
|
||||
if (scm instanceof CVSSCM) {
|
||||
CVSSCM cvsscm = (CVSSCM) scm;
|
||||
r.add(cvsscm.getCvsRoot());
|
||||
}
|
||||
}
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
/**
|
||||
* Rebuilds the dependency map.
|
||||
*/
|
||||
|
||||
@@ -32,6 +32,7 @@ import hudson.Util;
|
||||
import hudson.Extension;
|
||||
import static hudson.Util.fixEmpty;
|
||||
import static hudson.Util.fixNull;
|
||||
import static hudson.Util.fixEmptyAndTrim;
|
||||
import hudson.model.AbstractBuild;
|
||||
import hudson.model.AbstractProject;
|
||||
import hudson.model.BuildListener;
|
||||
@@ -40,6 +41,8 @@ import hudson.model.ModelObject;
|
||||
import hudson.model.Run;
|
||||
import hudson.model.TaskListener;
|
||||
import hudson.model.TaskThread;
|
||||
import hudson.model.Describable;
|
||||
import hudson.model.Descriptor;
|
||||
import hudson.org.apache.tools.ant.taskdefs.cvslib.ChangeLogTask;
|
||||
import hudson.remoting.Future;
|
||||
import hudson.remoting.RemoteOutputStream;
|
||||
@@ -148,12 +151,12 @@ public class CVSSCM extends SCM implements Serializable {
|
||||
private String excludedRegions;
|
||||
|
||||
@DataBoundConstructor
|
||||
public CVSSCM(String cvsRoot, String module,String branch,String cvsRsh,boolean canUseUpdate, boolean legacy, boolean isTag, String excludedRegions) {
|
||||
public CVSSCM(String cvsRoot, String allModules,String branch,String cvsRsh,boolean canUseUpdate, boolean legacy, boolean isTag, String excludedRegions) {
|
||||
if(fixNull(branch).equals("HEAD"))
|
||||
branch = null;
|
||||
|
||||
this.cvsroot = fixNull(cvsRoot).trim();
|
||||
this.module = module.trim();
|
||||
this.module = allModules.trim();
|
||||
this.branch = nullify(branch);
|
||||
this.cvsRsh = nullify(cvsRsh);
|
||||
this.canUseUpdate = canUseUpdate;
|
||||
@@ -1113,8 +1116,8 @@ public class CVSSCM extends SCM implements Serializable {
|
||||
}
|
||||
|
||||
public boolean configure( StaplerRequest req, JSONObject o ) {
|
||||
cvsPassFile = fixEmpty(req.getParameter("cvs_cvspass").trim());
|
||||
cvsExe = fixEmpty(req.getParameter("cvs_exe").trim());
|
||||
cvsPassFile = fixEmptyAndTrim(req.getParameter("cvspassFile"));
|
||||
cvsExe = fixEmptyAndTrim(o.getString("cvsExe"));
|
||||
noCompression = req.getParameter("cvs_noCompression")!=null;
|
||||
save();
|
||||
|
||||
@@ -1126,11 +1129,27 @@ public class CVSSCM extends SCM implements Serializable {
|
||||
return x.getCvsRoot().equals(y.getCvsRoot());
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns all {@code CVSROOT} strings used in the current Hudson installation.
|
||||
*/
|
||||
public Set<String> getAllCvsRoots() {
|
||||
Set<String> r = new TreeSet<String>();
|
||||
for( AbstractProject p : Hudson.getInstance().getAllItems(AbstractProject.class) ) {
|
||||
SCM scm = p.getScm();
|
||||
if (scm instanceof CVSSCM) {
|
||||
CVSSCM cvsscm = (CVSSCM) scm;
|
||||
r.add(cvsscm.getCvsRoot());
|
||||
}
|
||||
}
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
//
|
||||
// web methods
|
||||
//
|
||||
|
||||
public FormValidation doCvsPassCheck(@QueryParameter String value) {
|
||||
public FormValidation doCheckCvspassFile(@QueryParameter String value) {
|
||||
// this method can be used to check if a file exists anywhere in the file system,
|
||||
// so it should be protected.
|
||||
if(!Hudson.getInstance().hasPermission(Hudson.ADMINISTER))
|
||||
@@ -1155,7 +1174,7 @@ public class CVSSCM extends SCM implements Serializable {
|
||||
/**
|
||||
* Checks if cvs executable exists.
|
||||
*/
|
||||
public FormValidation doCvsExeCheck(@QueryParameter String value) {
|
||||
public FormValidation doCheckCvsExe(@QueryParameter String value) {
|
||||
return FormValidation.validateExecutable(value);
|
||||
}
|
||||
|
||||
@@ -1307,7 +1326,7 @@ public class CVSSCM extends SCM implements Serializable {
|
||||
/**
|
||||
* Action for a build that performs the tagging.
|
||||
*/
|
||||
public final class TagAction extends AbstractScmTagAction {
|
||||
public final class TagAction extends AbstractScmTagAction implements Describable<TagAction> {
|
||||
|
||||
/**
|
||||
* If non-null, that means the build is already tagged.
|
||||
@@ -1489,7 +1508,7 @@ public class CVSSCM extends SCM implements Serializable {
|
||||
boolean isDir = path.isDirectory();
|
||||
|
||||
ArgumentListBuilder cmd = new ArgumentListBuilder();
|
||||
cmd.add(getDescriptor().getCvsExeOrDefault(),"tag");
|
||||
cmd.add(CVSSCM.this.getDescriptor().getCvsExeOrDefault(),"tag");
|
||||
if(isDir) {
|
||||
cmd.add("-R");
|
||||
}
|
||||
@@ -1532,6 +1551,21 @@ public class CVSSCM extends SCM implements Serializable {
|
||||
this.tagName = tagName;
|
||||
this.workerThread = null;
|
||||
}
|
||||
|
||||
public Descriptor<TagAction> getDescriptor() {
|
||||
return Hudson.getInstance().getDescriptor(getClass());
|
||||
}
|
||||
}
|
||||
|
||||
@Extension
|
||||
public static final class TagActionDescriptor extends Descriptor<TagAction> {
|
||||
public TagActionDescriptor() {
|
||||
super(TagAction.class);
|
||||
}
|
||||
|
||||
public String getDisplayName() {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
public static final class TagWorkerThread extends TaskThread {
|
||||
|
||||
Reference in new issue
Block a user