Skip to content

Commit 11e99da

Browse files
committed
Add configuration option for the frequency that branches are checked remotely.
1 parent 52047c0 commit 11e99da

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

package.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,13 @@
346346
"Relative path for 'tags' in SVN URL, 'null' to disable. (Ex.: 'tags', 'stamps')",
347347
"default": "tags"
348348
},
349+
"svn.layout.update": {
350+
"type": "number",
351+
"minimum": 0,
352+
"description":
353+
"How frequently (in seconds) to check layout changes. Set to `0` to avoid periodic checks.",
354+
"default": 300
355+
},
349356
"svn.multipleFolders.enabled": {
350357
"type": "boolean",
351358
"description": "Allow to find subfolders using SVN",

src/repository.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,12 @@ export class Repository {
147147
this.disposables.push(
148148
toDisposable(() => clearInterval(this.branchesTimer))
149149
);
150-
setInterval(() => {
151-
this.updateBranches();
152-
}, 1000 * 60 * 5); // 5 minutes
150+
const svnConfig = workspace.getConfiguration("svn");
151+
const updateFreq = svnConfig.get<number>("layout.update");
152+
if (updateFreq)
153+
setInterval(() => {
154+
this.updateBranches();
155+
}, 1000 * updateFreq);
153156

154157
this.updateBranches();
155158
this.update();

0 commit comments

Comments
 (0)