diff --git a/core/src/main/java/hudson/scm/AbstractScmTagAction.java b/core/src/main/java/hudson/scm/AbstractScmTagAction.java index c047856189..2b771229a0 100644 --- a/core/src/main/java/hudson/scm/AbstractScmTagAction.java +++ b/core/src/main/java/hudson/scm/AbstractScmTagAction.java @@ -15,12 +15,19 @@ import org.kohsuke.stapler.StaplerRequest; import org.kohsuke.stapler.StaplerResponse; import javax.servlet.http.HttpServletResponse; +import javax.servlet.ServletException; /** * Common part of {@link CVSSCM.TagAction} and {@link SubversionTagAction}. + * + *

+ * This class implements the action that tags the modules. Derived classes + * need to provide tagForm.jelly view that displays a form for + * letting user start tagging. + * * @author Kohsuke Kawaguchi */ -abstract class AbstractScmTagAction extends AbstractModelObject implements Action { +public abstract class AbstractScmTagAction extends AbstractModelObject implements Action { protected final AbstractBuild build; /** @@ -51,6 +58,17 @@ abstract class AbstractScmTagAction extends AbstractModelObject implements Actio return workerThread; } + public void doIndex(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException { + req.setAttribute("build",build); + req.getView(this,chooseAction()).forward(req,rsp); + } + + private synchronized String chooseAction() { + if(workerThread!=null) + return "inProgress.jelly"; + return "tagForm.jelly"; + } + /** * Handles incremental log output. */ diff --git a/core/src/main/java/hudson/scm/CVSSCM.java b/core/src/main/java/hudson/scm/CVSSCM.java index 2b904de599..4e2f0f1e52 100644 --- a/core/src/main/java/hudson/scm/CVSSCM.java +++ b/core/src/main/java/hudson/scm/CVSSCM.java @@ -1054,17 +1054,6 @@ public class CVSSCM extends AbstractCVSFamilySCM implements Serializable { return tagName.split(" "); } - public void doIndex(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException { - req.setAttribute("build",build); - req.getView(this,chooseAction()).forward(req,rsp); - } - - private synchronized String chooseAction() { - if(workerThread!=null) - return "inProgress.jelly"; - return "tagForm.jelly"; - } - /** * Invoked to actually tag the workspace. */