11var vscode = require ( 'vscode' ) ;
22const SvnSpawn = require ( 'svn-spawn' ) ;
33const path = require ( 'path' ) ;
4+ const svnSCM = require ( './src/svnSCM.js' ) ;
45
56const createStatusBar = ( ) => {
67 const statusBarItem = vscode . window . createStatusBarItem ( vscode . StatusBarAlignment . Left ) ;
@@ -72,6 +73,7 @@ const updateResourceGroup = (data, type) => {
7273function activate ( context ) {
7374 console . log ( 'svn-scm is now active!' ) ;
7475
76+ const disposable = [ ] ;
7577 const rootPath = vscode . workspace . rootPath ;
7678 const outputChannel = createChannel ( ) ;
7779 vscode . commands . registerCommand ( 'vscode-svn.showOutputChannel' , ( ) => outputChannel . show ( ) ) ;
@@ -80,19 +82,11 @@ function activate(context) {
8082 const client = createClient ( rootPath ) ;
8183 const watcher = vscode . workspace . createFileSystemWatcher ( `${ rootPath } /**/*` ) ;
8284
83- const sourceControl = vscode . scm . createSourceControl ( 'svn' , 'svn' ) ;
85+ const sourceControl = svnSCM . init ( ) ;
8486
8587 const modified = sourceControl . createResourceGroup ( 'modified' , 'Modified' ) ;
8688 const removed = sourceControl . createResourceGroup ( 'removed' , 'Removed' ) ;
8789 const notTracked = sourceControl . createResourceGroup ( 'unversioned' , 'Not Tracked' ) ;
88-
89- sourceControl . provideOriginalResource = ( uri ) => {
90- if ( uri . scheme !== 'file' ) {
91- return ;
92- }
93-
94- return vscode . Uri . with ( { scheme : 'svn' , query : uri . path , path : uri . path } ) ;
95- } ;
9690
9791 modified . hideWhenEmpty = true ;
9892 removed . hideWhenEmpty = true ;
0 commit comments