File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ export class Repository {
22
22
public changes : SourceControlResourceGroup ;
23
23
public notTracked : SourceControlResourceGroup ;
24
24
private disposables : Disposable [ ] = [ ] ;
25
+ public branch = "" ;
25
26
26
27
private _onDidChangeStatus = new EventEmitter < void > ( ) ;
27
28
readonly onDidChangeStatus : Event < void > = this . _onDidChangeStatus . event ;
@@ -128,6 +129,8 @@ export class Repository {
128
129
this . changes . resourceStates = changes ;
129
130
this . notTracked . resourceStates = notTracked ;
130
131
132
+ this . branch = await this . getCurrentBranch ( ) ;
133
+
131
134
this . _onDidChangeStatus . fire ( ) ;
132
135
133
136
return Promise . resolve ( ) ;
@@ -155,4 +158,8 @@ export class Repository {
155
158
dispose ( ) : void {
156
159
this . disposables = dispose ( this . disposables ) ;
157
160
}
161
+
162
+ getCurrentBranch ( ) {
163
+ return this . repository . getCurrentBranch ( ) ;
164
+ }
158
165
}
Original file line number Diff line number Diff line change @@ -18,14 +18,14 @@ export class SvnStatusBar {
18
18
}
19
19
20
20
get commands ( ) {
21
- // const title = `$(git-branch) ${this.repository.headLabel }`;
21
+ const title = `$(git-branch) ${ this . repository . branch } ` ;
22
22
23
23
return [
24
24
{
25
- command : "svn.refresh " ,
26
- tooltip : "TEST " ,
27
- title : "TEST" ,
28
- arguments : [ this ]
25
+ command : "svn.checkout " ,
26
+ tooltip : "Checkout... " ,
27
+ title,
28
+ arguments : [ this . repository ]
29
29
}
30
30
] ;
31
31
}
You can’t perform that action at this time.
0 commit comments