SVN Dump Syntax

When you do the svnadmin dump, can you dump it to a single file, its easier to import that way. For example:

svnadmin dump /var/svn/hal/ > /User/User/svn-hal.dump

Subversion Usage

List of features

svn list http://halsvn01/svn/hal/branches/features/ | grep -i searchforme

How to create a release candidate

svn copy http://halsvn01/svn/hal/trunk http://halsvn01/svn/hal/tags/yy.ww-RC## -m "Tagging current RC branch to yy.ww-RC##"

How to delete a branch

svn delete http://halsvn01/svn/hal/branches/features/branch-to-delete -m "Feature merged to trunk and migrated to prod, deleting for cleanup"

Create a feature branch

svn copy http://halsvn01/svn/hal/trunk http://halsvn01/svn/hal/branches/features/webss-9999-your-feature-here -m "Your description here. Fix WEBSS-XXXX"

Checking differences
svn diff

Checking differences and ignore white space
svn diff -x -w

Getting ready to merge into Release Candidate RC

Add files to your feature
svn add /your-path/your-filename.extension

Merge trunk into your current feature to avoid collisions
svn merge http://halsvn01/svn/hal/trunk
svn commit -m "Your description of what is being done"

Create a Patch and Apply It

### Create a patch file and put it on your Desktop
svn diff > ~/Desktop/barclays-diff-patch.txt

### Apply the patch to a feature
patch -p0 -i ~/Desktop/barclays-diff-patch.txt

Setup Subversion (SVN) Server in Ubuntu 12.04

1. Install Subversion
sudo apt-get install subversion libapache2-svn apache2

2. Where you want to keep repository?
sudo mkdir /svn
sudo gedit /etc/apache2/mods-enabled/dav_svn.conf

Delete everything and make it this instead:

<Location /svn>
DAV svn
SVNParentPath /svn
AuthType Basic
AuthName "Subversion Repository"
AuthUserFile /etc/apache2/dav_svn.passwd
Require valid-user
</Location>

3. Create a user
sudo htpasswd -cm /etc/apache2/dav_svn.passwd username

4. Setup first repository
cd /svn
sudo svnadmin create test

5. Make sure you have all of the proper permissions for the repository
sudo chown -R www-data:www-data /svn

6. Restart Apache service
sudo /etc/init.d/apache2 restart

7. You are now ready to use TortoiseSVN for Windows or RapidSVN for Linux

8. Your repository URL is http://localhost/svn/test
Note: It looks like RapidSVN does not like spaces in its file names.

Please see PDF for original notes.

Resolving conflict when merging

Today, we had a conflict when merging the jboss stabilization branch into the RC. Here are the steps I used to resolve it. The basic process was to first merge the RC into the jboss-stabilization branch, resolve the conflict and then merge the jboss-stabilization branch back into the RC:

552 svn co http://halsvn01/svn/hal/branches/features/jboss-stabilization
553 svn status
554 cd jboss-stabilization/
555 svn status
556 svn info
557 svn merge http://halsvn01/svn/hal/branches/RC/12.11-RC
558 svn status
559 svn resolve --accept=working halwebsite/com
560 svn status
561 svn commit -m "Sync jboss-stabilization branch with 12.11-RC"
562 ls
563 cd ..
564 rm -rf jboss-stabilization/
565 svn co http://halsvn01/svn/hal/branches/RC/12.11-RC
566 cd 12.11-RC/
567 svn merge --reintegrate http://halsvn01/svn/hal/branches/features/jboss-stabilization
568 svn status

-------------------------------------
Guillaume Radde
Senior Consultant, Red Hat Consulting
guillaume.radde@redhat.com
http://www.redhat.com
-------------------------------------