File tree 4 files changed +37
-1
lines changed
4 files changed +37
-1
lines changed Original file line number Diff line number Diff line change @@ -90,6 +90,8 @@ Example:
90
90
| ` svn.autorefresh ` | Whether auto refreshing is enabled| ` true ` |
91
91
| ` svn.decorations.enabled ` | Controls if SVN contributes colors and badges to the explorer and the open (VSCode \> = 1.18 with proposed-api)| ` true ` |
92
92
| ` svn.path ` | Path to the svn executable| ` null ` |
93
+ | ` svn.defaultCheckoutDirectory ` | The default location to checkout a svn repository.| ` null ` |
94
+ | ` svn.ignoreRepositories ` | List of SVN repositories to ignore.| ` null ` |
93
95
| ` svn.ignoreMissingSvnWarning ` | Ignores the warning when SVN is missing| ` false ` |
94
96
| ` svn.ignoreWorkingCopyIsTooOld ` | Ignores the warning when working copy is too old| ` false ` |
95
97
| ` svn.diff.withHead ` | Show diff changes using latest revision in the repository. Set false to use latest revision in local folder| ` true ` |
Original file line number Diff line number Diff line change 602
602
"default" : null ,
603
603
"description" : " The default location to checkout a svn repository."
604
604
},
605
+ "svn.ignoreRepositories" : {
606
+ "type" : [
607
+ " array" ,
608
+ null
609
+ ],
610
+ "default" : null ,
611
+ "scope" : " resource" ,
612
+ "description" : " List of SVN repositories to ignore."
613
+ },
605
614
"svn.ignoreMissingSvnWarning" : {
606
615
"type" : " boolean" ,
607
616
"description" : " Ignores the warning when SVN is missing" ,
Original file line number Diff line number Diff line change @@ -27,7 +27,8 @@ import {
27
27
dispose ,
28
28
filterEvent ,
29
29
IDisposable ,
30
- isDescendant
30
+ isDescendant ,
31
+ normalizePath
31
32
} from "./util" ;
32
33
33
34
export class Model implements IDisposable {
@@ -277,6 +278,19 @@ export class Model implements IDisposable {
277
278
}
278
279
279
280
if ( isSvnFolder ) {
281
+ // Config based on folder path
282
+ const resourceConfig = workspace . getConfiguration ( "svn" , Uri . file ( path ) ) ;
283
+
284
+ const ignoredRepos = new Set (
285
+ ( resourceConfig . get < string [ ] > ( "ignoreRepositories" ) || [ ] ) . map ( p =>
286
+ normalizePath ( p )
287
+ )
288
+ ) ;
289
+
290
+ if ( ignoredRepos . has ( normalizePath ( path ) ) ) {
291
+ return ;
292
+ }
293
+
280
294
try {
281
295
const repositoryRoot = await this . svn . getRepositoryRoot ( path ) ;
282
296
Original file line number Diff line number Diff line change @@ -76,6 +76,17 @@ export function fixPathSeparator(file: string) {
76
76
return file ;
77
77
}
78
78
79
+ export function normalizePath ( file : string ) {
80
+ file = fixPathSeparator ( file ) ;
81
+
82
+ // IF Windows
83
+ if ( sep === "\\" ) {
84
+ file = file . toLowerCase ( ) ;
85
+ }
86
+
87
+ return file ;
88
+ }
89
+
79
90
export function isDescendant ( parent : string , descendant : string ) : boolean {
80
91
parent = parent . replace ( / [ \\ \/ ] / g, sep ) ;
81
92
descendant = descendant . replace ( / [ \\ \/ ] / g, sep ) ;
You can’t perform that action at this time.
0 commit comments