- VisualSVN Server comes with svn.exe on its own. It doesn't depend on TortoiseSVN(Graphical client with optional toolchain) or ApacheSVN(toolchain only).
- If VisualSVN and TortoiseSVN are both installed, they will be accessing the same
.svn folder of a repository. So TortoiseSVN can serve as a graphical interfaces only.
- Things can break if using different SVN version to manage the same repo.
- Command line editor is set by
SVN_EDITOR system variable.
Initialize a folder as a new project into an existing repo
svn import [local-folder-path] [repo-url] -m "commit comment: initial commit via command line"
- Impossible to edit ignore list before importing
- Good for initialize an empty folder
Add a folder with initial content as a new project into an existing repo
- Checkout the trunk in an empty folder,
svn co [trunk-url] .
- Move the
.svn folder just created to the folder with initial content
- Can only ignore items not added to version control.
svn status --no-ignore | grep "^I" to view a list of ignored files in the current directory.
- Edit the
/c/Documents and Settings/sydlu/Application Data/Subversion/Config, all patterns must be in one line.
- Local ignores are done by
propset. The properties exist on a specific path, not globally. So a file pattern to ignore globally must be done recursively:
svn propset svn:ignore -R [pattern] .
- To ignore a directory, go to the parent directory, then
svn propset svn:ignore [dir-name] ., or use
svn propedit svn:ignore ., in which the
. means the property of the current directory.
svn propset svn:ignore xxx command will overwrite property set last time. So it's better to edit the property file instead of set the property. link
svn propset svn:ignore -F [filename] . sets the ignore using a file. (Don't use
-R, can be messy.)
svn propdel svn:ignore . can delete the ignored file patterns.
svn proplist -v . can view the ignored file patterns.
svn changelist [list-name] file1 file2 ... Add changes to a changelist. The changes must have been
svn add to version control. Repeating this command will add files to the list.
svn status --cl [list-name] to view the list.
svn changelist [list-name] --remove file1 file2 ... to remove file from the list.
svn commit --cl [list-name] -m "msg" to commit changes from the list only. After a commit, the list will be empty.
- Directory properties cannot be added to a changelist.
Delete files that were in the version control
- (Delete file from system. Then svn status will show a
! before that file.)
svn delete filename. Then svn status of the file will be
- These changes cannot be added to a changelist. Can only commit with everything else.
Other common command line commands
svn info [repo-url]
svn ls [repo-directory-url], show what files are in version control
svn add [dir-name], works recursively, equal to
--depth=infinity; only marks for the next commit, doesn't to the "stage"
svn add --depth=empty [dir-name], only add the directory, not contents
svn revert --depth=infinity [dir-name], revert un-commited changes
svn mkdir [dir-name], equals to
mkdir [dir-name]; svn add [dir-name]
svn mkdir --parents [dir-name]/[nested-dir-name], creates
[nested-dir-name] at the same time
svn commit -m "message"