44 *--------------------------------------------------------------------------------------------*/
55'use strict' ;
66
7- import URI from 'vs/base/common/uri' ;
7+ import URI , { UriComponents } from 'vs/base/common/uri' ;
88import { TPromise } from 'vs/base/common/winjs.base' ;
99import Event , { Emitter , once } from 'vs/base/common/event' ;
1010import { debounce } from 'vs/base/common/decorators' ;
@@ -256,7 +256,7 @@ class ExtHostSourceControlResourceGroup implements vscode.SourceControlResourceG
256256 const handle = this . _resourceHandlePool ++ ;
257257 this . _resourceStatesMap . set ( handle , r ) ;
258258
259- const sourceUri = r . resourceUri . toString ( ) ;
259+ const sourceUri = r . resourceUri ;
260260 const iconPath = getIconPath ( r . decorations ) ;
261261 const lightIconPath = r . decorations && getIconPath ( r . decorations . light ) || iconPath ;
262262 const darkIconPath = r . decorations && getIconPath ( r . decorations . dark ) || iconPath ;
@@ -282,7 +282,7 @@ class ExtHostSourceControlResourceGroup implements vscode.SourceControlResourceG
282282 const letter = r . decorations && r . decorations . letter || undefined ;
283283 const color = r . decorations && r . decorations . color || undefined ;
284284
285- const rawResource = [ handle , sourceUri , icons , tooltip , strikeThrough , faded , source , letter , color ] as SCMRawResource ;
285+ const rawResource = [ handle , < UriComponents > sourceUri , icons , tooltip , strikeThrough , faded , source , letter , color ] as SCMRawResource ;
286286
287287 return { rawResource, handle } ;
288288 } ) ;
@@ -406,7 +406,7 @@ class ExtHostSourceControl implements vscode.SourceControl {
406406 private _rootUri ?: vscode . Uri
407407 ) {
408408 this . _inputBox = new ExtHostSCMInputBox ( _extension , this . _proxy , this . handle ) ;
409- this . _proxy . $registerSourceControl ( this . handle , _id , _label , _rootUri && _rootUri . toString ( ) ) ;
409+ this . _proxy . $registerSourceControl ( this . handle , _id , _label , _rootUri ) ;
410410 }
411411
412412 private updatedResourceGroups = new Set < ExtHostSourceControlResourceGroup > ( ) ;
@@ -542,17 +542,17 @@ export class ExtHostSCM implements ExtHostSCMShape {
542542 return inputBox ;
543543 }
544544
545- $provideOriginalResource ( sourceControlHandle : number , uriString : string ) : TPromise < string > {
546- this . logService . trace ( 'ExtHostSCM#$provideOriginalResource' , sourceControlHandle , uriString ) ;
545+ $provideOriginalResource ( sourceControlHandle : number , uriComponents : UriComponents ) : TPromise < UriComponents > {
546+ const uri = URI . revive ( uriComponents ) ;
547+ this . logService . trace ( 'ExtHostSCM#$provideOriginalResource' , sourceControlHandle , uri . toString ( ) ) ;
547548
548549 const sourceControl = this . _sourceControls . get ( sourceControlHandle ) ;
549550
550551 if ( ! sourceControl || ! sourceControl . quickDiffProvider ) {
551552 return TPromise . as ( null ) ;
552553 }
553554
554- return asWinJsPromise ( token => sourceControl . quickDiffProvider . provideOriginalResource ( URI . parse ( uriString ) , token ) )
555- . then ( result => result && result . toString ( ) ) ;
555+ return asWinJsPromise ( token => sourceControl . quickDiffProvider . provideOriginalResource ( uri , token ) ) ;
556556 }
557557
558558 $onInputBoxValueChange ( sourceControlHandle : number , value : string ) : TPromise < void > {
0 commit comments