@@ -78,6 +78,7 @@ const STEP_DEFINITIONS: Record<TaskStepType, { label: string; icon: React.Compon
7878 [ TaskStepType . GitCheckout ] : { label : 'Git Checkout' , icon : ArrowRightOnRectangleIcon , description : 'Switch to a specific branch.' } ,
7979 [ TaskStepType . GitStash ] : { label : 'Git Stash' , icon : ArchiveBoxIcon , description : 'Stash uncommitted local changes.' } ,
8080 [ TaskStepType . SvnUpdate ] : { label : 'SVN Update' , icon : ArrowDownTrayIcon , description : 'Update working copy to latest revision.' } ,
81+ [ TaskStepType . SvnSwitch ] : { label : 'SVN Switch' , icon : ArrowRightOnRectangleIcon , description : 'Switch working copy to a different branch or URL.' } ,
8182 [ TaskStepType . RunCommand ] : { label : 'Run Command' , icon : CodeBracketIcon , description : 'Execute a custom shell command.' } ,
8283 // Delphi
8384 [ TaskStepType . DelphiBuild ] : { label : 'Delphi Build' , icon : BeakerIcon , description : 'Build, rebuild, or clean a Delphi project.' } ,
@@ -133,7 +134,7 @@ const STEP_DEFINITIONS: Record<TaskStepType, { label: string; icon: React.Compon
133134const STEP_CATEGORIES = [
134135 { name : 'General' , types : [ TaskStepType . RunCommand ] } ,
135136 { name : 'Git' , types : [ TaskStepType . GitPull , TaskStepType . GitFetch , TaskStepType . GitCheckout , TaskStepType . GitStash ] } ,
136- { name : 'SVN' , types : [ TaskStepType . SvnUpdate ] } ,
137+ { name : 'SVN' , types : [ TaskStepType . SvnUpdate , TaskStepType . SvnSwitch ] } ,
137138 { name : 'Node.js' , types : [ TaskStepType . NODE_INSTALL_DEPS , TaskStepType . NODE_RUN_BUILD , TaskStepType . NODE_RUN_TESTS , TaskStepType . NODE_RUN_LINT , TaskStepType . NODE_RUN_FORMAT , TaskStepType . NODE_RUN_TYPECHECK ] } ,
138139 { name : 'Go' , types : [ TaskStepType . GO_MOD_TIDY , TaskStepType . GO_FMT , TaskStepType . GO_TEST , TaskStepType . GO_BUILD ] } ,
139140 { name : 'Rust' , types : [ TaskStepType . RUST_CARGO_FMT , TaskStepType . RUST_CARGO_CLIPPY , TaskStepType . RUST_CARGO_CHECK , TaskStepType . RUST_CARGO_TEST , TaskStepType . RUST_CARGO_BUILD ] } ,
@@ -341,10 +342,19 @@ const TaskStepItem: React.FC<{
341342 < button type = "button" onClick = { ( ) => onRemoveStep ( step . id ) } className = "p-1.5 text-red-500 hover:bg-red-100 dark:hover:bg-red-900/50 rounded-full" > < TrashIcon className = "h-4 w-4" /> </ button >
342343 </ div >
343344 </ div >
344- { step . type === TaskStepType . GitCheckout && (
345+ { ( step . type === TaskStepType . GitCheckout || step . type === TaskStepType . SvnSwitch ) && (
345346 < div >
346- < label className = "text-xs font-medium text-gray-500 dark:text-gray-400" > Branch Name</ label >
347- < input type = "text" placeholder = "e.g., main" value = { step . branch || '' } onChange = { ( e ) => onStepChange ( step . id , { branch : e . target . value } ) } required className = { formInputStyle } />
347+ < label className = "text-xs font-medium text-gray-500 dark:text-gray-400" >
348+ { step . type === TaskStepType . GitCheckout ? 'Branch Name' : 'Switch Target' }
349+ </ label >
350+ < input
351+ type = "text"
352+ placeholder = { step . type === TaskStepType . GitCheckout ? 'e.g., main' : 'e.g., ^/branches/release/1.2' }
353+ value = { step . branch || '' }
354+ onChange = { ( e ) => onStepChange ( step . id , { branch : e . target . value } ) }
355+ required
356+ className = { formInputStyle }
357+ />
348358 </ div >
349359 ) }
350360 { step . type === TaskStepType . DelphiBuild && (
@@ -1339,6 +1349,7 @@ const TaskStepsEditor: React.FC<{
13391349 const newStep : TaskStep = { id : `step_${ Date . now ( ) } ` , type, enabled : true } ;
13401350 if ( type === TaskStepType . RunCommand ) newStep . command = suggestions . length > 0 ? suggestions [ 0 ] . value : 'npm run build' ;
13411351 if ( type === TaskStepType . GitCheckout ) newStep . branch = 'main' ;
1352+ if ( type === TaskStepType . SvnSwitch ) newStep . branch = 'trunk' ;
13421353 setTask ( { ...task , steps : [ ...task . steps , newStep ] } ) ;
13431354 setIsAddingStep ( false ) ;
13441355 } ;
0 commit comments