File tree Expand file tree Collapse file tree 4 files changed +37
-1
lines changed
Expand file tree Collapse file tree 4 files changed +37
-1
lines changed Original file line number Diff line number Diff line change @@ -90,6 +90,8 @@ Example:
9090| ` svn.autorefresh ` | Whether auto refreshing is enabled| ` true ` |
9191| ` svn.decorations.enabled ` | Controls if SVN contributes colors and badges to the explorer and the open (VSCode \> = 1.18 with proposed-api)| ` true ` |
9292| ` 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 ` |
9395| ` svn.ignoreMissingSvnWarning ` | Ignores the warning when SVN is missing| ` false ` |
9496| ` svn.ignoreWorkingCopyIsTooOld ` | Ignores the warning when working copy is too old| ` false ` |
9597| ` 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 602602 "default" : null ,
603603 "description" : " The default location to checkout a svn repository."
604604 },
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+ },
605614 "svn.ignoreMissingSvnWarning" : {
606615 "type" : " boolean" ,
607616 "description" : " Ignores the warning when SVN is missing" ,
Original file line number Diff line number Diff line change @@ -27,7 +27,8 @@ import {
2727 dispose ,
2828 filterEvent ,
2929 IDisposable ,
30- isDescendant
30+ isDescendant ,
31+ normalizePath
3132} from "./util" ;
3233
3334export class Model implements IDisposable {
@@ -277,6 +278,19 @@ export class Model implements IDisposable {
277278 }
278279
279280 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+
280294 try {
281295 const repositoryRoot = await this . svn . getRepositoryRoot ( path ) ;
282296
Original file line number Diff line number Diff line change @@ -76,6 +76,17 @@ export function fixPathSeparator(file: string) {
7676 return file ;
7777}
7878
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+
7990export function isDescendant ( parent : string , descendant : string ) : boolean {
8091 parent = parent . replace ( / [ \\ \/ ] / g, sep ) ;
8192 descendant = descendant . replace ( / [ \\ \/ ] / g, sep ) ;
You can’t perform that action at this time.
0 commit comments