Skip to content

Commit

Permalink
[JENKINS-28343] Add quiet option to p4-plugin sync
Browse files Browse the repository at this point in the history
Addressing pull request comments
1) Readding unintentionally removed line in updateFiles()
2) Changing populate quiet option to default to true
  • Loading branch information
rpocase committed May 13, 2015
1 parent 5e40be9 commit 194f23b
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 13 deletions.
21 changes: 11 additions & 10 deletions src/main/java/org/jenkinsci/plugins/p4/client/ClientHelper.java
Expand Up @@ -119,7 +119,7 @@ public boolean setClient(Workspace workspace) throws Exception {

/**
* Test to see if workspace is at the latest revision.
*
*
* @throws Exception
*/
public boolean updateFiles() throws Exception {
Expand All @@ -130,6 +130,7 @@ public boolean updateFiles() throws Exception {

// Sync revision to re-edit
SyncOptions syncOpts = new SyncOptions();
syncOpts.setNoUpdate(true);
List<IFileSpec> syncMsg = iclient.sync(syncFiles, syncOpts);

for (IFileSpec fileSpec : syncMsg) {
Expand All @@ -145,7 +146,7 @@ public boolean updateFiles() throws Exception {

/**
* Sync files to workspace at the specified change/label.
*
*
* @param buildChange Change to sync from
* @param populate Populate strategy
* @throws Exception
Expand Down Expand Up @@ -219,7 +220,7 @@ private void syncFiles(List<IFileSpec> files, Populate populate)
/**
* Cleans up the Perforce workspace after a previous build. Removes all
* pending and abandoned files (equivalent to 'p4 revert -w').
*
*
* @throws Exception
*/
public void tidyWorkspace(Populate populate) throws Exception {
Expand Down Expand Up @@ -484,7 +485,7 @@ private boolean isOpened(List<IFileSpec> files) throws Exception {
* Workaround for p4java bug. The 'setLocalSyntax(true)' option does not
* provide local syntax, so I have to use 'p4 where' to translate through
* the client view.
*
*
* @param fileSpec
* @return
* @throws Exception
Expand Down Expand Up @@ -530,7 +531,7 @@ private void printFile(String rev) throws Exception {
/**
* Unshelve review into workspace. Workspace is sync'ed to head first then
* review unshelved.
*
*
* @param review
* @throws Exception
*/
Expand Down Expand Up @@ -576,7 +577,7 @@ public void unshelveFiles(int review) throws Exception {
/**
* Get the change number for the last change within the scope of the
* workspace view.
*
*
* @return
* @throws Exception
*/
Expand Down Expand Up @@ -605,7 +606,7 @@ public int getClientHead() throws Exception {
/**
* Show all changes within the scope of the client, between the 'from' and
* 'to' change limits.
*
*
* @param from
* @return
* @throws Exception
Expand All @@ -626,7 +627,7 @@ public List<Integer> listChanges(Object from, Object to) throws Exception {
/**
* Show all changes within the scope of the client, from the 'from' change
* limits.
*
*
* @param from
* @return
* @throws Exception
Expand Down Expand Up @@ -671,7 +672,7 @@ private List<Integer> listChanges(String ws) throws Exception {

/**
* Fetches a list of changes needed to update the workspace to head.
*
*
* @return
* @throws Exception
*/
Expand All @@ -683,7 +684,7 @@ public List<Integer> listHaveChanges() throws Exception {
/**
* Fetches a list of changes needed to update the workspace to the specified
* limit. The limit could be a Perforce change number or label.
*
*
* @param changeLimit
* @return
* @throws Exception
Expand Down
Expand Up @@ -13,7 +13,7 @@
</f:entry>

<f:entry field="quiet">
<f:checkbox title="${%Suppress Perforce generated info messages}" default="false"/>
<f:checkbox title="${%Suppress Perforce generated info messages}" default="true"/>
</f:entry>

<f:entry field="pin">
Expand Down
Expand Up @@ -9,7 +9,7 @@
</f:entry>

<f:entry field="quiet">
<f:checkbox title="${%Suppress Perforce generated info messages}" default="false"/>
<f:checkbox title="${%Suppress Perforce generated info messages}" default="true"/>
</f:entry>

<f:entry field="pin">
Expand Down
Expand Up @@ -9,7 +9,7 @@
</f:entry>

<f:entry field="quiet">
<f:checkbox title="${%Suppress Perforce generated info messages}" default="false"/>
<f:checkbox title="${%Suppress Perforce generated info messages}" default="true"/>
</f:entry>

<f:entry field="pin">
Expand Down

0 comments on commit 194f23b

Please sign in to comment.