Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Merge pull request #33 from jenkinsci/multiple-scm-instatination-fix
[IN_PROGRESS][JENKINS-18583] - Fixed PerforceSCM instatination forn Multiple SCMs
- Loading branch information
Showing
7 changed files
with
343 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
src/main/java/hudson/plugins/perforce/config/CleanTypeConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/* | ||
* The MIT License | ||
* | ||
* Copyright 2013 Oleg Nenashev <nenashev@synopsys.com>, 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 <nenashev@synopsys.com>, 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; | ||
} | ||
} |
76 changes: 76 additions & 0 deletions
76
src/main/java/hudson/plugins/perforce/config/DepotType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
/* | ||
* The MIT License | ||
* | ||
* Copyright 2013 Oleg Nenashev <nenashev@synopsys.com>, 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 <a href="https://issues.jenkins-ci.org/browse/JENKINS-18583">JENKINS-18583 issue</a> | ||
* @see PerforceSCMceSCM | ||
* @author Oleg Nenashev <nenashev@synopsys.com>, 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); | ||
} | ||
} |
63 changes: 63 additions & 0 deletions
63
src/main/java/hudson/plugins/perforce/config/MaskViewConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
/* | ||
* The MIT License | ||
* | ||
* Copyright 2013 Oleg Nenashev <nenashev@synopsys.com>, 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 <nenashev@synopsys.com>, 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; | ||
} | ||
} |
Oops, something went wrong.