Skip to main content
Glama

svn_update

Update your local SVN working copy with the latest repository changes, handling conflicts and specifying target revisions as needed.

Instructions

Actualizar working copy desde el repositorio

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNoRuta específica a actualizar
revisionNoRevisión objetivo
forceNoForzar actualización
ignoreExternalsNoIgnorar externals
acceptConflictsNoComo manejar conflictos

Implementation Reference

  • The core handler function in SvnService that constructs and executes the 'svn update' command with options, validates paths, and returns the result.
    async update( path?: string, options: SvnUpdateOptions = {} ): Promise<SvnResponse<string>> { try { const args = ['update']; if (options.revision) { args.push('--revision', options.revision.toString()); } if (options.force) { args.push('--force'); } if (options.ignoreExternals) { args.push('--ignore-externals'); } if (options.acceptConflicts) { args.push('--accept', options.acceptConflicts); } 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 update: ${error.message}`); } }
  • index.ts:323-358 (registration)
    MCP server.tool registration for 'svn_update', including input schema with Zod validation and thin wrapper handler that calls SvnService.update and formats output.
    "svn_update", "Actualizar working copy desde el repositorio", { path: z.string().optional().describe("Ruta específica a actualizar"), revision: z.union([z.number(), z.literal("HEAD"), z.literal("BASE"), z.literal("COMMITTED"), z.literal("PREV")]).optional().describe("Revisión objetivo"), force: z.boolean().optional().default(false).describe("Forzar actualización"), ignoreExternals: z.boolean().optional().default(false).describe("Ignorar externals"), acceptConflicts: z.enum(["postpone", "base", "mine-conflict", "theirs-conflict", "mine-full", "theirs-full"]).optional().describe("Como manejar conflictos") }, async (args) => { try { const options = { revision: args.revision, force: args.force, ignoreExternals: args.ignoreExternals, acceptConflicts: args.acceptConflicts }; const result = await getSvnService().update(args.path, options); const updateText = `🔄 **Actualización Completada**\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: updateText }], }; } catch (error: any) { return { content: [{ type: "text", text: `❌ **Error:** ${error.message}` }], }; } } );
  • TypeScript interface defining the options for the SVN update operation, used by the SvnService.update method.
    export interface SvnUpdateOptions { revision?: number | 'HEAD' | 'BASE' | 'COMMITTED' | 'PREV'; force?: boolean; ignoreExternals?: boolean; acceptConflicts?: 'postpone' | 'base' | 'mine-conflict' | 'theirs-conflict' | 'mine-full' | 'theirs-full'; }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/gcorroto/mcp-svn'

If you have feedback or need assistance with the MCP directory API, please join our Discord server