perform() throws IOException, InterruptedException {
} catch (final SVNException e) {
SVNException cause = e;
do {
+ if (location.isCancelProcessOnExternalsFail() &&
+ cause.getErrorMessage().getErrorCode() == SVNErrorCode.CL_ERROR_PROCESSING_EXTERNALS) {
+ break;
+ }
+
SVNErrorCode errorCode = cause.getErrorMessage().getErrorCode();
if (errorCode == SVNErrorCode.WC_LOCKED) {
// work space locked. try fresh check out
diff --git a/src/main/java/jenkins/scm/impl/subversion/SubversionSCMSource.java b/src/main/java/jenkins/scm/impl/subversion/SubversionSCMSource.java
index b3d01fc4..5be2292b 100644
--- a/src/main/java/jenkins/scm/impl/subversion/SubversionSCMSource.java
+++ b/src/main/java/jenkins/scm/impl/subversion/SubversionSCMSource.java
@@ -116,6 +116,7 @@
import org.kohsuke.accmod.Restricted;
import org.kohsuke.accmod.restrictions.NoExternalUse;
import org.kohsuke.stapler.DataBoundSetter;
+import org.kohsuke.stapler.export.Exported;
import org.kohsuke.stapler.interceptor.RequirePOST;
/**
@@ -138,7 +139,15 @@ public class SubversionSCMSource extends SCMSource {
private String excludes = DescriptorImpl.DEFAULT_EXCLUDES;
private SubversionRepositoryBrowser browser;
-
+
+ private String excludedRegions = "";
+ private String includedRegions = "";
+ private String excludedUsers = "";
+ private String excludedCommitMessages = "";
+ private boolean ignoreDirPropChanges;
+ private boolean filterChangelog;
+ private boolean quietOperation;
+
private WorkspaceUpdater workspaceUpdater = new UpdateUpdater();
@GuardedBy("this")
@@ -235,6 +244,77 @@ public void setWorkspaceUpdater(WorkspaceUpdater workspaceUpdater) {
this.workspaceUpdater = workspaceUpdater;
}
+ @DataBoundSetter
+ public void setExcludedRegions(String excludedRegions) {
+ this.excludedRegions = excludedRegions;
+ }
+
+ @Exported
+ public String getExcludedRegions() {
+ return excludedRegions;
+ }
+
+ @DataBoundSetter
+ public void setIncludedRegions(String includedRegions) {
+ this.includedRegions = includedRegions;
+ }
+
+ @Exported
+ public String getIncludedRegions() {
+ return includedRegions;
+ }
+
+
+ @DataBoundSetter
+ public void setExcludedUsers(String excludedUsers) {
+ this.excludedUsers = excludedUsers;
+ }
+
+ @Exported
+ public String getExcludedUsers() {
+ return excludedUsers;
+ }
+
+ @DataBoundSetter
+ public void setExcludedCommitMessages(String excludedCommitMessages) {
+ this.excludedCommitMessages = excludedCommitMessages;
+ }
+
+ @Exported
+ public String getExcludedCommitMessages() {
+ return excludedCommitMessages;
+ }
+
+ @DataBoundSetter
+ public void setIgnoreDirPropChanges(boolean ignoreDirPropChanges) {
+ this.ignoreDirPropChanges = ignoreDirPropChanges;
+ }
+
+ @Exported
+ public boolean isIgnoreDirPropChanges() {
+ return ignoreDirPropChanges;
+ }
+
+ @DataBoundSetter
+ public void setFilterChangelog(boolean filterChangelog) {
+ this.filterChangelog = filterChangelog;
+ }
+
+ @Exported
+ public boolean isFilterChangelog() {
+ return filterChangelog;
+ }
+
+ @DataBoundSetter
+ public void setQuietOperation(boolean quietOperation) {
+ this.quietOperation = quietOperation;
+ }
+
+ @Exported
+ public boolean isQuietOperation() {
+ return quietOperation;
+ }
+
/**
* Gets the base SVN URL of the project.
*
@@ -729,7 +809,19 @@ public SubversionSCM build(@NonNull SCMHead head,
// name contains an @ so need to ensure there is an @ at the end of the name
remote.append('@');
}
- return new SubversionSCM(remote.toString(), credentialsId, ".", workspaceUpdater, browser);
+
+ return new SubversionSCM(
+ SubversionSCM.ModuleLocation.parse(
+ new String[]{remote.toString()},
+ new String[]{credentialsId},
+ new String[]{"."},
+ null,
+ null,
+ null),
+ workspaceUpdater,
+ browser,
+ excludedRegions, excludedUsers, null, excludedCommitMessages, includedRegions, ignoreDirPropChanges, filterChangelog,
+ null, quietOperation);
}
/**
diff --git a/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/config-detail.jelly b/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/config-detail.jelly
index 242c8869..07a0e706 100644
--- a/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/config-detail.jelly
+++ b/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/config-detail.jelly
@@ -40,4 +40,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-excludedCommitMessages.html b/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-excludedCommitMessages.html
new file mode 100644
index 00000000..658cdeb4
--- /dev/null
+++ b/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-excludedCommitMessages.html
@@ -0,0 +1,5 @@
+
+ If set, and Jenkins is set to poll for changes, Jenkins will ignore any revisions
+ with commit messages containing any of the given regular expressions when
+ determining if a build needs to be triggered.
+
diff --git a/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-excludedCommitMessages_de.html b/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-excludedCommitMessages_de.html
new file mode 100644
index 00000000..3319243a
--- /dev/null
+++ b/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-excludedCommitMessages_de.html
@@ -0,0 +1,5 @@
+
+ Wenn Jenkins Subversion nach Änderungen befragt (um gegebenenfalls einen
+ neuen Builds zu starten), werden alle Revisionen ignoriert, deren Commit-Kommentar
+ mindestens einen der hier angegebenen regulären Ausdrücke enthält.
+
diff --git a/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-excludedCommitMessages_ja.html b/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-excludedCommitMessages_ja.html
new file mode 100644
index 00000000..dd468b49
--- /dev/null
+++ b/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-excludedCommitMessages_ja.html
@@ -0,0 +1,4 @@
+
+ SCMをポーリングするように設定していると、ビルドを起動するかどうか決定する際に、
+ 設定した正規表現に合致するコミットメッセージを持つリビジョンを無視します。
+
diff --git a/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-excludedCommitMessages_zh_TW.html b/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-excludedCommitMessages_zh_TW.html
new file mode 100644
index 00000000..e1746917
--- /dev/null
+++ b/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-excludedCommitMessages_zh_TW.html
@@ -0,0 +1,4 @@
+
+ 設定後,如果 Jenkins 同時也被設定成輪詢變更,那麼在判斷是否要觸發建置時,會略過所有
+ Commit 訊息包含任一指定正規表示式的修訂版次。
+
diff --git a/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-excludedRegions.html b/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-excludedRegions.html
new file mode 100644
index 00000000..65cd5b01
--- /dev/null
+++ b/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-excludedRegions.html
@@ -0,0 +1,17 @@
+
+ If set, and Jenkins is set to poll for changes, Jenkins will ignore any files and/or
+ folders in this list when determining if a build needs to be triggered.
+
+ Each exclusion uses regular expression pattern matching, and must be separated by a new line.
+
+
+ /trunk/myapp/src/main/web/.*\.html
+ /trunk/myapp/src/main/web/.*\.jpeg
+ /trunk/myapp/src/main/web/.*\.gif
+
+ The example above illustrates that if only html/jpeg/gif files have been committed to
+ the SCM a build will not occur.
+
+ More information on regular expressions can be found
+
here.
+
diff --git a/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-excludedRegions_de.html b/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-excludedRegions_de.html
new file mode 100644
index 00000000..31c5d405
--- /dev/null
+++ b/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-excludedRegions_de.html
@@ -0,0 +1,19 @@
+
+ Ist dieses Feld nicht leer und das Projekt so konfiguriert, dass Jenkins regelmäßig
+ ein SVN-Repository nach Änderungen befragt, so werden dabei die hier angegebenen Dateien
+ und/oder Verzeichnisse bei der Bestimmung, ob ein neuer Build ausgelöst werden soll,
+ ignoriert.
+
Jeder Ausschluss kann reguläre Ausdrücke verwenden und muss ein einer eigenen Zeile stehen.
+ Im folgenden Beispiel wird
kein neuer Build ausgelöst, wenn nur html/jpeg/gif-Dateien geändert wurden.
+
+ /trunk/myapp/src/main/web/.*\.html
+ /trunk/myapp/src/main/web/.*\.jpeg
+ /trunk/myapp/src/main/web/.*\.gif
+
+
+
Diese Option kann auch gemeinsam mit der Option "Eingeschlossene Bereiche" verwendet werden.
+ In diesem Fall sind nur Dateien und/oder Verzeichnisse relevant, die zwar in den Einschlüssen enthalten,
+ aber in den Ausschlüssen
nicht enthalten sind.
+
+
Mehr zu regulären Ausdrücken....
+
diff --git a/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-excludedRegions_fr.html b/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-excludedRegions_fr.html
new file mode 100644
index 00000000..3bb605e7
--- /dev/null
+++ b/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-excludedRegions_fr.html
@@ -0,0 +1,12 @@
+
+ Si cette option est cochée et que Jenkins est configuré pour scruter les changements, Jenkins ignorera tout fichier ou répertoire de cette liste au moment où il cherchera à déterminer si un build doit être lancé.
+
Chaque clause d'exclusion utilise les expressions régulières et doit être séparée des autres par une nouvelle ligne.
+
+
+ /trunk/myapp/src/main/web/.*\.html
+ /trunk/myapp/src/main/web/.*\.jpeg
+ /trunk/myapp/src/main/web/.*\.gif
+
+ Dans l'exemple ci-dessus, si seuls des fichiers html/jpeg/gif ont été versionnées dans l'outil de gestion de version, un build n'aura pas lieu.
+
Plus d'information sur les expressions régulières peuvent être trouvés
ici.
+
diff --git a/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-excludedRegions_ja.html b/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-excludedRegions_ja.html
new file mode 100644
index 00000000..c33e7d82
--- /dev/null
+++ b/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-excludedRegions_ja.html
@@ -0,0 +1,12 @@
+
+ Jenkinsが変更をポーリングするように設定されている場合、ビルドを実行する必要があるかどうか判断する際に、このリストにあるファイルやフォルダを無視します。
+
リストには正規表現を使用し、改行で区切ります。
+
+
+ /trunk/myapp/src/main/web/.*\.html
+ /trunk/myapp/src/main/web/.*\.jpeg
+ /trunk/myapp/src/main/web/.*\.gif
+
+ 上記は、html/jpeg/gifファイルがSCMにコミットされても、ビルドは起動しない例です。
+
正規表現の詳細については、
こちらを参照してください。
+
diff --git a/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-excludedRegions_zh_TW.html b/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-excludedRegions_zh_TW.html
new file mode 100644
index 00000000..1d142601
--- /dev/null
+++ b/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-excludedRegions_zh_TW.html
@@ -0,0 +1,17 @@
+
+ 設定後,Jenkins 在輪詢變更判斷是否要觸發建置時,會略過列出的檔案或目錄。
+
+
+ 每一筆排除設定都是要用來比對的正規表示式,一行一筆。
+
+
+
+ /trunk/myapp/src/main/web/.*\.html
+ /trunk/myapp/src/main/web/.*\.jpeg
+ /trunk/myapp/src/main/web/.*\.gif
+
+ 上述例子示範在只有 Commit html, jpeg 及 gif 這些檔進 SCM 時不要觸發新建置。
+
+
+ 這裡有更多正規表示式的資訊。
+
diff --git a/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-excludedRevprop.html b/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-excludedRevprop.html
new file mode 100644
index 00000000..c1142bb6
--- /dev/null
+++ b/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-excludedRevprop.html
@@ -0,0 +1,10 @@
+
+ If set, and Jenkins is set to poll for changes, Jenkins will ignore any revisions
+ that are marked with the given revision property (revprop) when determining if
+ a build needs to be triggered. This can be used to exclude commits done by the
+ build itself from triggering another build, assuming the build server commits
+ the change with the correct revprop.
+
This type of exclusion only works with Subversion 1.5 servers and newer.
+
More information on revision properties can be found
+
here.
+
diff --git a/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-excludedRevprop_de.html b/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-excludedRevprop_de.html
new file mode 100644
index 00000000..73b00310
--- /dev/null
+++ b/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-excludedRevprop_de.html
@@ -0,0 +1,12 @@
+
+ Wenn Jenkins Subversion nach Änderungen befragt (um gegebenenfalls einen
+ neuen Build zu starten), werden alle Revisionen ignoriert, die eine der hier
+ angegebenen Revisionseigenschaften (revprop) enthalten. Dadurch können Sie
+ vermeiden, dass Builds, die das Subversion-Repository modifizieren, weitere,
+ ungewollte Builds auslösen.
+
+ Diese Funktion erfordert einen Subversion-Server Version 1.5 oder höher.
+
+ Mehr über Revisionseigenschaften (revprops) finden Sie
+
hier.
+
diff --git a/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-excludedRevprop_ja.html b/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-excludedRevprop_ja.html
new file mode 100644
index 00000000..4aae5f5d
--- /dev/null
+++ b/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-excludedRevprop_ja.html
@@ -0,0 +1,7 @@
+
+ SCMをポーリングするように設定していると、ビルドを起動するかどうか決定する際に、
+ 設定したリビジョン属性(revprop)でマークされたリビジョンを無視します。
+ ビルドサーバーがリビジョン属性を使用してコミットした場合、ビルド自身が行ったコミットによって他のビルドを起動しないようにすることもできます。
+
Subversion 1.5以降でのみ動作します。
+
リビジョン属性についての詳細は
こちらを参照してください。
+
diff --git a/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-excludedRevprop_zh_TW.html b/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-excludedRevprop_zh_TW.html
new file mode 100644
index 00000000..928640e9
--- /dev/null
+++ b/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-excludedRevprop_zh_TW.html
@@ -0,0 +1,10 @@
+
+ 設定後,Jenkins 在輪詢變更判斷是否要觸發建置時,會略過標有指定修訂屬性 (revprop) 的版次。
+ 要是建置伺服器 Commit 變更時有用正確的 revprop,就可以排除建置過程自己 Commit 的版次,避免重複建置。
+
+
+ 這種類型的排除條件只適用於 Subversion 伺服器 1.5 或是更新的版本。
+
+
+ 這裡可以找到更多修訂屬性的資訊。
+
diff --git a/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-excludedUsers.html b/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-excludedUsers.html
new file mode 100644
index 00000000..339d4065
--- /dev/null
+++ b/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-excludedUsers.html
@@ -0,0 +1,9 @@
+
+ If set, and Jenkins is set to poll for changes, Jenkins will ignore any revisions committed by users in this list when determining if a build needs to be triggered. This can be used to exclude commits done by the build itself from triggering another build, assuming the build server commits the change with a distinct SCM user.
+
Each exclusion uses literal pattern matching, and must be separated by a new line.
+
+
+ auto_build_user
+
+ The example above illustrates that if only revisions by "auto_build_user" have been committed to the SCM a build will not occur.
+
diff --git a/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-excludedUsers_de.html b/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-excludedUsers_de.html
new file mode 100644
index 00000000..bf6966b7
--- /dev/null
+++ b/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-excludedUsers_de.html
@@ -0,0 +1,13 @@
+
+ Wenn Jenkins Subversion nach Änderungen befragt (um gegebenenfalls einen
+ neuen Builds zu starten), werden alle Revisionen ignoriert, die von einem
+ der hier angegebenen Committer eingecheckt wurden.
+
+ Bei diesem Ausschluß müssen Sie vollständige Subversion-Benutzernamen angeben.
+ Bei mehreren Benutzernamen schreiben Sie diese in jeweils eine eigene Zeile.
+
+ auto_build_user
+
+
+ Das obige Beispiel würde
keine neuen Builds als Reaktion auf neue Revisionen des Committers "auto_build_user" auslösen.
+
diff --git a/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-excludedUsers_ja.html b/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-excludedUsers_ja.html
new file mode 100644
index 00000000..45272e5c
--- /dev/null
+++ b/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-excludedUsers_ja.html
@@ -0,0 +1,10 @@
+
+ SCMをポーリングするように設定していると、ビルドを起動するかどうか決定する際に、このリストにあるユーザーがコミットしたリビジョンを無視します。
+ ビルドサーバーが専用のSCMユーザーでコミットする場合、ビルド自身が行ったコミットによって他のビルドを起動しないようにすることもできます。
+
単純に文字の比較を行います。また、改行区切りです。
+
+
+ auto_build_user
+
+ 上記の例は、"auto_build_user"によってコミットされたリビジョンだけがビルドを起動しないことを表しています。
+
diff --git a/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-excludedUsers_zh_TW.html b/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-excludedUsers_zh_TW.html
new file mode 100644
index 00000000..ed9a6cef
--- /dev/null
+++ b/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-excludedUsers_zh_TW.html
@@ -0,0 +1,13 @@
+
+ 設定後,Jenkins 在輪詢判斷是否要觸發建置時,會略過由指定使用者所 Commit 的修訂版次。
+ 要是建置伺服器是使用其他 SCM 帳號 Commit 變更,就可以排除建置過程自己 Commit 的版次,避免重複建置。
+
+
+ 每一行輸入一個要排除的使用者名稱。
+
+
+
+ auto_build_user
+
+ 上例示範在只有 "auto_build_user" Commit 的修訂版本時不會觸發建置。
+
diff --git a/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-filterChangelog.html b/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-filterChangelog.html
new file mode 100644
index 00000000..4bea8627
--- /dev/null
+++ b/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-filterChangelog.html
@@ -0,0 +1,4 @@
+
+ If set Jenkins will apply the same inclusion and exclusion patterns for displaying changelog entries as it does for polling for changes.
+ If this is disabled, changes which are excluded for polling are still displayed in the changelog.
+
\ No newline at end of file
diff --git a/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-filterChangelog_zh_TW.html b/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-filterChangelog_zh_TW.html
new file mode 100644
index 00000000..88f9b716
--- /dev/null
+++ b/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-filterChangelog_zh_TW.html
@@ -0,0 +1,4 @@
+
+ 設定後,Jenkins 在顯示變更記錄時也使用與輪詢變更相同的排除、包含規則。
+ 如果停用本功能,輪詢時被排除的變更就會顯示在變更記錄中。
+
\ No newline at end of file
diff --git a/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-ignoreDirPropChanges.html b/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-ignoreDirPropChanges.html
new file mode 100644
index 00000000..11856402
--- /dev/null
+++ b/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-ignoreDirPropChanges.html
@@ -0,0 +1,7 @@
+
+ If set, Jenkins ignores svn-property only changes of directories.
+ These changes are ignored when determining whether a build should be triggered and are removed from a
+ build's changeset.
+ Main usage of this property is to ignore svn:mergeinfo changes (which would otherwise e.g. lead to a complete rebuild
+ of a maven project, in spite of incremental build option).
+
diff --git a/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-ignoreDirPropChanges_zh_TW.html b/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-ignoreDirPropChanges_zh_TW.html
new file mode 100644
index 00000000..32d34ba9
--- /dev/null
+++ b/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-ignoreDirPropChanges_zh_TW.html
@@ -0,0 +1,5 @@
+
+ 設定後,Jenkins 會略過只有 SVN 屬性異動的變更。
+ 這些變更在判斷是否觸發建置時會被略過,也會從建置的變更記錄中移除。
+ 這個選項主要是用來忽略 svn:mergeinfo 變更 (不然不管有沒有用「累進建置」,Maven 專案都會重新建置)。
+
diff --git a/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-includedRegions.html b/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-includedRegions.html
new file mode 100644
index 00000000..6dd0fc22
--- /dev/null
+++ b/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-includedRegions.html
@@ -0,0 +1,22 @@
+
+ If set, and Jenkins is set to poll for changes, Jenkins will ignore any files and/or
+ folders that are
not in this list when determining if a build needs to be triggered.
+
+ Each inclusion uses regular expression pattern matching, and must be separated by a new line.
+
+ This is useful when you need to check out an entire resource for building, but only want to do
+ the build when a subset has changed.
+
+
+ /trunk/myapp/c/library1/.*
+ /trunk/myapp/c/library2/.*
+
+ If /trunk/myapp is checked out, the build will only occur when there are changes to
+ either the c/library1 and c/library2 subtrees.
+
+ If there are also excluded regions specified, then a file is not ignored when it is in
+ the included list and
not in the excluded list.
+
+ More information on regular expressions can be found
+
here.
+
diff --git a/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-includedRegions_de.html b/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-includedRegions_de.html
new file mode 100644
index 00000000..6aeac792
--- /dev/null
+++ b/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-includedRegions_de.html
@@ -0,0 +1,30 @@
+
+ Ist dieses Feld nicht leer und das Projekt so konfiguriert, dass Jenkins regelmäßig
+ ein SVN-Repository nach Änderungen befragt, so werden dabei alle Dateien
+ und/oder Verzeichnisse bei der Bestimmung, ob ein neuer Build ausgelöst werden soll,
+ ignoriert, die
nicht in den hier angegebenen Bereichen liegen.
+
+ Jeder Einschluß kann reguläre Ausdrücke verwenden und muss ein einer eigenen Zeile stehen.
+
+
+ Diese Option ist nützlich, wenn zwar ein ganzer Zweig aus dem Repository zum Bauen
+ ausgecheckt werden soll, aber nur Änderungen in einem Unterbereich davon neue Builds
+ auslösen sollen.
+
+
+ Beispiel: Ihr Projekt checkt zum Bauen /trunk/myapp aus. Neue Builds sollen aber nur
+ bei Änderungen unterhalb von /trunk/myapp/c/library1 oder /trunk/myapp/c/library2
+ ausgelöst werden. Sie würden in diesem Fall hier angeben:
+
+
+ /trunk/myapp/c/library1/.*
+ /trunk/myapp/c/library2/.*
+
+
+
Diese Option kann auch gemeinsam mit der Option "Ausgeschlossene Bereiche" verwendet werden.
+ In diesem Fall sind nur Dateien und/oder Verzeichnisse relevant, die zwar in den Einschlüssen enthalten,
+ aber in den Ausschlüssen
nicht enthalten sind.
+
+
+
Mehr zu regulären Ausdrücken....
+
diff --git a/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-includedRegions_ja.html b/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-includedRegions_ja.html
new file mode 100644
index 00000000..416583f4
--- /dev/null
+++ b/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-includedRegions_ja.html
@@ -0,0 +1,18 @@
+
+ Jenkinsが変更をポーリングするように設定されている場合、ビルドを実行する必要があるかどうか判断する際に、
+ このリストに
ないファイルやフォルダを無視します。
+
+ リストには正規表現を使用し、改行で区切ります。
+
+ ビルドのために全てのリソースをチェックアウトする必要があっても、その一部分が変わった時だけビルドしたい場合に使用します。
+
+
+ /trunk/myapp/c/library1/.*
+ /trunk/myapp/c/library2/.*
+
+ 上記の場合、/trunk/myappをチェックアウトしても、c/library1とc/library2に変更がある場合のみビルドを実行します。
+
+ 対象外範囲が設定されている場合、対象範囲のリストに含まれていて、対象外範囲のリストに
含まれていないファイルは無視されません。
+
+ 正規表現の詳細については、
こちらを参照してください。
+
diff --git a/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-includedRegions_zh_TW.html b/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-includedRegions_zh_TW.html
new file mode 100644
index 00000000..d229cb8e
--- /dev/null
+++ b/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-includedRegions_zh_TW.html
@@ -0,0 +1,22 @@
+
+ 設定後,Jenkins 在輪詢判斷是否要觸發建置時,會略過
不在這個清單裡的任何檔案或目錄。
+
+
+ 每一筆排除設定都是要用來比對的正規表示式,一行一筆。
+
+
+ 如果您在建置時需要 Check Out 完整的檔案,但只想在部分檔案有變更時才建置,就可以用這個功能。
+
+
+
+ /trunk/myapp/c/library1/.*
+ /trunk/myapp/c/library2/.*
+
+ 假設 Check Out 了 /trunk/myapp,那只有在 c/library1 或 c/library2 子目錄裡有變更時才會建置。
+
+
+ 如果同時也設定了要排除的區域,檔案同時在要包含的清單,而且不在要排除的清單中時才不會被略過。
+
+
+ 這裡有更多正規表示式的資訊。
+
diff --git a/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-quietOperation.html b/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-quietOperation.html
new file mode 100644
index 00000000..dfef5bbf
--- /dev/null
+++ b/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-quietOperation.html
@@ -0,0 +1,3 @@
+
+
Mimics subversion command line --quiet parameter for check out / update operations to help keep the output shorter. Prints nothing, or only summary information.
+
\ No newline at end of file
diff --git a/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-quietOperation_zh_TW.html b/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-quietOperation_zh_TW.html
new file mode 100644
index 00000000..19dedfa0
--- /dev/null
+++ b/src/main/resources/jenkins/scm/impl/subversion/SubversionSCMSource/help-quietOperation_zh_TW.html
@@ -0,0 +1,3 @@
+
+
模仿 Subversion 客户端命令 --quiet 選項於 Check Out / Update 子命所顯示的訊息。請求客戶端在執行操作時只顯示重要信息。
+
\ No newline at end of file
diff --git a/src/test/java/hudson/scm/SubversionSCMTest.java b/src/test/java/hudson/scm/SubversionSCMTest.java
index 292767fe..c8a7f34b 100644
--- a/src/test/java/hudson/scm/SubversionSCMTest.java
+++ b/src/test/java/hudson/scm/SubversionSCMTest.java
@@ -128,6 +128,11 @@
import java.util.Date;
import java.util.List;
import java.util.Optional;
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.PreparedStatement;
+import java.util.*;
+import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
import static org.junit.jupiter.api.Assertions.assertEquals;
@@ -1947,4 +1952,80 @@ private static File newFolder(File root, String... subDirs) throws IOException {
}
return result;
}
-}
+
+ void lockWorkspace(String dbFile, String pathToLock) throws Exception {
+ Class.forName("org.sqlite.SQLiteJDBCLoader");
+ Connection conn = DriverManager.getConnection("jdbc:sqlite:" + dbFile);
+ PreparedStatement stmt = conn.prepareStatement("INSERT INTO WC_LOCK VALUES(1, ?, 1)");
+ stmt.setString(1, pathToLock);
+ stmt.executeUpdate();
+ conn.close();
+ }
+
+ @Issue("JENKINS-47803")
+ @Test
+ public void lockedExternal() throws Exception {
+ Proc p = runSvnServe(getClass().getResource("JENKINS-777.zip"));
+
+ try {
+ configureSvnWorkspaceFormat(SubversionWorkspaceSelector.WC_FORMAT_17);
+
+ FreeStyleProject b = r.createFreeStyleProject();
+
+ ModuleLocation[] locations = {
+ new ModuleLocation("svn://localhost/jenkins-777/proja", "proja", "infinity", false)
+ };
+
+ // do initial checkout
+ b.setScm(new SubversionSCM(Arrays.asList(locations), new UpdateUpdater(), null, null, null, null, null, null));
+ FreeStyleBuild build = r.assertBuildStatusSuccess(b.scheduleBuild2(0));
+
+ // Check that the external exists
+ FilePath ws = build.getWorkspace();
+ assertTrue(ws.child("proja").child("externals").child("projb").exists());
+
+ // mark external as locked
+ String db = ws.child("proja").child("externals").child("projb").child(".svn").child("wc.db").getRemote();
+ lockWorkspace(db, "externals");
+
+ // start second build and check if workspace is being reset (just check for the log)
+ build = r.assertBuildStatusSuccess(b.scheduleBuild2(0));
+ r.assertLogContains("Workspace appear to be locked, so getting a fresh workspace", build);
+ } finally {
+ p.kill();
+ }
+ }
+
+ @Test
+ public void ensureCancelOnExternalsFail() throws Exception {
+ Proc p = runSvnServe(getClass().getResource("JENKINS-777.zip"));
+
+ try {
+ configureSvnWorkspaceFormat(SubversionWorkspaceSelector.WC_FORMAT_17);
+
+ FreeStyleProject b = r.createFreeStyleProject();
+
+ ModuleLocation[] locations = {
+ new ModuleLocation("svn://localhost/jenkins-777/proja", null, "proja", "infinity", false, true)
+ };
+
+ // do initial checkout
+ b.setScm(new SubversionSCM(Arrays.asList(locations), new UpdateUpdater(), null, null, null, null, null, null));
+ FreeStyleBuild build = r.assertBuildStatusSuccess(b.scheduleBuild2(0));
+
+ // Check that the external exists
+ FilePath ws = build.getWorkspace();
+ assertTrue(ws.child("proja").child("externals").child("projb").exists());
+
+ // mark external as locked
+ String db = ws.child("proja").child("externals").child("projb").child(".svn").child("wc.db").getRemote();
+ lockWorkspace(db, "externals");
+
+ // start second build and check if build is canceled, caused by external failure
+ build = r.assertBuildStatus(Result.FAILURE, b.scheduleBuild2(0));
+ r.assertLogContains("Failed processing one or more externals definitions", build);
+ } finally {
+ p.kill();
+ }
+ }
+}
\ No newline at end of file