Skip to content

Commit 44c99ce

Browse files
committed
Fix Svn Adapter to be more specific in the workspace check
Now ignores externals declaration itself, of course not the changes in the externals And ensures that the svn status char like ?, M, A, X, etc is followed by a space.
1 parent 05b857e commit 44c99ce

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

src/main/groovy/net/researchgate/release/SvnAdapter.groovy

+14-7
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,20 @@ class SvnAdapter extends BaseScmAdapter {
7171
def changes = []
7272
def unknown = []
7373
out.eachLine { line ->
74-
switch (line?.trim()?.charAt(0)) {
75-
case '?':
76-
unknown << line
77-
break
78-
default:
79-
changes << line
80-
break
74+
line = line.trim()
75+
if (line.length() >= 2 && line.charAt(1) == ' ' as char) {
76+
switch (line.charAt(0)) {
77+
case '?':
78+
log.info('Unknown file: ' + line)
79+
unknown << line
80+
break
81+
case 'X': // ignore externals declaration
82+
break
83+
default:
84+
log.info('Changed file: ' + line)
85+
changes << line
86+
break
87+
}
8188
}
8289
}
8390
if (changes) {

0 commit comments

Comments
 (0)