Version 56 (modified by nicolasmartin, 23 months ago) (diff)

SubVersioN basics

Last edition on 05/18/20 09:05:57 by smasson

For reference, browse to

## Definitions

${REV} # REVision number

${URL} # web address of a path in the SVN repository (repository URL + relative path in the repository)
## Repository URL depends on your role
##- user:
##- developer svn+ssh://${ID}

${WCPATH} # Working Copy PATH


Add/Remove item
(file or folder)

$ svn {add,del} ${WCPATH}

Working copy

Display information about a local or remote item

$ svn info [{${WCPATH},${URL}}][@${REV}]

Display the current state of the working path wrt the one mirrored in the repository

$ svn status [-[qu]] [${WCPATH}]

Display all commits performed to your working path since its creation

$ svn log --verbose --stop-on-copy [${WCPATH}]

Revert changes

$ svn revert ${WCPATH}

Push changes

$ svn ci [-m 'one-liner log message'] [${WCPATH}]

For modified externals, add --include-externals option


Set properties

svn:keywords Id: log record of last commit in routine

$ svn propset svn:keywords Id on ${WCPATH}

svn:mime-type: syntax highlighting and merging process

svn:executable: executable permissions of shell scripts

$ svn propset svn:executable on ${WCPATH}

svn:externals: defining external sources

Single external example

$ svn propset svn:externals ${URL}[@${REV}] ${WCPATH}

Multi externals example using an editor

$ svn propedit svn:externals ${WCPATH}

Delete property

$ svn propdel ${SVN_PROPERTY} ${WCPATH}

Branching / Merging



$ svn copy {${URL},${WCPATH}}[@${REV}] {${URL},${WCPATH}}

Update WC to a new URL

Mirror a different branch $i.e$ traversing branch in the same repository (hazardous!! )

$ svn switch ${URL}[@${REV}] [${WCPATH}]

Relocate to a different URL $i.e$ keep the same branch but move to a new server or URL scheme

$ svn switch --relocate ${URL1} ${URL2}


$ svn rm {${URL},${WCPATH}}


$ svn merge {${URL1},${WCPATH1}}[@${REV1}] [{${URL1},${WCPATH2}}[@${REV2}]] [${WCPATH}]