Craig's Subversion Notes



(List properties)
svn proplist main.c
Properties on 'main.c':

(Get properties)
svn propget svn:keywords main.c
Author Date Id Revision

(Set ignored file list)
svn propedit svn:ignore .

(Set keywords)
svn propset svn:keywords 'Author Date Id Revision' main.c

(Set end of line style)
(Note: incompatible with configure scripts generated by autoconf 2.62)
svn propset svn:eol-style native main.c

(Set executable)
svn propset svn:executable '*' install-sh

Initial creation:

svnadmin create --fs-type fsfs /usr/src/svn/project
svn mkdir file:///usr/src/svn/project/trunk -m ''
svn mkdir file:///usr/src/svn/project/branches -m ''
svn mkdir file:///usr/src/svn/project/tags -m ''

Initial checkout:

svn checkout bro-svn

svn checkout svn+ssh:// project

svn checkout file:///usr/src/svn/project/trunk project


svn diff -r70:72 main.c

svn diff --diff-cmd diff --extensions --normal -r70:72 main.c

svn diff --diff-cmd diff --extensions '--normal -i' -r70:72 main.c

(whitespace and ignore case)
svn diff --diff-cmd diff --extensions '--normal -iw' -r70:72 main.c


svn copy file:///usr/src/svn/project/trunk \
    file:///usr/src/svn/project/release-1.3 -m "release-1.3"

Edit a log message:

(Enable on the repo system)
cd /usr/src/svn/project/hooks && \
    cp -pi pre-revprop-change.tmpl pre-revprop-change && \
    chmod +x pre-revprop-change

(Edit last commited version)
svn propedit -rHEAD --revprop svn:log

(Edit in a working copy)
svn propedit -r58 --revprop svn:log

(Edit on the repo system)
svn propedit -r58 --revprop svn:log \

(Edit from a different host)
svn propedit -r58 --revprop svn:log \

Revision dates:

svn log -r '{2012-01-19}'
svn log -r '{16:00:00}'


(Don't forward ssh creds, X11 or ports)
ssh = ssh -ax -o clearallforwardings=yes

(Default svn keywords)
*.c = svn:eol-style=native;svn:keywords=Author Date Id Revision
*.h = svn:eol-style=native;svn:keywords=Author Date Id Revision

Switch the repository root:

svn switch --relocate \
    file:///usr/src/svn/apache24-conf \

Undelete a file:

First find the revision you want;

svn log -v | more
Then copy the file into your working tree:

svn copy file:///usr/src/svn/project/trunk/test.c/@666 test2.c
svn copy svn+ssh:// test2.c


svn update
svn commit
svn status
svn info

RCS and CVS to SVN:


[email Craig]