SVN Cheat Sheet

11 November 2022 Link



Information

Command to get info about repository, the path of the repository etc:
svn info

Relocating an SVN repository

From the command line in Ubuntu went to the repository working copy root i.e. inside the directory which is the root of the repository working copy. Then there executed the command:

svn switch --relocate FROM TO [PATH...]

The FROM and TO paths need to be started with file:/// if it is in windows C:/... will follow if it is in linux media/... or the other root directory path will follow

Just did it like this in Linux:
svn relocate 'file:///media/DATA/Milind/Technical/My Work/Repositories/Karm_Lua/trunk' .

This was run from the root of the working copy as described above

Checkin Commads

  • To add all unversioned files
svn add --force * --auto-props --parents --depth infinity -q

Commit Commands

  • To commit all added files
svn commit -m 'Adding a file'

Update to particular version

> svn update -r <version number>

Checkout

> svn co <repository path>
Checkout particular version
> svn co -r <version number> <repository path>

Ignore file patterns

Use the following 2 steps:
  1. Create a list of file patterns in current directory to ignore:
    > cat > ignorelist << END
    file1
    file2
    file3
    END
    
  2. Set the property:
    > svn propset svn:ignore -F ignorelist dir1
    
Here dir1 is the root directory in the svn repository checked out. It may be just .