Blog Projects
Escape Keys
A ColdFusion and Web Development Blog by Tom de Manincor
 

I had posted a while back about setting up a Subversion Server on a Windows machine. However, now I am running my SVNSERVE on a Windows 2003 Server Virtual Machine with VMWare. With the Shared Folders feature I am able to access my repositories from the HOST machine.

When I tried to set it up as a service using the code provided in my earlier post, I kept getting errors when starting the service. I tried mapping a network drive, in order to avoid the double slashes in the URN path to the share, but no dice.

After a good noggin knock it was apparent the syntax needed to be tweaked when using the URN path to allow for the double slashes.

Use the following single-line command:

sc create "svnserve" binpath= "\"C:\Program Files\Subversion\bin\svnserve.exe\" --service --root \"\\.host\Shared Folders\DEV\repo\"" displayname= "Subversion Repository Server" depend= Tcpip start= auto

If you are running a VM with VMWare and using Apache, you may run into some trouble mapping your Virtual Host.

Try doubling your slashes.

For example

"\\.host\Shared Folders\My Drive"

would be

I am running ColdFusion on my Windows 2003 Server VM. I have my files on my local machine, available to my VM via a shared folder. Meaning, IIS and CF see it as \.hostShared FoldersWebroot When Coldspring is initialized it runs theshrinkFullRelativePath method in the DefaultXmlBeanFactory.cfc

If you are passing in an expanded path then Coldspring will thrown an error because of the rebuilding of the path and the '\' before '.host' gets stripped down to '/' and is not a valid path.

Or, you are sending in a relative path and its just not found at all.

In the meantime modify this check before the return of the shrinkFullRelativePath method to:

<!--- Modified for Shared Folders in VMs --->
<cfif left(retVal,2) is "/.">
<cfset retVal = "/" & retVal>
</cfif>
<!--- Modified to Allow Relative Path --->
<cfif not directoryExists(getDirectoryFrompath(retVal)) and not directoryExists(getDirectoryFrompath(expandPath(retVal)))>
<cfthrow message="You have specified an invalid directory" detail="The directory path specified, #getDirectoryFromPath(retVal)# does not exist." />
</cfif>

If your're not dealing with a VM but still want to use Relative Paths, only use the second if statement.

** This may only be good for people using ColdFusion 7 and Up. (Application root mapping support issues)