diff --git a/src/main/java/hudson/plugins/perforce/PerforceSCM.java b/src/main/java/hudson/plugins/perforce/PerforceSCM.java index 6ce36d6..bb0f716 100644 --- a/src/main/java/hudson/plugins/perforce/PerforceSCM.java +++ b/src/main/java/hudson/plugins/perforce/PerforceSCM.java @@ -1,5 +1,6 @@ package hudson.plugins.perforce; +import hudson.plugins.perforce.config.DepotType; import com.tek42.perforce.Depot; import com.tek42.perforce.PerforceException; import com.tek42.perforce.model.Changelist; @@ -22,6 +23,9 @@ import hudson.matrix.MatrixRun; import hudson.model.*; import hudson.model.listeners.ItemListener; +import hudson.plugins.perforce.config.CleanTypeConfig; +import hudson.plugins.perforce.config.MaskViewConfig; +import hudson.plugins.perforce.config.WorkspaceCleanupConfig; import hudson.plugins.perforce.utils.MacroStringHelper; import hudson.plugins.perforce.utils.ParameterSubstitutionException; import hudson.remoting.VirtualChannel; @@ -54,6 +58,7 @@ import java.io.StringWriter; import java.net.InetAddress; import java.util.*; +import java.util.concurrent.atomic.AtomicLong; import java.util.logging.Level; import java.util.logging.Logger; import java.util.regex.Matcher; @@ -278,7 +283,13 @@ public class PerforceSCM extends SCM { private String p4Charset = null; private String p4CommandCharset = null; - // Plugin constructor, (only?) used when a job configuration is saved + /** + * SCM constructor, (only?) used when a job configuration is saved. + * This constructor uses data classes from {@link hudson.plugins.perforce.config} + * to allow proper handling of hierarchical data in Stapler. In the current + * state, these classes are not being used outside this constructor. + */ + // TODO: move data to configuration classes during the refactoring @DataBoundConstructor public PerforceSCM( String p4User, @@ -314,7 +325,11 @@ public PerforceSCM( PerforceRepositoryBrowser browser, String excludedUsers, String excludedFiles, - boolean excludedFilesCaseSensitivity) { + boolean excludedFilesCaseSensitivity, + DepotType depotType, + WorkspaceCleanupConfig cleanWorkspace, + MaskViewConfig useViewMask + ) { this.configVersion = 1L; @@ -341,8 +356,39 @@ public PerforceSCM( this.p4UpstreamProject = Util.fixEmptyAndTrim(p4UpstreamProject); - this.projectPath = Util.fixEmptyAndTrim(projectPath); - + //TODO: move optional entries to external classes + // Get data from the depot type + if (depotType != null) { + this.p4Stream = depotType.getP4Stream(); + this.clientSpec = depotType.getClientSpec(); + this.projectPath = Util.fixEmptyAndTrim(depotType.getProjectPath()); + this.useStreamDepot = depotType.useP4Stream(); + this.useClientSpec = depotType.useClientSpec(); + this.useViewMask = depotType.useProjectPath(); + } + + // Get data from workspace cleanup settings + if (cleanWorkspace != null) { + setWipeRepoBeforeBuild(cleanWorkspace.isWipeRepoBeforeBuild()); + + CleanTypeConfig cleanType = cleanWorkspace.getCleanType(); + if (cleanType != null) { + setWipeBeforeBuild(cleanType.isWipe()); + setQuickCleanBeforeBuild(cleanType.isQuick()); + setRestoreChangedDeletedFiles(cleanType.isRestoreChangedDeletedFiles()); + } + } + + // Setup view mask + if (useViewMask != null) { + setUseViewMask(true); + setViewMask(hudson.Util.fixEmptyAndTrim(useViewMask.getViewMask())); + setUseViewMaskForPolling(useViewMask.isUseViewMaskForPolling()); + setUseViewMaskForSyncing(useViewMask.isUseViewMaskForSyncing()); + setUseViewMaskForChangeLog(useViewMask.isUseViewMaskForChangeLog()); + + } + this.clientOwner = Util.fixEmptyAndTrim(clientOwner); if (p4SysRoot != null) { @@ -464,6 +510,7 @@ protected Depot getDepot(Launcher launcher, FilePath workspace, AbstractProject return depot; } + /** * Override of SCM.buildEnvVars() in order to setup the last change we have * sync'd to as a Hudson @@ -1809,45 +1856,14 @@ public String getDisplayName() { @Override public SCM newInstance(StaplerRequest req, JSONObject formData) throws FormException { - PerforceSCM newInstance = (PerforceSCM)super.newInstance(req, formData); - String depotType = req.getParameter("p4.depotType"); - boolean useStreamDepot = depotType.equals("stream"); - boolean useClientSpec = depotType.equals("file"); - newInstance.setUseStreamDepot(useStreamDepot); - if (useStreamDepot) { - newInstance.setP4Stream(req.getParameter("p4Stream")); - } - else { - newInstance.setUseClientSpec(useClientSpec); - if (useClientSpec) { - newInstance.setClientSpec(req.getParameter("clientSpec")); - } - else { - newInstance.setProjectPath(req.getParameter("projectPath")); - } - } - newInstance.setUseViewMask(req.getParameter("p4.useViewMask") != null); - newInstance.setViewMask(Util.fixEmptyAndTrim(req.getParameter("p4.viewMask"))); - newInstance.setUseViewMaskForPolling(req.getParameter("p4.useViewMaskForPolling") != null); - newInstance.setUseViewMaskForSyncing(req.getParameter("p4.useViewMaskForSyncing") != null); - newInstance.setUseViewMaskForChangeLog(req.getParameter("p4.useViewMaskForChangeLog") != null); - - String cleanType = req.getParameter("p4.cleanType"); - boolean useWipe = false; - boolean useQuickClean = false; - if(cleanType != null && req.getParameter("p4.cleanWorkspace") != null){ - useWipe = cleanType.equals("wipe"); - useQuickClean = cleanType.equals("quick"); - } - newInstance.setWipeBeforeBuild(useWipe); - newInstance.setQuickCleanBeforeBuild(useQuickClean); - - String wipeRepo = req.getParameter("p4.wipeRepoBeforeBuild"); - newInstance.setWipeRepoBeforeBuild(wipeRepo != null); - - newInstance.setRestoreChangedDeletedFiles(req.getParameter("p4.restoreChangedDeletedFiles") != null); - - return newInstance; + return (PerforceSCM)super.newInstance(req, formData); + } + + /**Generates a random key for p4.config.instanceID*/ + private static final AtomicLong P4_INSTANCE_COUNTER = new AtomicLong(); + public String generateP4InstanceID() { + // There's no problem even if the counter reaches overflow + return Long.toString(P4_INSTANCE_COUNTER.incrementAndGet()); } /** diff --git a/src/main/java/hudson/plugins/perforce/config/CleanTypeConfig.java b/src/main/java/hudson/plugins/perforce/config/CleanTypeConfig.java new file mode 100644 index 0000000..3f2a2b7 --- /dev/null +++ b/src/main/java/hudson/plugins/perforce/config/CleanTypeConfig.java @@ -0,0 +1,55 @@ +/* + * The MIT License + * + * Copyright 2013 Oleg Nenashev , Synopsys Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package hudson.plugins.perforce.config; + +import hudson.plugins.perforce.PerforceSCM; +import org.kohsuke.stapler.DataBoundConstructor; + +/** + * Contains workspace cleanup options for {@link PerforceSCM}. + * @author Oleg Nenashev , Synopsys Inc. + * @since TODO: define a version + */ +public class CleanTypeConfig { + String value; + boolean restoreChangedDeletedFiles; + + @DataBoundConstructor + public CleanTypeConfig(String value, Boolean restoreChangedDeletedFiles) { + this.value = value; + this.restoreChangedDeletedFiles = restoreChangedDeletedFiles != null ? restoreChangedDeletedFiles.booleanValue() : false; + } + + public boolean isQuick() { + return value.equals("quick"); + } + + public boolean isWipe() { + return value.equals("wipe"); + } + + public boolean isRestoreChangedDeletedFiles() { + return restoreChangedDeletedFiles; + } +} diff --git a/src/main/java/hudson/plugins/perforce/config/DepotType.java b/src/main/java/hudson/plugins/perforce/config/DepotType.java new file mode 100644 index 0000000..f14f489 --- /dev/null +++ b/src/main/java/hudson/plugins/perforce/config/DepotType.java @@ -0,0 +1,76 @@ +/* + * The MIT License + * + * Copyright 2013 Oleg Nenashev , Synopsys Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package hudson.plugins.perforce.config; + +import org.kohsuke.stapler.DataBoundConstructor; + +/** + * Provides databound-transfer of depot type parameters for ${@link PerforceSCM}. + * Class is developed in order to resolve JENKINS-18583 issue + * @see PerforceSCMceSCM + * @author Oleg Nenashev , Synopsys Inc. + * @since TODO: define a version + */ +public class DepotType { + public static final String USE_P4STREAM_MARKER="stream"; + public static final String USE_CLIENTSPEC_MARKER="file"; + public static final String USE_PROJECTPATH_MARKER="map"; + + String value; + String p4Stream; + String clientSpec; + String projectPath; + + @DataBoundConstructor + public DepotType(String value, String p4Stream, String clientSpec, String projectPath) { + this.value = (value != null) ? value : ""; + this.p4Stream = p4Stream; + this.clientSpec = clientSpec; + this.projectPath = projectPath; + } + + public String getProjectPath() { + return projectPath; + } + + public boolean useProjectPath() { + return value.equals(USE_PROJECTPATH_MARKER); + } + + public String getClientSpec() { + return clientSpec; + } + + public boolean useClientSpec() { + return value.equals(USE_CLIENTSPEC_MARKER); + } + + public String getP4Stream() { + return p4Stream; + } + + public boolean useP4Stream() { + return value.equals(USE_P4STREAM_MARKER); + } +} diff --git a/src/main/java/hudson/plugins/perforce/config/MaskViewConfig.java b/src/main/java/hudson/plugins/perforce/config/MaskViewConfig.java new file mode 100644 index 0000000..c8ee00b --- /dev/null +++ b/src/main/java/hudson/plugins/perforce/config/MaskViewConfig.java @@ -0,0 +1,63 @@ +/* + * The MIT License + * + * Copyright 2013 Oleg Nenashev , Synopsys Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package hudson.plugins.perforce.config; + +import org.kohsuke.stapler.DataBoundConstructor; + +/** + * Defines masking options for {@link PerforceSCM}. + * @author Oleg Nenashev , Synopsys Inc. + * @since TODO: define a version + */ +public class MaskViewConfig { + String viewMask; + boolean useViewMaskForPolling; + boolean useViewMaskForSyncing; + boolean useViewMaskForChangeLog; + + @DataBoundConstructor + public MaskViewConfig(String viewMask, boolean useViewMaskForPolling, + boolean useViewMaskForSyncing, boolean useViewMaskForChangeLog) { + this.viewMask = viewMask; + this.useViewMaskForPolling = useViewMaskForPolling; + this.useViewMaskForSyncing = useViewMaskForSyncing; + this.useViewMaskForChangeLog = useViewMaskForChangeLog; + } + + public String getViewMask() { + return viewMask; + } + + public boolean isUseViewMaskForPolling() { + return useViewMaskForPolling; + } + + public boolean isUseViewMaskForSyncing() { + return useViewMaskForSyncing; + } + + public boolean isUseViewMaskForChangeLog() { + return useViewMaskForChangeLog; + } +} diff --git a/src/main/java/hudson/plugins/perforce/config/WorkspaceCleanupConfig.java b/src/main/java/hudson/plugins/perforce/config/WorkspaceCleanupConfig.java new file mode 100644 index 0000000..5a3967b --- /dev/null +++ b/src/main/java/hudson/plugins/perforce/config/WorkspaceCleanupConfig.java @@ -0,0 +1,51 @@ +/* + * The MIT License + * + * Copyright 2013 Oleg Nenashev , Synopsys Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package hudson.plugins.perforce.config; + +import hudson.plugins.perforce.PerforceSCM; +import org.kohsuke.stapler.DataBoundConstructor; + +/** + * Defines workspace cleanup options for {@link PerforceSCM}. + * @author Oleg Nenashev , Synopsys Inc. + * @since TODO: define a version + */ +public class WorkspaceCleanupConfig { + CleanTypeConfig cleanType; + boolean wipeRepoBeforeBuild; + + @DataBoundConstructor + public WorkspaceCleanupConfig(CleanTypeConfig cleanType, boolean wipeRepoBeforeBuild) { + this.cleanType = cleanType; + this.wipeRepoBeforeBuild = wipeRepoBeforeBuild; + } + + public CleanTypeConfig getCleanType() { + return cleanType; + } + + public boolean isWipeRepoBeforeBuild() { + return wipeRepoBeforeBuild; + } +} diff --git a/src/main/resources/hudson/plugins/perforce/PerforceSCM/config.jelly b/src/main/resources/hudson/plugins/perforce/PerforceSCM/config.jelly index 5350cc1..2088b6c 100644 --- a/src/main/resources/hudson/plugins/perforce/PerforceSCM/config.jelly +++ b/src/main/resources/hudson/plugins/perforce/PerforceSCM/config.jelly @@ -1,12 +1,19 @@ - - - - - - - + + + + + + + + + + @@ -50,22 +57,22 @@
- + - + - - - - + + + +
@@ -92,8 +99,8 @@ - - + + diff --git a/src/test/java/hudson/plugins/perforce/PerforceSCMTest.java b/src/test/java/hudson/plugins/perforce/PerforceSCMTest.java index cf7d18f..d1317a0 100644 --- a/src/test/java/hudson/plugins/perforce/PerforceSCMTest.java +++ b/src/test/java/hudson/plugins/perforce/PerforceSCMTest.java @@ -1,13 +1,14 @@ package hudson.plugins.perforce; +import hudson.plugins.perforce.config.DepotType; import hudson.model.FreeStyleProject; import hudson.model.Hudson; import hudson.plugins.perforce.PerforceToolInstallation.DescriptorImpl; import hudson.plugins.perforce.browsers.P4Web; -import hudson.scm.SCM; +import hudson.plugins.perforce.config.MaskViewConfig; +import hudson.plugins.perforce.config.WorkspaceCleanupConfig; import hudson.tools.ToolProperty; -import java.io.IOException; import java.net.URL; import java.util.Arrays; import java.util.Collections; @@ -20,6 +21,11 @@ * @author Kohsuke Kawaguchi */ public class PerforceSCMTest extends HudsonTestCase { + /// Preserves original behavior of the tests + public static final DepotType EMPTY_DEPOT = null; + public static final MaskViewConfig EMPTY_MASKVIEW = null; + public static final WorkspaceCleanupConfig EMPTY_WORKSPACE_CLEANUP = null; + /** * Makes sure that the configuration survives the round-trip. */ @@ -29,7 +35,7 @@ public void testConfigRoundtrip() throws Exception { PerforceSCM scm = new PerforceSCM( "user", "pass", "client", "port", "", "exe", "sysRoot", "sysDrive", "label", "counter", "upstreamProject", "shared", "charset", "charset2", "user", false, true, true, true, true, true, false, - false, true, false, false, false, "${basename}", 0, -1, browser, "exclude_user", "exclude_file", true); + false, true, false, false, false, "${basename}", 0, -1, browser, "exclude_user", "exclude_file", true, EMPTY_DEPOT, EMPTY_WORKSPACE_CLEANUP, EMPTY_MASKVIEW); scm.setProjectPath("path"); project.setScm(scm); @@ -50,7 +56,7 @@ public void testConfigRoundtripWithNoSystemRoot() throws Exception { PerforceSCM scm = new PerforceSCM( "user", "pass", "client", "port", "", "exe", "", "", "label", "counter", "upstreamProject", "shared", "charset", "charset2", "user", false, true, true, true, true, true, false, - false, true, false, false, false, "${basename}", 0, -1, browser, "exclude_user", "exclude_file", true); + false, true, false, false, false, "${basename}", 0, -1, browser, "exclude_user", "exclude_file", true, EMPTY_DEPOT, EMPTY_WORKSPACE_CLEANUP, EMPTY_MASKVIEW); assertEquals("", scm.getP4SysDrive()); assertEquals("", scm.getP4SysRoot()); scm.setProjectPath("path"); @@ -70,7 +76,7 @@ public void testConfigRoundtripWithStream() throws Exception { PerforceSCM scm = new PerforceSCM( "user", "pass", "client", "port", "", "exe", "sysRoot", "sysDrive", "label", "counter", "upstreamProject", "shared", "charset", "charset2", "user", false, true, true, true, true, true, false, - false, true, false, false, false, "${basename}", 0, -1, browser, "exclude_user", "exclude_file", true); + false, true, false, false, false, "${basename}", 0, -1, browser, "exclude_user", "exclude_file", true, EMPTY_DEPOT, EMPTY_WORKSPACE_CLEANUP, EMPTY_MASKVIEW); scm.setP4Stream("stream"); scm.setUseStreamDepot(true); project.setScm(scm); @@ -97,7 +103,7 @@ public void testConfigPasswordEnctyptionAndDecription() throws Exception { PerforceSCM scm = new PerforceSCM( "user", password, "client", "port", "", "test_installation", "sysRoot", "sysDrive", "label", "counter", "upstreamProject", "shared", "charset", "charset2", "user", false, true, true, true, true, true, false, - false, true, false, false, false, "${basename}", 0, -1, browser, "exclude_user", "exclude_file", true); + false, true, false, false, false, "${basename}", 0, -1, browser, "exclude_user", "exclude_file", true, EMPTY_DEPOT, EMPTY_WORKSPACE_CLEANUP, EMPTY_MASKVIEW); scm.setProjectPath("path"); project.setScm(scm); @@ -126,7 +132,7 @@ public void testDepotContainsUnencryptedPassword() throws Exception { PerforceSCM scm = new PerforceSCM( "user", password, "client", "port", "", "test_installation", "sysRoot", "sysDrive", "label", "counter", "upstreamProject", "shared", "charset", "charset2", "user", false, true, true, true, true, true, false, - false, true, false, false, false, "${basename}", 0, -1, browser, "exclude_user", "exclude_file", true); + false, true, false, false, false, "${basename}", 0, -1, browser, "exclude_user", "exclude_file", true, EMPTY_DEPOT, EMPTY_WORKSPACE_CLEANUP, EMPTY_MASKVIEW); scm.setProjectPath("path"); project.setScm(scm); @@ -144,7 +150,7 @@ public void testConfigSaveReloadAndSaveDoesNotDoubleEncryptThePassword() throws PerforceSCM scm = new PerforceSCM( "user", password, "client", "port", "", "test_installation", "sysRoot", "sysDrive", "label", "counter", "upstreamProject", "shared", "charset", "charset2", "user", false, true, true, true, true, true, false, - false, true, false, false, false, "${basename}", 0, -1, browser, "exclude_user", "exclude_file", true); + false, true, false, false, false, "${basename}", 0, -1, browser, "exclude_user", "exclude_file", true, EMPTY_DEPOT, EMPTY_WORKSPACE_CLEANUP, EMPTY_MASKVIEW); scm.setProjectPath("path"); project.setScm(scm); @@ -326,7 +332,7 @@ public void testDepotContainsUnencryptedPasswordWithgetProperty() throws Excepti PerforceSCM scm = new PerforceSCM( "user", password, "client", "port", "", "test_installation", "sysRoot", "sysDrive", "label", "counter", "upstreamProject", "shared", "charset", "charset2", "user", false, true, true, true, true, true, false, - false, false, true, false, false, "${basename}", 0, -1, browser, "exclude_user", "exclude_file", true); + false, false, true, false, false, "${basename}", 0, -1, browser, "exclude_user", "exclude_file", true, EMPTY_DEPOT, EMPTY_WORKSPACE_CLEANUP, EMPTY_MASKVIEW); scm.setP4Stream("stream"); project.setScm(scm); @@ -364,7 +370,7 @@ public void testP4UpstreamProjectRenaming() throws Exception { PerforceSCM upstreamScm = new PerforceSCM( "user", "pass", "client", "port", "", "test_installation", "sysRoot", "sysDrive", null, null, null, "shared", "charset", "charset2", "user", false, true, true, true, true, true, false, - false, true, false, false, false, "${basename}", 0, -1, browser, "exclude_user", "exclude_file", true); + false, true, false, false, false, "${basename}", 0, -1, browser, "exclude_user", "exclude_file", true, EMPTY_DEPOT, EMPTY_WORKSPACE_CLEANUP, EMPTY_MASKVIEW); upstreamScm.setProjectPath("path"); upstreamProject.setScm(upstreamScm); @@ -373,7 +379,7 @@ public void testP4UpstreamProjectRenaming() throws Exception { PerforceSCM downstreamScm = new PerforceSCM( "user", "pass", "client", "port", "", "test_installation", "sysRoot", "sysDrive", null, null, oldName, "shared", "charset", "charset2", "user", false, true, true, true, true, true, false, - false, true, false, false, false, "${basename}", 0, -1, browser, "exclude_user", "exclude_file", true); + false, true, false, false, false, "${basename}", 0, -1, browser, "exclude_user", "exclude_file", true, EMPTY_DEPOT, EMPTY_WORKSPACE_CLEANUP, EMPTY_MASKVIEW); downstreamScm.setProjectPath("path"); downstreamProject.setScm(downstreamScm);