Skip to content
Permalink
Browse files

[FIXED JENKINS-9342] using the view mask for the changelog is now a s…

…eparate option
  • Loading branch information...
rpetti committed Aug 16, 2013
1 parent 15b98cb commit 3de2bc83b884f68027f523375674163137ff2040
@@ -263,6 +263,7 @@
private String viewMask = null;
private boolean useViewMaskForPolling = true;
private boolean useViewMaskForSyncing = false;
private boolean useViewMaskForChangeLog = false;

/**
* Sync only on master option.
@@ -595,6 +596,10 @@ public Object readResolve() {
configVersion = 1L;
}

if (configVersion == 1L) {
this.useViewMaskForChangeLog = this.useViewMaskForSyncing;
}

return this;
}

@@ -972,7 +977,7 @@ public boolean checkout(AbstractBuild build, Launcher launcher,
changes = new ArrayList<Changelist>(0);
} else {
List<Integer> changeNumbersTo;
if (useViewMaskForSyncing && useViewMask) {
if (useViewMaskForChangeLog) {
changeNumbersTo = depot.getChanges().getChangeNumbersInRange(p4workspace, lastChange+1, newestChange, viewMask, showIntegChanges);
} else {
changeNumbersTo = depot.getChanges().getChangeNumbersInRange(p4workspace, lastChange+1, newestChange, showIntegChanges);
@@ -1798,6 +1803,7 @@ public SCM newInstance(StaplerRequest req, JSONObject formData) throws FormExcep
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;
@@ -2881,6 +2887,14 @@ public void setUseViewMaskForSyncing(boolean useViewMaskForSyncing) {
this.useViewMaskForSyncing = useViewMaskForSyncing;
}

public boolean isUseViewMaskForChangeLog() {
return useViewMaskForChangeLog;
}

public void setUseViewMaskForChangeLog(boolean useViewMaskForChangeLog) {
this.useViewMaskForChangeLog = useViewMaskForChangeLog;
}

public String getViewMask() {
return viewMask;
}
@@ -228,6 +228,9 @@
<f:entry title="Use mask when syncing" help="/plugin/perforce/help/useViewMaskForSyncing.html">
<f:checkbox name="p4.useViewMaskForSyncing" checked="${instance.useViewMaskForSyncing}"/>
</f:entry>
<f:entry title="Use mask when determining changelog" help="/plugin/perforce/help/useViewMaskForChangeLog.html">
<f:checkbox name="p4.useViewMaskForChangeLog" checked="${instance.useViewMaskForChangeLog}"/>
</f:entry>
</f:optionalBlock>
</f:advanced>

@@ -0,0 +1,7 @@
<div>
<p>
If this option is checked, perforce will use the depot paths
listed in the view mask when retreiving the list of changes and culprits
since the last build.
</p>
</div>

2 comments on commit 3de2bc8

@oleg-nenashev

This comment has been minimized.

Copy link
Member

replied Aug 17, 2013

In my humble opinion, PerforceSCM's needs more collapsing sections in the "Advanced".
Just to prevent user's brain collapsing :)

@rpetti

This comment has been minimized.

Copy link
Member Author

replied Aug 17, 2013

I certainly wouldn't argue with that. Perforce just has too many use-cases... Even the official p4v dialogs are a nightmare. :/

I'd like to do anything we can to simplify the configuration of the plugin, so ideas are more than welcome!

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