Search:

PmWiki

pmwiki.org

edit SideBar

Main / Svn

Install the subversion package. Remember that import/export are server perspective.

Import a directory TO the repo:

svn import <PATH> <repo URL>

SVN import of a single file, must specify the filename, can’t be a dir URL.

Checkout a directory (looks like this won't overwrite what's in the workspace):

svn checkout <URL> <PATH>

SVN checkout can only be used on dir, not a single file. Does download files new to the repo.

Commit a change:

svn commit <PATH>

Sync, but do not export files new to repository:

svn update <PATH>

C means conflict, U means clean update, G means clean merge

Show files missing from repo (with ?)

svn status <PATH>

codes: http://svnbook.red-bean.com/en/1.7/svn.ref.svn.c.status.html

Get the date/time on the file

svn info <PATH>

After doing import, in order to perform checkout you must add a --force option.
Supposedly this is the right way to do it:
http://stackoverflow.com/questions/678437/svn-in-place-import-and-checkout

c[==]d /home/user/mydirname
svn co file:///svn/foo/mydirname . #this only creates the ".svn" folder for version control
svn add ./*                        #tell svn you want to version control all files in this dir
svn ci                             #check the files in

List the contents of a repository with svn list <repo-URL>

If you create a new file inside a folder that is already SVN-ed, you need to tuck it under the parent folder for SVN rules by using svn add <path>.

Error Messages

containing working copy admin area is missing.
Try this:

svn update --set-depth infinity

svn: File '.../boards.cfg' already exists
Use update. If still failing try file rename.

svn: warning: 'buildroot' is not a working copy
Need to do a checkout.

svn: Failed to add directory 'buildroot/toolchain': an unversioned directory of the same name already exists
Need to add the --force option.

svn: Failed to add directory 'buildroot/toolchain': a versioned directory of the same name already exists
Rename the local file, then do a checkout, and put the local file back.

svn: Aborting commit: 'boards.cfg' remains in conflict
This is a mess.

Summary of conflicts: Tree conflicts: 1
Try svn resolve --accept working or svn resolved, then svn cleanup. Then do update. If still failing, try file rename.

Leveraging SVN on a github Repo

Get in the directory you want to use as workspace.
Run svn ls <URL> on the clone URL given on the github page, which will offer you branches and tags.
Construct the URL for the folder you want and run svn export <URL>

Windows Tortoise SVN

Icon Meanings:
http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-wcstatus.html

If you have a Modified icon overlay (red exc) on your folder for no apparent reason, could be that something in the repo was deleted locally.

If you change the name locally of your workspace, then you'll get an error about a path mismatch when you try to update. To fix, use the switch command.


Page last modified on August 14, 2015, at 02:11 PM