Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions src/repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,12 +188,9 @@ export class Repository implements IRemoteRepository {
this.disposables.push(this._fsWatcher);

this._fsWatcher.onDidAny(this.onFSChange, this, this.disposables);

// TODO on svn switch event fired two times since two files were changed
this._fsWatcher.onDidSvnAny(
async (e: Uri) => {
await this.repository.updateInfo();
this._onDidChangeRepository.fire(e);
await this.onDidAnyFileChanged(e);
},
this,
this.disposables
Expand Down Expand Up @@ -292,6 +289,12 @@ export class Repository implements IRemoteRepository {
);
}

@debounce(1000)
private async onDidAnyFileChanged(e: Uri) {
await this.repository.updateInfo();
this._onDidChangeRepository.fire(e);
}

private createRemoteChangedInterval() {
const updateFreq = configuration.get<number>(
"remoteChanges.checkFrequency",
Expand Down