svn_cleanup
Clean up interrupted operations in Subversion (SVN) working copies by specifying the path to resolve inconsistencies and restore functionality.
Instructions
Limpiar working copy de operaciones interrumpidas
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Ruta específica a limpiar |
Implementation Reference
- tools/svn-service.ts:635-659 (handler)Core implementation of the svn_cleanup tool logic: executes 'svn cleanup' command with optional path validation, error handling, and response formatting.async cleanup(path?: string): Promise<SvnResponse<string>> { try { const args = ['cleanup']; if (path) { if (!validatePath(path)) { throw new SvnError(`Invalid path: ${path}`); } args.push(normalizePath(path)); } const response = await executeSvnCommand(this.config, args); return { success: true, data: cleanOutput(response.data as string), command: response.command, workingDirectory: response.workingDirectory, executionTime: response.executionTime }; } catch (error: any) { throw new SvnError(`Failed to cleanup: ${error.message}`); } }
- index.ts:516-518 (schema)Input schema for svn_cleanup tool using Zod: optional path parameter.{ path: z.string().optional().describe("Ruta específica a limpiar") },
- index.ts:514-538 (registration)MCP tool registration for svn_cleanup, including description, schema, and thin handler that calls SvnService.cleanup and formats markdown response."svn_cleanup", "Limpiar working copy de operaciones interrumpidas", { path: z.string().optional().describe("Ruta específica a limpiar") }, async (args) => { try { const result = await getSvnService().cleanup(args.path); const cleanupText = `🧹 **Cleanup Completado**\n\n` + `**Ruta:** ${args.path || 'Directorio actual'}\n` + `**Comando:** ${result.command}\n` + `**Tiempo de Ejecución:** ${formatDuration(result.executionTime || 0)}\n\n` + `**Resultado:**\n\`\`\`\n${result.data}\n\`\`\``; return { content: [{ type: "text", text: cleanupText }], }; } catch (error: any) { return { content: [{ type: "text", text: `❌ **Error:** ${error.message}` }], }; } } );