These commands are used to deal with tagging and branching in SVN:
$ cd /path/to/project && svn copy trunk branches/mybranch-N && svn commit -m 'Created new branch' $ cd /path/to/project/branches/mybranch-N
Make changes and commit:
$ cd /path/to/project/trunk $ svn merge -r R:head svn://path/to/repo/branches/mybranch-N
(In the merge command, 'R' is the revision in which the branch was created. Note that if the trunk is merged into the branch, then merging the branch back into the trunk again will cause conflicts if selective merging is not used. Use the svn merge -r start:stop syntax for selective merging.)
branchingcommandscommitmergesubversionsvntagging
If you want to have a context diff instead of the default that subversion offers, you can give it the binary and options to use on the commandline:
$ svn diff --diff-cmd /usr/bin/diff -x '-crN'
commandscontextdiffsubversionsvn
This URL details the commands necessary to convert a repository from BDB format to FSFS format:
bdbformatfsfsrepositorysubversionsvn
If you've botched an SVN log entry (typo, etc.), you can fix it as follows:
$ echo "Here is the new, correct log message" > newlog.txt $ svnadmin setlog myrepos newlog.txt -r 388
brokencommandslogsubversionsvn
Given a directory DIR and a glob of files (e.g. *.php):
$ svn propset svn:ignore \*.php DIR
You can also remove a property:
$ svn propdel svn:ignore DIR
The svn propset format only allows you to set one pattern at a time. To add multiple patterns, run:
$ svn propedit svn:ignore DIR
which opens a file in an editor where you can add ignore patterns, one per line.
commandsignorepropdelpropeditpropertypropsetsubversionsvn
To create a new project with its own repository, do this. The svnadmin command assumes the path exists already:
$ svnadmin create /path/to/repository $ svn import project_name file:///path/to/repository -m 'initial checkin'
Then remove the original copy and check it out:
$ mv project_name project_name.old $ svn checkout file:///path/to/repository/trunk project_name
Note: You can change the file:// to svn:// or whatever protocol you're using.
commandsimportprojectsubversionsvnsvnadmin