@@ -29,6 +29,7 @@ export class Repository {
2929 public unversioned : SourceControlResourceGroup ;
3030 public external : SourceControlResourceGroup ;
3131 public changelists : Map < string , SourceControlResourceGroup > = new Map ( ) ;
32+ public conflicts : SourceControlResourceGroup ;
3233 private disposables : Disposable [ ] = [ ] ;
3334 public currentBranch = "" ;
3435 public isSwitchingBranch : boolean = false ;
@@ -133,10 +134,15 @@ export class Repository {
133134 "external" ,
134135 "External"
135136 ) ;
137+ this . conflicts = this . sourceControl . createResourceGroup (
138+ "conflicts" ,
139+ "conflicts"
140+ ) ;
136141
137142 this . changes . hideWhenEmpty = true ;
138143 this . unversioned . hideWhenEmpty = true ;
139144 this . external . hideWhenEmpty = true ;
145+ this . conflicts . hideWhenEmpty = true ;
140146
141147 this . disposables . push (
142148 toDisposable ( ( ) => clearInterval ( this . branchesTimer ) )
@@ -163,14 +169,15 @@ export class Repository {
163169 let changes : any [ ] = [ ] ;
164170 let unversioned : any [ ] = [ ] ;
165171 let external : any [ ] = [ ] ;
172+ let conflicts : any [ ] = [ ] ;
166173 let changelists : Map < string , Resource [ ] > = new Map ( ) ;
167174
168175 const statuses = ( await this . repository . getStatus ( ) ) || [ ] ;
169176
170- const fileConfig = workspace . getConfiguration ( "files" ) ;
177+ const fileConfig = workspace . getConfiguration ( "files" , Uri . file ( this . root ) ) ;
171178 const svnConfig = workspace . getConfiguration ( "svn" ) ;
172179
173- const filesToExclude = fileConfig . get < any > ( "exclude" , null ) ;
180+ const filesToExclude = fileConfig . get < any > ( "exclude" ) ;
174181
175182 let excludeList : string [ ] = [ ] ;
176183 for ( const pattern in filesToExclude ) {
@@ -188,15 +195,20 @@ export class Repository {
188195 ? Uri . file ( path . join ( this . workspaceRoot , status . rename ) )
189196 : undefined ;
190197
191- const resouce = new Resource ( uri , status . status , renameUri , status . props ) ;
198+ const resource = new Resource (
199+ uri ,
200+ status . status ,
201+ renameUri ,
202+ status . props
203+ ) ;
192204
193205 if ( status . status === Status . NORMAL && status . props === PropStatus . NONE ) {
194206 // On commit, `svn status` return all locked files with status="normal" and props="none"
195207 return ;
196- } else if ( status . status === Status . UNVERSIONED ) {
197- unversioned . push ( resouce ) ;
198208 } else if ( status . status === Status . EXTERNAL ) {
199- external . push ( resouce ) ;
209+ external . push ( resource ) ;
210+ } else if ( status . status === Status . CONFLICTED ) {
211+ conflicts . push ( resource ) ;
200212 } else {
201213 if ( status . status === Status . UNVERSIONED ) {
202214 const matches = status . path . match (
@@ -210,24 +222,27 @@ export class Repository {
210222 statuses . some ( s => s . path === matches [ 1 ] )
211223 ) {
212224 return ;
225+ } else {
226+ unversioned . push ( resource ) ;
213227 }
214228 }
215229
216230 if ( ! status . changelist ) {
217- changes . push ( resouce ) ;
231+ changes . push ( resource ) ;
218232 } else {
219233 let changelist = changelists . get ( status . changelist ) ;
220234 if ( ! changelist ) {
221235 changelist = [ ] ;
222236 }
223- changelist . push ( resouce ) ;
237+ changelist . push ( resource ) ;
224238 changelists . set ( status . changelist , changelist ) ;
225239 }
226240 }
227241 } ) ;
228242
229243 this . changes . resourceStates = changes ;
230244 this . unversioned . resourceStates = unversioned ;
245+ this . conflicts . resourceStates = conflicts ;
231246
232247 this . changelists . forEach ( ( group , changelist ) => {
233248 group . resourceStates = [ ] ;
@@ -329,4 +344,13 @@ export class Repository {
329344 this . _onDidChangeBranch . fire ( ) ;
330345 }
331346 }
347+
348+ async resolve ( file : string , action : string ) {
349+ try {
350+ const response = await this . repository . resolve ( file , action ) ;
351+ window . showInformationMessage ( response ) ;
352+ } catch ( error ) {
353+ window . showErrorMessage ( error ) ;
354+ }
355+ }
332356}
0 commit comments