Riaan Lehmkuhl's Blog

Subversion, Progamming, Tips & Tricks and whatever else springs to mind.
07Jul

svn:externals with a space in the directory name [2]

07 July 2008 23:52 by Riaan Lehmkuhl
As promised I've published the code and instructions to my previous post...
Go and have a look on CodeProject:

Workaround: svn:externals with a space in the directory name:
TSVN Post-Update hook utility for using svn:externals with a space in the directory name
http://www.codeproject.com/KB/files/Percent20toSpace.aspx

Please let me know what you think.

Currently rated 3.0 by 5 people

  • Currently 3/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
06Jul

svn:externals with a space in the directory name

06 July 2008 23:47 by Riaan Lehmkuhl
While setting up my development environment for various BlogEngine.NET sites, I ran into the problem that when setting svn:externals: One cannot have spaces in the directory name or the external url with TortoiseSVN.
For example: User controls svn://host/User controls
According to a message in the TSVN mailing list, the trick is to replace the space with "%20", like this: User%20controls svn://host/User%20controls Now being able to add the external, there is a new problem:
When I put the "%20" in the name, I get a directory with the characters "%20" in the name. I could have just used an underscore, but the there are references to the "User controls" directory in the project and for future compatibility I didn't want to deviate from the original structure.

To overcome this I've created a tiny console application to rename the directory when the TSVN Post-Update Hook is fired. I will post the source in the next edition of this saga.

Currently rated 3.0 by 5 people

  • Currently 3/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
26Jun

Customise VisualSVN Server browser view

26 June 2008 23:24 by Riaan Lehmkuhl
VisualSVN Server is a basic package of Subversion with the Apache web server and a visual management console (MMC).
The VisualSVN Server browser view is very basic, but it is easy to customise via the provided XSLT stylesheet. Just keep in mind that the files are auto generated and can be overwritten by the VisualSVN Server management console. Always backup any files before editing them.
There are two things that I think is very handy when using the SVN browser view:
  1. A shortcut for TortoiseSVN checkout.
  2. While developers will most likely have a SVN client installed, the same can not always be said for project managers and document writers and to explain the concepts of how the versioning works can be a pain.The solution to this is auto versioning and the ability to open repository directories with Windows Explorer (web folder).

Let's start...
I will assume the default install location for VisualSVN Server: 'c:\Program Files\VisualSVN Server'.
Add these tho images to the 'htdocs' folder: Checkout with TortoiseSVN and Open Folder with Windows Explorer.
In the 'htdocs' folder you should find 'svnindex.xsl'. This is the stylesheet that renders the WebDAV xml in your browser. Open the file in your favourite text editor and find the '<xsl:template match="dir">...<xsl:template>' section. Replace the following bit
More...

Currently rated 3.0 by 5 people

  • Currently 3/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
31Dec

SvnPerms dot Net

31 December 2006 21:30 by Riaan Lehmkuhl
C# port of svnperms.py pre-commit hook script.

I've just posted my first article to The Code project.
Check it out at SvnPerms dot Net.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
29Dec

Convert Subversion Repositories from BDB to FS

29 December 2006 21:18 by Riaan Lehmkuhl
Having a lot of problems with 'wedged' repositories?
A shell script to convert SVN Repositories from BDB to FS.

Change the SVNBASE, SVNREPOS and SVNTEMP variables to point to where your directories are. #!/bin/bash E_WRONGARGS=65 E_DIRDOESNTEXIST=66 if [ -z "$1" ]; then echo "Usage: `basename $0` name_of_repository" exit $E_WRONGARGS fi echo "Creating $1 repository" # set up environment SVNBASE=/subversion SVNREPOS=$SVNBASE/repos SVNTEMP=$SVNBASE/temp if [ ! -d "$SVNREPOS/$1" ] ; then echo "`basename $0`: Can't open repository '$1': No such file or directory" exit $E_DIRDOESNTEXIST fi echo "dumping DBD repos $1" svnadmin dump $SVNREPOS/$1 > $SVNTEMP/$1.dmp echo "removing DBD repos $1" mv $SVNREPOS/$1 $SVNTEMP/$1 echo "creating FSFS repos $1" mkdir $SVNREPOS/$1 svnadmin create $SVNREPOS/$1 --fs-type fsfs echo "loading $1.dmp to FSFS repos" svnadmin load $SVNREPOS/$1 < $SVNTEMP/$1.dmp chown -R apache:apache $SVNREPOS/$1 chmod -R ug+rw $SVNREPOS/$1 # for SELinux chcon -R -h -t httpd_sys_content_t $SVNREPOS/$1 echo "Done."

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
29Dec

Linking Subversion changesets back to a Issue Tracking url

29 December 2006 21:03 by Riaan Lehmkuhl
Set the bugtraq: properties on a Subversion repository (recursively):


1. Check out your repository
2. cd to the root directory of your checkout
3. Run the following commands (note the dot at the end of each line)
svn propset -R bugtraq:label "IssueID:" .
svn propset -R bugtraq:url "http://your.issuetracker.url/?%BUGID%" .
svn propset -R bugtraq:message "IssueID: %BUGID%" .
svn propset -R bugtraq:number "true" .
svn propset -R bugtraq:warnifnoissue "true" .
svn commit -q -m "Added IssueID properties to the repository"
WINDOWS: You have to run them from the command line because a batch file will replace %BUGID% with nothing (trying to use the variable BUGID)

4. Verify when you are finished that the bugtraq:message is IssueID: %BUGID% and not just IssueID:

For more info, check out this guide which explains all the above.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
29Dec

Getting the pid of svnserve

29 December 2006 20:59 by Riaan Lehmkuhl

 

#!/bin/bash
the_pid=`ps -ef | grep svnserve | grep -v grep | awk '{print $2}'`
if [ -z "$the_pid" ]; then
echo "svnserve not running"
else
echo "svnserve running with pid $the_pid"
fi

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Riaan Lehmkuhl


Me, a disorder of the brain that results in a disruption in a person's thinking, mood, and ability to relate to others.

Recent comments

Comment RSS

Thingies

Calendar And Month List

<<  March 2010  >>
MoTuWeThFrSaSu
22232425262728
1234567
891011121314
15161718192021
22232425262728
2930311234

View posts in large calendar

Disclaimer & Privacy

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2008

Privacy:
We use third-party advertising companies to serve ads when you visit our website. These companies may use information (not including your name, address, email address, or telephone number) about your visits to this and other websites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here.

Most comments

Kevin Kevin
1 comments
gb United Kingdom
Moneymaker Moneymaker
1 comments
Indonesia Java International Destination Indonesia Java International Destination
1 comments
us United States

Cool Quote

I know that you believe that you understood what you think I said, but I am not sure you realize that what you heard is not what I meant. - Robert McCloskey