Wednesday, September 5, 2012

Dealing with SVN Externals

When you are trying to cut a versioned branch from the working trunk directory,an important point that you have to keep on mind is to change the svn externals according to the newly created branch.

SVN Externals

An SVN externals definition is a mapping of a local directory to the URL—and possibly a particular revision—of a versioned resource.In Subversion, you declare externals definitions in groups using the svn:externals property. 

Command to view existing svn externals 

svn propget -R svn:externals .

Command to modify a svn external 

  • If you having one entry as a svn extern property to set on a directory,type below command and then commit it.

svn propset svn:externals 'directory  http://external_url' . property 'svn:externals' set on '.'

  • If you having multiple directory/url pairs as svn externs to set on a directory
Create a file [svnExterns.txt] with putting the individual directory/url pairs.

Then type the below command and commit it.

svn propset svn:externals -F svnExterns.txt .

Command to edit/delete an existing svn externals 

svn propedit svn:externals .

You should see the directory/url pairs will listed after above command.If you want to delete such an extern just remove the specific line and run svn commit command.

No comments:

Post a Comment