SubversionSnips

From Custard
Jump to: navigation, search

Contents

Subversion Snippets

Installation

Create repository

  • svnadmin create /export/home/jamesb/SVN
  • Edit /export/home/jamesb/SVN/conf/svnserve.conf
  • Add:
                [general]
                password-db = passwd
                realm = Pomegranate Subversion
  • Create /export/home/jamesb/SVN/conf/passwd
  • Add:
                [users]
                pomeadmin = pomepassword


svnserve

  • Edit ~/.subversion/config to enable vi and auto-properties (optional - YMMV)
  • Add:
                [helpers]
                editor-cmd = vi
               
                [miscellany]
                enable-auto-props = yes

                [auto-props]
                *.c = svn:eol-style=native
                *.cpp = svn:eol-style=native
                *.h = svn:eol-style=native
                *.sh = svn:eol-style=native;svn:executable
                *.txt = svn:eol-style=native
                *.png = svn:mime-type=image/png
                *.jpg = svn:mime-type=image/jpeg
                Makefile = svn:eol-style=native
                *.pm = svn::eol-style=native;svn:keywords=LastChangedDate
LastChangedRevision LastChangedBy HeadURL Id Author Revision Date


                *.pl = svn::eol-style=native;svn:keywords=LastChangedDate
LastChangedRevision LastChangedBy HeadURL Id Author Revision Date

                *.pod = svn::eol-style=native;svn:keywords=LastChangedDate
LastChangedRevision LastChangedBy HeadURL Id Author Revision Date

This automatically sets properties for each file on import so that keyword substitution occurs in perl source and pod files.

Import a project into the repository as pomeadmin

Checkout the project


Find files changed by a user since a particular version

svn log -r 6000:HEAD| grep $USER  | awk '{print "svn log -v -"$1}'| sh  | grep project_name  | cut -c 5- | sort| uniq

Courtesy of Kris.


Google Code Commits

Start a new project:

Check it out:

Add some stuff to it...

First time you commit to your googlecode project you'll need to authenticate using your googlecode password. You can find this on your Profile->Settings page.

  • svn commit -m"Initial import" --username="your.google.name@gmail.com" --password=MySecretCode
Personal tools