Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Added 'Force' option to 'SyncOnly'.
To get 'sync -f' set both 'have' and 'force'; for 'sync -p' just set
'force'.

JENKINS-45127
  • Loading branch information
p4paul committed Jul 11, 2017
1 parent 9dd03e2 commit e3af574
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
@@ -1,8 +1,7 @@
package org.jenkinsci.plugins.p4.populate;

import org.kohsuke.stapler.DataBoundConstructor;

import hudson.Extension;
import org.kohsuke.stapler.DataBoundConstructor;

public class SyncOnlyImpl extends Populate {

Expand All @@ -15,12 +14,19 @@ public class SyncOnlyImpl extends Populate {
*
* @param revert revert before sync option
* @param have populate have list
* @param force force sync
* @param modtime use MODTIME for reconcile
* @param quiet Perforce quiet option
* @param pin Change or label to pin the sync
* @param parallel Parallel sync option
*/
@DataBoundConstructor
public SyncOnlyImpl(boolean revert, boolean have, boolean force, boolean modtime, boolean quiet, String pin, ParallelSync parallel) {
super(have, force, modtime, quiet, pin, parallel);
this.revert = revert;
}

@Deprecated
public SyncOnlyImpl(boolean revert, boolean have, boolean modtime, boolean quiet, String pin, ParallelSync parallel) {
super(have, false, modtime, quiet, pin, parallel);
this.revert = revert;
Expand Down
@@ -1,6 +1,10 @@
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:f="/lib/form">


<f:entry>
<f:checkbox title="${%Force sync}" field="force" default="false"/>
</f:entry>

<f:entry>
<f:checkbox title="${%Populate have list}" field="have" default="true"/>
</f:entry>
Expand Down

0 comments on commit e3af574

Please sign in to comment.