Skip to content

Commit b28d305

Browse files
committed
added refresh button to source control view
1 parent 2ca3796 commit b28d305

File tree

6 files changed

+34
-1
lines changed

6 files changed

+34
-1
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
**FILL ME**
2+
=============================================
3+
4+
## What's New
5+
- Added refresh button to source control view
6+
17
**v0.9.0**
28
=============================================
39

icons/dark/refresh.svg

Lines changed: 1 addition & 0 deletions
Loading

icons/light/refresh.svg

Lines changed: 1 addition & 0 deletions
Loading

package.json

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,26 @@
4949
"command": "svn.commit",
5050
"title": "Commit Selected",
5151
"category": "SVN"
52+
},
53+
{
54+
"command": "svn.refresh",
55+
"title": "Refresh",
56+
"category": "SVN",
57+
"icon": {
58+
"light": "icons/light/refresh.svg",
59+
"dark": "icons/dark/refresh.svg"
60+
}
5261
}
5362
],
5463
"menus": {
5564
"commandPalette": [],
56-
"scm/title": [],
65+
"scm/title": [
66+
{
67+
"command": "svn.refresh",
68+
"group": "navigation",
69+
"when": "scmProvider == svn"
70+
}
71+
],
5772
"scm/resourceGroup/context": [],
5873
"scm/resourceState/context": [
5974
{

src/commands.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ function SvnCommands(model) {
2424
commandId: "svn.commit",
2525
method: this.commit,
2626
options: { repository: true }
27+
},
28+
{
29+
commandId: "svn.refresh",
30+
method: this.refresh,
31+
options: { repository: true }
2732
}
2833
];
2934

@@ -125,4 +130,8 @@ SvnCommands.prototype.commit = async function(repository, ...args) {
125130
}
126131
};
127132

133+
SvnCommands.prototype.refresh = function(repository) {
134+
repository.update();
135+
};
136+
128137
module.exports = SvnCommands;

src/repository.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ Repository.prototype.provideOriginalResource = uri => {
4646
};
4747

4848
Repository.prototype.update = async function() {
49+
console.log("here");
4950
let changes = [];
5051
let notTracked = [];
5152
let statuses = (await this.repository.getStatus().catch(() => {})) || [];

0 commit comments

Comments
 (0)