Subversion Commands

Subversion Commands

This page is a list of Subversion tips and tricks for administering your SVN repositories and managing your source code.

  • Subversion Administration
  • Source Code Management
  • Useful SVN Tips and Tricks
  • SVN Report Generation

Creating New SVN Repository

It is recommended that you use meaningful names for your repository.

Do not let laziness take over and end up with a repo list like: x, y, abc, tot. You will forever being explaining to people what is in each of them.

Also, do not let your, or other's, inner child take over, or you will end up with a list like this: Optimus Prime, Bert and Ernie, or Batman, Robin, or whatever childhood fancy tickled your imagination.

$ svnadmin create D:\Subversion\{Repository Name}

If you use Apache to expose your repositories others, you need to add a new webdav section in your apache/Apache2\conf\httpd.conf file inside the Location tags.

	Allow from All
	DAV svn
	SVNPath d:\subversion\SCMWise
	AuthzSVNAccessFile d:\subversion\SCMWise-svnaccessfile.txt

	AuthName "SCMWise Subversion Repository"

	AuthType SSPI
	SSPIAuth On
	SSPIAuthoritative On
	SSPIOfferBasic On
	SSPIUsernameCase lower

	require valid-user

In this example you would need to create a SCMWise-svnaccessfile.txt in the D:\Subversion Directory.

Here is some sample code:

scmwise = scmwise\toad

@scmwise = rw

It is a wise idea to check in your httpd.conf and SCMWise-svnaccessfile.txt

You will need to restart the Apache web service to pick up the httpd.conf file changes.

Creating a Subversion Change Log

This seems to be one of the more popular Subversion Commands.

Development teams or Project Managers may want you to provide a list of all the changes to a specific Subversion Repository or to a specific Subversion branch of code.

To do this for a specific date range of one year for the trunk branch:

$ svn log --verbose -r {2010-01-01}:{2010-12-31}

Here the Subversion Log Command for a specific date to the latest version for a whole repository:

$ svn log --verbose -r {2010-01-01}:HEAD

Here is the example change log file:

r75615 | scmwise\toad | 2011-01-03 10:00:46 -0600 (Mon, 03 Jan 2011) | 2 lines

Changed paths:
   M /Bank/branches/CMS/CMS.Suite_v2.9.0/Business/CADET.Business/LoanCuringBLL.cs

Refs #11895 PRJ203174Delivery-Cadet - Deficiency re-prioritization

r75616 | scmwise\toad | 2011-01-03 10:00:58 -0600 (Mon, 03 Jan 2011) | 2 lines

Changed paths:
   M /Bank/branches/CMS/CMS.Suite_v2.9.0/Business/CADET.Business/RulesEngineBLL.cs

Refs #11895 PRJ203174Delivery-Cadet - Deficiency re-prioritization

Migrating Whole Repository

"How do you move code from one Subversion repository to another SVN repo?"

Logically, people look for a Subversion Commands like move and migrate, but these Subversion Commands are used inside of a single Subversion Repository.

If you find yourself in the situation where you want to migrate the source code and all of its history to another SVN repo, you need to use the svnadmin dump command.

The svnadmin dump command does not logically jump to the front of most people's mind when thinking of how to do this.

This is an example of creating a dumpfile for a whole SVN repository named Website:

$ svnadmin dump D:\Subversion\Website > Website.dump

Now, we want to load the dump file into a SVN repo named SCMWise.

$ svnadmin load D:\Subversion\SCMWise < Website.dump

Migrating a Partial Subversion Repository

If you need to move some subset of code and the history of this code from one SVN Repo to another, you need to perform the following Subversion Commands:

  • svnadmin dump
  • svndumpfilter include
  • svnadmin load
  • svn remove

You start with dumping the specific directory into the dump file. To help speed this up you can use the --revision option to only include a range of revisions:

$ svnadmin dump d:\Subversion\Website -r 999:12342 > Website.dump

Now, if you are only taking a portion of a SVN repo, you need to filter out the unwanted revisions. Meaning, you only migrate the directories and revisions related to those directories.

To do this you use the svndumpfilter command:

$ svndumpfilter include Release2007 < SCMWise.dump > Release2007.dump

If you receive the error:

svndumpfilter: Unsupported dumpfile version: 3

In this case, it means that the dump file was created with the --deltas option.

You will need to recreate the dump file without this svnadmin dump option.

Here is the command for loading newly trimmed down dump file

$ svnadmin load D:\Subversion\SCMWise < Release2007.dump

Now, if you do not want a duplicate set of code in both directories, you need delete the remove the code from the original repo:

$ svn remove

Undoing Committed Changes

You may notice that changes committed to the repo are not working or altogether wrong. You may just want to revert back to a previous version of the repository.

You can easily do this from your current working copy.

In this example you want to revert from your current repo version of 393 to the earlier version 268.

It is a wise practice to utilize the dry run option to see want will take place before actually running the merge

$ svn merge --dry-run -r 393:268

If you like what you see, now run the real merge:

$ svn merge -r 393:268

Check to make sure everything looks good.

$ svn status

If everything worked now commit your changes to the repo and BAM!, you are back to the working version.

$ svn commit -m "Reverting back to the working version"

Subversion Commands

If you have some commands you would like to add, or you have commands you would like me to show please let us know.

Subversion Commands Request Form

Software Configuration Management Tools Table of Contents

Software Configuration Management Tools Software Configuration Management Tools are the tools and utilities used in administering source code, building software, install packaging, defect tracking, change management and managing software configurations.

SCM Tools SCM Tools is a list of the more popularly used Software Configuration Management Tools. The plan is compile an exhaustive list of tools and rate them according to their usability.

SCM Tool Reviews SCM Tool Reviews are a place to read reviews of software configuration management tools. Share your experiences with SCM tools. These reviews can benefits others who are searching for information.

Software Build Tools Software Build Tools is a collection of tools used to create automated software builds. This list is growing and the functionality of the tools is expanding.

Software Build Tool Reviews Software Build Tool Reviews is a place to come read reviews of software build tools. If you script software build tools, please share your experience with others.

Software Installation Tools Software Installation Tools is a collection of Install Packaging tools. These tools are used in simplifying and automating the installation or deployment of the application.

Software Installation Tool Reviews Software Installation Tools is a collection of Install Packaging tools. These tools are used in simplifying and automating the installation or deployment of the application.

Software Tracking Tools Software Tracking Tools are the tools and utilities used in tracking software changes, defects and software development progress.

CruiseControl CruiseControl is an open source tool setup specifically to perform continuous integration software builds. This page is high level overview of CC and its functionality and benefits. Software build tools like CC are an integral part of your Software Configuration Management System.

CruiseControl.Net CruiseControl.Net is an open source tool that facilitates the integration of software builds. This page is an overview of the CC.Net Tool and Process.

InstallShield Installer InstallShield Installer simplifies the process of creating reliable Windows Installers, MSI, packages and InstallScript installers for Window systems. InstallShield is the defacto standard for MSI installations.

Maven Maven is a tool that can now be used for building and managing any Java-based project.

Source Code Evaluation Source Code Evaluation -- In SCM, one of the most commonly asked questions is what SCM source code tools should I use. The answer is, it depends on your evaluation criteria. There are so many variables and considerations that go into the selection process. Now, the evaluation may be slightly different depending on your software development team and management requirements.

Subversion Subversion is the fastest growing SCM Source Control Tool. The goal of the SVN project was to build a source control tool that fixed many CVS limitations.

Subversion Commands Subversion Commands is a list of useful SVN tips and tricks for administering and managing your Subversion repository and application source code.

Team Foundation Server Microsoft's Visual Studio Team System 2008 Team Foundation Server is an integrated collaboration tool server for Visual Studio Team System. It combines software build management, software development process model, team portal, version control, work item tracking, and business intelligence into a unified server. TFS allows better team collaboration in an effort to ensure better quality software.

TFS Commands TFS Commands is a list of useful Team Foundation Server tips and tricks for administering and managing your Team Foundation repository and source code.

TFS Licensing TFS licensing can be very confusing. Even though Microsoft has published much about this topic, many have unanswered questions. This page hopes to answer some of these questions.

Trac Commands Trac Commands - This page is a list of common Trac administration tasks and commands used to administer and support Trac databases.

VSS Commands VSS Commands - This page is a list of common VSS administration tasks and commands used to administer and support Visual SourceSafe, VSS History, VSS Admin Add.

Wise Installer The Wise Installer simplifies application and patch deployments through automation of software packages.

SCMWise Configuration Spec

© Copyright 2007 - 2017
Powered by Site Build It!
Page copy protected against web site content infringement by Copyscape's Privacy Policy
ADD TO YOUR SOCIAL BOOKMARKS: add to BlinkBlink add to add to DiggDigg
add to FurlFurl add to GoogleGoogle add to SimpySimpy add to SpurlSpurl Bookmark at TechnoratiTechnorati add to YahooY! MyWeb