Skip to content
Permalink
Browse files

Remove forced clobber and set default clobber option to true.

JENKINS-49041
  • Loading branch information...
p4paul committed Feb 9, 2018
1 parent aea04c5 commit a7449fd169edf0ba403eca1f3f70c9b9904b2929
@@ -159,11 +159,6 @@ public void setClient(Workspace workspace) throws Exception {
iclient.setHostName(workspace.getHostName());
}

// Set clobber on to ensure workspace is always good
IClientOptions options = iclient.getOptions();
options.setClobber(true);
iclient.setOptions(options);

// Save client spec
iclient.update();

This file was deleted.

Oops, something went wrong.
@@ -1,6 +1,7 @@
package org.jenkinsci.plugins.p4.workspace;

import com.perforce.p4java.client.IClient;
import com.perforce.p4java.client.IClientSummary.IClientOptions;
import com.perforce.p4java.impl.mapbased.client.Client;
import com.perforce.p4java.server.IOptionsServer;
import hudson.Extension;
@@ -45,7 +46,7 @@ public WorkspaceType getType() {

@DataBoundConstructor
public StreamWorkspaceImpl(String charset, boolean pinHost,
String streamName, String format) {
String streamName, String format) {
super(charset, pinHost);
this.streamName = streamName;
this.format = format;
@@ -66,14 +67,19 @@ public IClient setClient(IOptionsServer connection, String user)
connection.createClient(implClient);
iclient = connection.getClient(clientName);
}

// Owner set for use with p4maven
iclient.setOwnerName(user);

// Expand Stream name
String streamFullName = getExpand().format(getStreamName(), false);
iclient.setStream(streamFullName);

// Set clobber on to ensure workspace is always good
IClientOptions options = iclient.getOptions();
options.setClobber(true);
iclient.setOptions(options);

return iclient;
}

@@ -88,7 +88,7 @@ public WorkspaceSpec(boolean allwrite, boolean clobber, boolean compress,
// Default setup for Classic Workspace
public WorkspaceSpec(String view, String changeView) {
this.allwrite = false;
this.clobber = false;
this.clobber = true;
this.compress = false;
this.locked = false;
this.modtime = false;
@@ -144,7 +144,7 @@ public ListBoxModel doFillTypeItems() {
public AutoCompletionCandidates doAutoCompleteStreamName(
@QueryParameter String value) {

return StreamDescImpl.doAutoCompleteStreamName(value);
return WorkspaceDescriptor.doAutoCompleteStreamName(value);
}
}
}
@@ -3,12 +3,12 @@

<f:entry title="${%Options}" field="options">
<table width="100%">
<td><f:checkbox title="${%ALLWRITE}" field="allwrite" id="id.allwrite" /></td>
<td><f:checkbox title="${%CLOBBER}" field="clobber" id="id.clobber" /></td>
<td><f:checkbox title="${%COMPRESS}" field="compress" id="id.compress" /></td>
<td><f:checkbox title="${%LOCKED}" field="locked" id="id.locked" /></td>
<td><f:checkbox title="${%MODTIME}" field="modtime" id="id.modtime" /></td>
<td><f:checkbox title="${%RMDIR}" field="rmdir" id="id.rmdir" /></td>
<td><f:checkbox title="${%ALLWRITE}" field="allwrite" id="id.allwrite" /></td>
<td><f:checkbox title="${%CLOBBER}" field="clobber" id="id.clobber" default="true" /></td>
<td><f:checkbox title="${%COMPRESS}" field="compress" id="id.compress" /></td>
<td><f:checkbox title="${%LOCKED}" field="locked" id="id.locked" /></td>
<td><f:checkbox title="${%MODTIME}" field="modtime" id="id.modtime" /></td>
<td><f:checkbox title="${%RMDIR}" field="rmdir" id="id.rmdir" /></td>
</table>
</f:entry>

0 comments on commit a7449fd

Please sign in to comment.
You can’t perform that action at this time.