Skip to main content

SVN

28th October, 2022

Updated: 28th October, 2022

SVN: Ignore folder

ignore folder (apply above the folder)

svn propedit svn:ignore batch_invoices --editor-cmd vi
*
svn commit batch_invoices --editor-cmd vi

SVN: Changelist

svn stat
svn changelist issue1729 foo.c bar.c baz.c
svn commit --changelist issue1729 -m "Fixing Issue 1729."

Difference between current release and trunk

svn diff --summarize -r HEAD:989

Get changed files

svn stat|grep 'M '
svn info -r HEAD

Copy SVN without .svn folders

rsync -r --exclude=.svn /home/user/svn_co/me/me.elearning/base_course/trunk/ /home/user/svn_co/me/me.elearning.nyu_basic_science/trunk/

Remove SVN directories from project (rsync)

rsync -r --exclude=.svn /path/to/trunk/ /path/to/nosvn/version/

svn-depths

checkout top level of all branches

svn co http://svn/moodle/branches moodle --depth immediates

go into branch and use

svn up --set-depth infinity

set an external

set an external (above the folder you want to be an external)

svn propedit svn:externals ./ --editor-cmd vi
repository location foldername

commit externals and deletions only.
svn commit ./ --editor-cmd vi

Svn to git

Works for mac too - just have to install via homebrew

  • Follow instructions
  • Install Ruby for windows (I chose 2.0.0 x64) –
  • Install Git (latest) –
    • select add it to your PATH
  • gem install svn2git
  • make directory in c://
  • cd into it
  • svn2git http://svn.repo --username blah
  • MAGIC HAPPENS
  • add to git

View specific revision of a file or directory

http://beerpla.net/2010/02/20/how-to-view-a-specific-svn-revision-in-your-browser/

Here is the syntax to get a specific revision of a file or directory:

  • Take the root of the repository (in our case, http://plugins.svn.wordpress.org)
  • Append this string !svn/bc/REVISION_NUMBER right after the repository root and before the directory or file path.

Going back to our example:


72a65f23-966a-4c62-9d5b-7390a6e65df4

Created on: 28th October, 2022

Last updated: 28th October, 2022