svn_cleanup
Clean up interrupted operations in a Subversion working copy to resolve conflicts 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 in SvnService class. Validates optional path, constructs 'svn cleanup' command arguments, executes the command using executeSvnCommand utility, processes output, and returns structured response.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:513-538 (registration)MCP server registration of the 'svn_cleanup' tool, including Zod input schema for optional 'path' parameter, thin handler wrapper that delegates to SvnService.cleanup(), formats the response as formatted Markdown text, and handles errors.server.tool( "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}` }], }; } } );
- index.ts:516-518 (schema)Zod input schema definition for the svn_cleanup tool: optional string 'path' parameter with description.{ path: z.string().optional().describe("Ruta específica a limpiar") },