Subversion: Merging a Branch into Trunk

Posted by Ryan Baxter Wed, 26 Aug 2009 01:21:00 GMT

I can never remember how to merge a Subversion branch into trunk. So for future reference, here is how it’s done.

First, get a working copy of the head revision of trunk.

svn checkout svn://svnserver/project/trunk project

Next, merge the branch with your working copy.

svn merge svn://svnserver/project/trunk svn://svnserver/project/branches/branch project

Finally, commit the results of the merge.

cd project
svn commit -m "Merging branch X.X.X into trunk."

You can also specify a revision number in your merge.

svn merge svn://svnserver/project/trunk@223 svn://svnserver/project/branches/branch@223 project

That’s it.

Multiple Subversion Services on Windows

Posted by Ryan Baxter Wed, 10 Jun 2009 20:13:00 GMT

It’s possible, but not often necessary, to run multiple instances of the Subversion service on Microsoft Windows. At work, the source code of IT staff and Engineers is kept on two different servers with a third hosting Subversion. Since one of our Engineering departments recently decided to test Subversion as their SCM system, I had to install an additional service to manage their repositories.

I have a horrible time remembering the syntax for creating a Subversion service. That said, I’ve posted my worst case scenario for future reference. The arguments include UNC paths, ports, and lots of slashes. Next time, with the help of Google, I’ll remember. Oh, and if you’re receiving a 1053 error, it may be that you need to run the service under an account with sufficient rights to the UNC path used as the root (-r) Subversion repository.

sc create svnserve_it binpath= "\"C:\Program Files\CollabNet Subversion Server\svnserve.exe\" --service -r \"\\ITFILESERVER\Repositories\" --listen-port 3690" displayname= "Subversion Server (IT)" depend= tcpip start= auto
sc create svnserve_engineering binpath= "\"C:\Program Files\CollabNet Subversion Server\svnserve.exe\" --service -r \"\\ENGFILESERVER\Repositories\" --listen-port 3691" displayname= "Subversion Server (Engineering)" depend= tcpip start= auto

Subversion on Windows in Five Steps

Posted by Ryan Baxter Thu, 16 Aug 2007 03:39:00 GMT

Subversion (SVN) is a version control system that allows software developers to track the changes of source code and other documents. Since the release of Microsoft’s .NET Framework, Subversion has become a popular choice for developers of open source projects on the Microsoft Windows platform. The latest release of Subversion can be installed on Windows XP Professional by following these five simple steps.

  1. Download and install Subversion.

  2. Download and install TortoiseSVN.

  3. Create a repository for your project.
    • Create folder “D:\Subversion\TestProject”.
    • Right-click TestProject | TortoiseSVN | Create Repository here.
    • Set up repository permissions.
      1. Uncomment the following lines in “D:\Subversion\TestProject\conf\svnserve.conf” (remove #):
                      #anon-access = read
                      #auth-access = write
                      #password-db = passwd
                    
      2. Add users to the passwd file in the format of username = password.

  4. Set up the Subversion Service. Pay attention to the binpath argument. You can always issue the “sc delete svn” command to remove the service and start again.
          sc create svn binpath= "\"C:\Program Files\Subversion\bin\svnserve.exe\" --service -rD:\Subversion" displayname= "Subversion Server" depend= Tcpip start= auto
    
          sc start svn
        

  5. Import repository layout.
    • Create folder “C:\tmp”.
    • Create folders branches, tags, and trunk in “C:\tmp”.
    • Right-click tmp | TortoiseSVN | Import…
      1. URL of repository: svn://[IP address of server]/TestProject.
      2. Import message: Initial repository load.
      3. Click ‘OK’.
      4. Enter your username and password from step 3.

This is all it takes to set up and install Subversion on Windows XP Professional. For more information, check out the HTML edition of, Version Control with Subversion.