@@ -230,47 +230,69 @@ const getCommandsMap = ({ context, outputChannel, provider }: RegisterCommandOpt
230230 SvnLogger . info ( `Starting SVN debug for workspace: ${ workspaceRoot } ` )
231231
232232 try {
233- // check svn installed
233+ // Check SVN installation and repository status
234+ // Note: These functions now handle their own user-friendly error messages
234235 SvnLogger . info ( "Checking if SVN is installed..." )
235236 const svnInstalled = await checkSvnInstalled ( )
236237 SvnLogger . info ( `SVN installed: ${ svnInstalled } ` )
237238
238239 if ( ! svnInstalled ) {
239- vscode . window . showErrorMessage ( "SVN is not installed or not in PATH" )
240+ // Error message already shown by checkSvnInstalled
240241 return
241242 }
242243
243- // check svn repo
244244 SvnLogger . info ( "Checking if current directory is an SVN repository..." )
245245 const isSvnRepo = await checkSvnRepo ( workspaceRoot )
246246 SvnLogger . info ( `Is SVN repository: ${ isSvnRepo } ` )
247247
248248 if ( ! isSvnRepo ) {
249- vscode . window . showWarningMessage ( "Current workspace is not an SVN repository" )
249+ // Error message already shown by checkSvnRepo
250250 return
251251 }
252252
253- // get svn repo info
253+ // Get SVN repository information
254254 SvnLogger . info ( "Getting SVN repository information..." )
255255 const repoInfo = await getSvnRepositoryInfo ( workspaceRoot )
256256 SvnLogger . info ( `Repository info: ${ JSON . stringify ( repoInfo , null , 2 ) } ` )
257257
258- // search recent commits
258+ // Search for recent commits
259259 SvnLogger . info ( "Searching for recent commits..." )
260260 const commits = await searchSvnCommits ( "" , workspaceRoot )
261261 SvnLogger . info ( `Found ${ commits . length } commits` )
262+
262263 commits . forEach ( ( commit , index ) => {
263264 SvnLogger . info ( `Commit ${ index + 1 } : r${ commit . revision } - ${ commit . message } ` )
264265 } )
265266
266- vscode . window . showInformationMessage (
267- `SVN Debug Complete! Found ${ commits . length } commits. Check "Roo Code - SVN Debug" output channel for details.` ,
267+ // Show success message
268+ const action = await vscode . window . showInformationMessage (
269+ `SVN Debug Complete! Found ${ commits . length } commits.\n\nRepository URL: ${ repoInfo . repositoryUrl || "Unknown" } \nWorking Copy Root: ${ repoInfo . workingCopyRoot || "Unknown" } \n\nCheck "Roo Code - SVN Debug" output channel for detailed information.` ,
270+ { modal : false } ,
271+ "Show Output" ,
268272 )
273+
274+ if ( action === "Show Output" ) {
275+ SvnLogger . showOutput ( )
276+ }
269277 } catch ( error ) {
270- SvnLogger . error ( "SVN debug failed" , error )
271- vscode . window . showErrorMessage (
272- `SVN debug failed: ${ error instanceof Error ? error . message : String ( error ) } ` ,
273- )
278+ // This should rarely happen now since individual functions handle their own errors
279+ const svnError = error instanceof Error ? error : new Error ( String ( error ) )
280+ SvnLogger . error ( "SVN debug failed" , svnError )
281+
282+ vscode . window
283+ . showErrorMessage (
284+ "SVN debug operation failed" ,
285+ {
286+ modal : false ,
287+ detail : `Unexpected error: ${ svnError . message } \n\nPlease check the SVN Debug output channel for more details.` ,
288+ } ,
289+ "Show Output" ,
290+ )
291+ . then ( ( action ) => {
292+ if ( action === "Show Output" ) {
293+ SvnLogger . showOutput ( )
294+ }
295+ } )
274296 }
275297 } ,
276298} )
0 commit comments