@@ -27,6 +27,7 @@ export class Repository {
27
27
public sourceControl : SourceControl ;
28
28
public changes : SourceControlResourceGroup ;
29
29
public notTracked : SourceControlResourceGroup ;
30
+ public external : SourceControlResourceGroup ;
30
31
private disposables : Disposable [ ] = [ ] ;
31
32
public currentBranch = "" ;
32
33
public isSwitchingBranch : boolean = false ;
@@ -127,9 +128,14 @@ export class Repository {
127
128
"unversioned" ,
128
129
"Not Tracked"
129
130
) ;
131
+ this . external = this . sourceControl . createResourceGroup (
132
+ "external" ,
133
+ "External"
134
+ ) ;
130
135
131
136
this . changes . hideWhenEmpty = true ;
132
137
this . notTracked . hideWhenEmpty = true ;
138
+ this . external . hideWhenEmpty = true ;
133
139
134
140
this . disposables . push (
135
141
toDisposable ( ( ) => clearInterval ( this . branchesTimer ) )
@@ -155,9 +161,11 @@ export class Repository {
155
161
async update ( ) {
156
162
let changes : any [ ] = [ ] ;
157
163
let notTracked : any [ ] = [ ] ;
164
+ let external : any [ ] = [ ] ;
158
165
const statuses = ( await this . repository . getStatus ( ) ) || [ ] ;
159
166
160
167
const fileConfig = workspace . getConfiguration ( "files" ) ;
168
+ const svnConfig = workspace . getConfiguration ( "svn" ) ;
161
169
162
170
const filesToExclude = fileConfig . get < any > ( "exclude" , { } ) ;
163
171
@@ -177,7 +185,9 @@ export class Repository {
177
185
? Uri . file ( path . join ( this . workspaceRoot , status . rename ) )
178
186
: undefined ;
179
187
180
- if ( status . status === Status . UNVERSIONED ) {
188
+ if ( status . status === Status . EXTERNAL ) {
189
+ external . push ( new Resource ( uri , status . status , renameUri ) ) ;
190
+ } else if ( status . status === Status . UNVERSIONED ) {
181
191
const matches = status . path . match (
182
192
/ ( .+ ?) \. ( m i n e | w o r k i n g | m e r g e - \w + \. r \d + | r \d + ) $ /
183
193
) ;
@@ -200,6 +210,12 @@ export class Repository {
200
210
this . changes . resourceStates = changes ;
201
211
this . notTracked . resourceStates = notTracked ;
202
212
213
+ if ( svnConfig . get < boolean > ( "sourceControl.showExternal" ) ) {
214
+ this . external . resourceStates = external ;
215
+ } else {
216
+ this . external . resourceStates = [ ] ;
217
+ }
218
+
203
219
this . currentBranch = await this . getCurrentBranch ( ) ;
204
220
205
221
this . _onDidChangeStatus . fire ( ) ;
0 commit comments