Skip to content

Commit 7ce1d44

Browse files
authored
Merge pull request #370 from edgardmessias/refresh_remote
feat: Added refresh button for remote changes (#366)
2 parents 825c3a4 + 8f2567d commit 7ce1d44

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

package.json

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,15 @@
164164
"dark": "icons/dark/refresh.svg"
165165
}
166166
},
167+
{
168+
"command": "svn.refreshRemoteChanges",
169+
"title": "Refresh Remote Changes",
170+
"category": "SVN",
171+
"icon": {
172+
"light": "icons/light/refresh.svg",
173+
"dark": "icons/dark/refresh.svg"
174+
}
175+
},
167176
{
168177
"command": "svn.switchBranch",
169178
"title": "Switch Branch",
@@ -446,7 +455,18 @@
446455
"when": "scmProvider == svn"
447456
}
448457
],
449-
"scm/resourceGroup/context": [],
458+
"scm/resourceGroup/context": [
459+
{
460+
"command": "svn.refreshRemoteChanges",
461+
"when": "config.svn.enabled && scmProvider == svn && scmResourceGroup == remotechanges",
462+
"group": "inline"
463+
},
464+
{
465+
"command": "svn.refreshRemoteChanges",
466+
"when": "config.svn.enabled && scmProvider == svn && scmResourceGroup == remotechanges",
467+
"group": "navigation"
468+
}
469+
],
450470
"scm/resourceState/context": [
451471
{
452472
"command": "svn.add",

src/commands.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -508,6 +508,11 @@ export class SvnCommands implements IDisposable {
508508
}
509509
}
510510

511+
@command("svn.refreshRemoteChanges", { repository: true })
512+
public async refreshRemoteChanges(repository: Repository) {
513+
await repository.updateRemoteChangedFiles();
514+
}
515+
511516
@command("svn.openResourceBase")
512517
public async openResourceBase(resource: Resource): Promise<void> {
513518
await this._openResource(resource, "BASE", undefined, true, false);

0 commit comments

Comments
 (0)