Skip to content

Commit 58eaebe

Browse files
committed
fixed changed typo and removed incoming changed resourcegroup
1 parent 22810ad commit 58eaebe

File tree

2 files changed

+20
-26
lines changed

2 files changed

+20
-26
lines changed

src/repository.ts

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export class Repository {
5858
public statusBar: SvnStatusBar;
5959
public changes: ISvnResourceGroup;
6060
public unversioned: ISvnResourceGroup;
61-
public remoteChanged?: ISvnResourceGroup;
61+
public remoteChanges?: Resource[];
6262
public changelists: Map<string, ISvnResourceGroup> = new Map();
6363
public conflicts: ISvnResourceGroup;
6464
public statusIgnored: IFileStatus[] = [];
@@ -122,8 +122,8 @@ export class Repository {
122122
group.resourceStates = [];
123123
});
124124

125-
if (this.remoteChanged) {
126-
this.remoteChanged.dispose();
125+
if (this.remoteChanges) {
126+
this.remoteChanges = [];
127127
}
128128

129129
this.isIncomplete = false;
@@ -321,7 +321,7 @@ export class Repository {
321321
const external: any[] = [];
322322
const conflicts: any[] = [];
323323
const changelists: Map<string, Resource[]> = new Map();
324-
const remoteChanged: any[] = [];
324+
const remoteChanges: any[] = [];
325325

326326
this.statusExternal = [];
327327
this.statusIgnored = [];
@@ -406,7 +406,7 @@ export class Repository {
406406
: undefined;
407407

408408
if (status.reposStatus) {
409-
remoteChanged.push(
409+
remoteChanges.push(
410410
new Resource(
411411
uri,
412412
status.reposStatus.item,
@@ -515,18 +515,14 @@ export class Repository {
515515
/**
516516
* Destroy and create for keep at last position
517517
*/
518-
if (this.remoteChanged) {
519-
this.remoteChanged.dispose();
518+
if (this.remoteChanges) {
519+
this.remoteChanges = [];
520520
}
521-
this.remoteChanged = this.sourceControl.createResourceGroup(
522-
"remotechanged",
523-
"Remote Changes"
524-
) as ISvnResourceGroup;
525-
this.remoteChanged.hideWhenEmpty = true;
526-
this.remoteChanged.resourceStates = remoteChanged;
527-
528-
if (remoteChanged.length !== this.remoteChangedFiles) {
529-
this.remoteChangedFiles = remoteChanged.length;
521+
522+
this.remoteChanges = remoteChanges;
523+
524+
if (remoteChanges.length !== this.remoteChangedFiles) {
525+
this.remoteChangedFiles = remoteChanges.length;
530526
this._onDidChangeRemoteChangedFiles.fire();
531527
}
532528
}

src/treeView/nodes/incomingChangesNode.ts

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,17 @@ export default class IncomingChangesNode implements BaseNode {
2222
}
2323

2424
public async getChildren(): Promise<BaseNode[]> {
25-
if (!this.repository.remoteChanged) {
25+
if (!this.repository.remoteChanges) {
2626
return [];
2727
}
2828

29-
const changes = this.repository.remoteChanged.resourceStates.map(
30-
remoteChange => {
31-
return new IncommingChangeNode(
32-
remoteChange.resourceUri,
33-
remoteChange.type,
34-
this.repository
35-
);
36-
}
37-
);
29+
const changes = this.repository.remoteChanges.map(remoteChange => {
30+
return new IncommingChangeNode(
31+
remoteChange.resourceUri,
32+
remoteChange.type,
33+
this.repository
34+
);
35+
});
3836

3937
if (changes.length === 0) {
4038
return [new NoIncomingChangesNode()];

0 commit comments

Comments
 (0)