Skip to content

Commit e295005

Browse files
committed
fix: Removed ask which repo on refresh remote changes (Close #371)
1 parent 7ce1d44 commit e295005

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

src/common/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ export enum Operation {
107107

108108
export interface ISvnResourceGroup extends SourceControlResourceGroup {
109109
resourceStates: Resource[];
110+
repository?: Repository;
110111
}
111112

112113
export interface IWcStatus {

src/model.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {
66
Disposable,
77
Event,
88
EventEmitter,
9+
SourceControlResourceGroup,
910
Uri,
1011
window,
1112
workspace,
@@ -343,6 +344,12 @@ export class Model implements IDisposable {
343344
return this.openRepositories.find(r => r.repository === hint);
344345
}
345346

347+
if ((hint as any).repository instanceof Repository) {
348+
return this.openRepositories.find(
349+
r => r.repository === (hint as any).repository
350+
);
351+
}
352+
346353
if (typeof hint === "string") {
347354
hint = Uri.file(hint);
348355
}

src/repository.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -665,6 +665,7 @@ export class Repository {
665665
"Remote Changes"
666666
) as ISvnResourceGroup;
667667

668+
this.remoteChanges.repository = this;
668669
this.remoteChanges.hideWhenEmpty = true;
669670
this.remoteChanges.resourceStates = tempResourceStates;
670671
}

0 commit comments

Comments
 (0)