Basic Work Cycle in Subversion (SVN) – Overview

work-cycle-in-subversion-sv

Basic Work Cycle in Subversion (SVN)

Subversion has numerous features, options, bells, and whistles, but on a day-to-day basis, odds are that you will use only a few of them. In this artile, we’ll run through the most common things that you might find yourself doing with Subversion in the course of a day’s work.

The typical work cycle looks like this:

  1. Update your working copy.
    • svn update
  2. Make changes.
    • svn add
    • svn delete
    • svn copy
    • svn move
  3. Examine your changes.
    • svn status
    • svn diff
  4. Possibly undo some changes.
    • svn revert
  5. Resolve conflicts (merge others’ changes).
    • svn update
    • svn resolve
  6. Commit your changes.
    • svn commit
Tagged : / / / / / / / / / / / / / /

Subversion’s Components – SVN Components Overview

subversions-components

Subversion’s Components

Subversion, once installed, has a number of different pieces. The following is a quick overview of what you get. Don’t be alarmed if the brief descriptions leave you scratching your head—plenty more pages in this book are devoted to alleviating that confusion.

svn
The command-line client program
svnversion
A program for reporting the state (in terms of revisions of the items present) of a working copy
svnlook
A tool for directly inspecting a Subversion repository
svnadmin
A tool for creating, tweaking, or repairing a Subversion repository
mod_dav_svn
A plug-in module for the Apache HTTP Server, used to make your repository available to others over a network
svnserve
A custom standalone server program, runnable as a daemon process or invokable by SSH; another way to make your repository available to others over a network.
svndumpfilter
A program for filtering Subversion repository dump streams
svnsync
A program for incrementally mirroring one repository to another over a network
Tagged : / / / / / / / / / / / / / /

| SVN | Subversion | SVN pros and Cons| SVN Repository Planning | SVN Repository layout

svn-pros-and-cons

| SVN | Subversion | SVN pros and Cons| SVN Repository Planning | SVN Repository layout |

Subversion (SVN) Repository Layout

Single Project – One project per repository location

Pros

· Isolated revision numbers

· Isolated codebase

· Isolated security model

Cons

· Isolated codebase

· Multiple Urls to remember

· Multiple locations to maintain

Multi-Project Layout – Several projects in one repository

Pros

· Easy to merge code between projects

· Single url for all projects

· One repository to maintain

Cons

· Revision numbers span across all projects

· Harder to isolate users to appropriate repositories

Tagged : / / / / / / / / /

How to install subversion on Linux?

subversion-on-linux-installation-process

To install svn in linux and make it fully working , I found it really tough and it has taken my lots of time. I am thankful to Sanjay, who helped me in this and without him it won’t be possible.While installing this you will miss a small thing and you got stuck.But this is not at all tough like open source it’s really very easy.

Why I have choosed this topic to write is that, those who are using it first time will need some time to get full of subversion.

Now the latest version of svn is 1.6.9.

To install svn first you need svn tar file. Which can be downloaded easily from here or you can run these commands (depending on your required version).

wget http://subversion.tigris.org/downloads/subversion-1.6.9.tar.gz

wget http://subversion.tigris.org/downloads/subversion_deps-1.6.9.tar.gz (It contains the library required by svn)

This you can download any where, Here I am creating a folder svn inside /usr/local directory.(/usr/local/softwares/svn/).(So it will be easy for me to specify paths and you to understand).

To start the installation process first untar this two file.

tar -xvzf subversion-1.6.9.tar.gz

tar -xvzf subversion_deps-1.6.9.tar.gz (After untar you won’t find any particular folder named subversion_deps-1.6.9. Don’t worry for that it is keeping all the libraries files inside subversion-1.6.9)

Now have to configure it, but before that we have to check whether our system is having all the dependies or not, like APR(Apache Portable Runtime) and APR utility.

If it’s not there then we can get it from here,

apr-1.2.12.tar.gz

apr-util-1.2.12.tar.gz

once downloaded you can start configuring it.

tar -xvzf apr-1.2.12.tar.gz

cd apr-1.2.12

./buildconf

./configure

make

The apr util directory requires apr directory, so we need to specify path for that.

tar -xvzf apr-util-1.2.12.tar.gz

cd apr-util-1.2.12

./buildconf –with-apr=/path to apr directory (/usr/local/sofwares/svn/apr-1.2.12)

./configure –with-apr=/path to apr directory (/usr/local/sofwares/svn/apr-1.2.12)

make

The other directories we have to check before installation are,

autoconf 2.50 or newer (autoconf –version)

libtool 1.4 or newer (this you can find inside subversion-1.6.9 folder)

Neon Library 0.25.x or 0.26.x (inside subversion-1.6.9 folder)

Berkely DataBase (If it’s not there you have to install it.)

Download the file, db-4.6.21.tar.gz .

Apache web server greater then 2.0.49 (httpd -version)

zlib (inside subversion-1.6.9 folder)

After checking all this, we can start installation process,

cd subversion-1.6.9

./autogen.sh

./configure –with-berkelay-db=/usr/local/softwares/svn/db-4.6.21 (path of berkelay data base)

make

make install

Once we have finished that we need to map svn with apache.

Before that we have to check whether mod_dav_svn and mod_authz_svn modules are present or not,if not then install it.

yum install mod_dav_svn

and add this in /etc/httpd/conf/httpd.conf file

LoadModule dav_svn_module modules/mod_dav_svn.so

LoadModule authz_svn_module modules/mod_authz_svn.so

Make sure you will add these lines after LoadModule dav_module modules/mod_dav.so.

Now create one repository with svnadmin command.Run this command inside your subversion folder.

svnadmin create repos

after that you can check with,

ls repos

conf dav db format hooks locks README.txt

This full path you have to specify in SVNPath.

Then at the end of the httpd.conf file you have to add

#for svn path

DAV svn

SVNPath /usr/local/softwares/svn/subversion-1.6.9/repos

now restart ur apache.

For security purpose to give authentication to the user we have to create authentication file with the command,

htpasswd -cm /etc/svn-auth-file user_name (test)

New password : test123

Re-Type passwd : test123

And to specify which access you want to give the user, create svn-access-file inside /etc.

Inside this file add code as,

[/]

* = rw

This will give authentication to every user specified in Require user inside location.

You can specify this inside httpd.conf file as,

DAV svn

SVNPath /usr/local/softwares/svn/subversion-1.6.9/repos

AuthzSVNAccessFile /etc/svn-access-file

AuthType Basic

AuthName “Subversion repository”

AuthUserFile /etc/svn-auth-file

Require user user_name

 

Now you are ready to import files in the repository, with the following command.

svn import -m “Initial import.” path(from where you want to import file) file:///usr/local/softwares/svn/subversion-1.6.9/repos/(repository path)

after running this command don’t worry it is not goin to display any thing inside repos folder. To check that you can run it in the browser.

http://localhost(you have to give your domain name)/svn/repos

Now you are ready to checkout the files with any svn client. For linux user smartsvn is best.

After doin this you can start ur smartsvn client and can follow these steps,

check out project from repository -> manage -> add -> enter svn url

enter ur url here http://localhost/svn/repos

enter ->ok

server name and repository path it will take automatically. click next, choose user radio button and give user name and password.

follow the steps to fetch the files.

 

To install smartsvn, first get the smartsvn tar file.

untar the file, with the command

tar -xvzf smartsvn-version.gz

for smartsvn first check the correct version of java is available or not, with

java -version command.If it is coming like this then you can proceed.

java version “1.5.0_14?

Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_14-b03)

Java HotSpot(TM) Server VM (build 1.5.0_14-b03, mixed mode)

Sometimes java will be installed but not the JRE. In that case simply re-install java.

Can install the latest version of java with rpm bin file.

jdk-1_5_0_14-linux-i586-rpm.bin

./jdk-1_5_0_14-linux-i586-rpm.bin

go through the license and say yes.

It will installed in /usr/java/

Now have to make chnages in .bash_profile file.

cd /root

vi .bash_profile

give JAVA_HOME path.

JAVA_HOME = /usr/java/jdk1.5.0_14

Then compile it with the command,

source .bash_profile

then again check with java version.

Now you are ready to utilise the full feature of subversion

Tagged : / / / / / / / / / / / / / /

HOWTO: Install e17 from SVN/source on Ubuntu

install-e17-from-svn-source

E17 is a lightweight window manager/bundle of libraries for Unix based operating systems. E17 is designed to be both elegant and fast – two goals it succeeds at very well. The only problem is that installing E17 on Ubuntu (and it’s derivatives) is not a very straight forward process if you have never done it before, the following are the steps I have taken to get the E17 environment up and running on Ubuntu 9.10 (however it should work for all Ubuntu based systems).

Step 1: Install the build dependencies, to do this simply paste the following chunk of code into your favorite terminal and let it work it’s magik

sudo apt-get install xterm make gcc bison flex subversion cvs automake1.10 autoconf autotools-dev autoconf-archive libtool gettext libpam0g-dev libfreetype6-dev libpng12-dev zlib1g-dev libjpeg62-dev libtiff4-dev libungif4-dev librsvg2-dev libx11-dev libxcursor-dev libxrender-dev libxrandr-dev libxfixes-dev libxdamage-dev libxcomposite-dev libxss-dev libxp-dev libxext-dev libxinerama-dev libxft-dev libxfont-dev libxi-dev libxv-dev libxkbfile-dev libxkbui-dev libxres-dev libxtst-dev libltdl7-dev libglu1-xorg-dev libglut3-dev xserver-xephyr libdbus-1-dev liblua5.1-0-dev

Step 2: Now that we have all the dependencies installed, we are going to use the easy e17 script to download, compile, and install e17 from SVN. To do so click on the link I just provided to download the script. Then assuming you downloaded the file to the default Downloads folder run the following in terminal to get the install going

cd ~/Downloads && chmod +x easy_e17.sh && sudo ./easy_e17.sh -i

Go get a cup of coffee or something, the length of time the above command takes to complete depends on your Internet connection and computer speed.

Step 3: Now assuming the commands you ran in step 2 finishes without issues/errors check the output in terminal, it should mention some “environmental variables” that need to be set. Copy and paste each of the export lines it lists to you and run them in terminal.

Step 4: We need to copy the elightenment .desktop file to the proper location in your shared folder so it appears as a log in option in gdm/kdm. To do so run the following in terminal

sudo cp /opt/e17/share/xsessions/elightenment.desktop /usr/share/xsessions/enlightenment.desktop

Log out of your current desktop and select “Enlightenment” from the log in options you are presented with in your login manager.

Enjoy your new E17 powered desktop! Also please remember E17 is considered beta software – so it is not encouraged to use it on production machines. Lastly I would like to also say that while the default configuration of e17 appears crude at first, this is intentional. E17 is extremely customizable. Play with settings, move things around, add and remove objects and you will see creating a beautiful and customized desktop is just a few clicks away!

Source:

http://jeffhoogland.blogspot.com/2010/05/howto-install-e17-from-svnsource-on.html

Tagged : / / / / / / / / / / / / /

How to Integrate Subversion Into Your Ant Build ? – Step by step guide

svn-integration-in-ant-build

SVNAnt
SVNAnt is an Ant task allowing you to interact with Subversion within the convenience of your Ant build script. No more writing custom scripts to get the revision of your repository to tag your release jars. Nor do you have to make command line calls to checkout your latest and greatest as part of your continuous integration process. With SVNAnt, you have the familiarity of the Ant syntax and the flexibility you need for interacting with Subversion.
Features
SVNAnt is a full-featured Subversion client capable of using the native Java bindings or command-line wrappering depending on which is available. Beyond how it works, SVNAnt allows you to do all svn subcommands but the following:

blame cleanup help list
lock log merge propedit
proplist resolved unlocked  

If the svn subcommand is not listed here, you can use it in your Ant build file. Before we continue start using SVNAnt, we have to install it and configure Ant to use it.
Installation
Now that we know what SVNAnt is and what its features are, lets install SVNAnt so that you can begin to use SVNAnt to access Subversion within your Ant build cycle.

Step 1. (Download, Compile and Extract)
This step will download, compile, and “install” the latest version of SVNAnt.
1.1 Using Subversion, checkout the SVNAnt project located here: http://subclipse.tigris.org/svn/subclipse/trunk/svnant
1.2 From the command line, while inside of the location where you checked out SVNAnt to, run “ant makeDistrib”
1.3 Extract the .zip file created in the build directory of your SVNAnt source to a location of your choosing

Step 2. (Modify your build.xml)
The next step is to tell Ant how to find your SVNAnt task by adding the following to your build.xml file:
<path id= “svnant.classpath” >
<fileset dir= “/PATH/TO/YOUR/EXTRACTED/SVNANT-ZIP” >
<include name= “*.jar” />
</fileset>
</path>

<typedef resource=”org/tigris/subversion/svnant/svnantlib.xml” classpathref=”svnant.classpath” />
That should be it. I know that it appears to be too good to be true so lets verify this.

Step 3. (Verify installation)
Building upon Step 2, lets create a new ant task that will use the wcVersion feature of SVNAnt to get some information about your repository from a local working copy:
<target name=”testSVNAnt”>
<svn>
<wcVersion path= “PATH/TO/YOUR/WORKINGCOPY” />
</svn>

<echo message= “Subversion repository url: ${repository.url}” />
</target>
(Note: In the event that you need to pass credentials to Subversion, look here.)
The output should be something similar to this:
$ ant testSVNAnt

Buildfile: build.xml

testSVNAnt:
[svn] <WcVersion> started …
[svn]  finished.
[echo] Subversion repository url: http://svn.apache.org/repos/asf/incubator/openejb/trunk

BUILD SUCCESSFUL
Total time: 43 seconds

Pat yourself on the back. You have successfully installed SVNAnt and you are ready to implement Subversion into your Ant build cycle. Instead of us going through each available feature for SVNAnt, please view the SVNAnt Documentation. Now lets talk about why you may want to use SVNAnt to allow for Subversion interaction inside of your Ant build cycle.

Tagged : / / / / / / / / / / / / / / / /

Syncro SVN Client v5.1 for Windows, Linux & MacOSX – Features

syncro-svn-client-v51

Syncro SVN Client makes easier the document and code sharing between content authors or developers. This multiplatform Subversion front-end allows you to browse repositories, check for changes, commit changes, update your working copy and examiner the revision history. The Syncro SVN Client was initially developed as an embedded application in the XML Editor and starting with version 8.1 of the editor it is available also as a separate product.

Features
• Why Subversion?
– The advantages of the SVN version control system that recommend it as a replacement for the CVS system.
• Flexible Layout of the User Interface
– The layout of the user interface can be arranged by dragging dockable and floating views in the window and outside the window of the application.
• SVN Repository
– Special view for managing SVN repositories accessed through different protocols: SVN, SVN+SSH, HTTP(S).
• SVN Resource History
– The History view contains the revision number, author name, commit message and date of each revision of a file or folder from the SVN repository.
• Local Working Copy of a SVN Repository
– Each author that shares the SVN repository with other authors works on local versions of the repository resources called a working copy of the repository. The changes applied to the local copy of the repository must be synchronized with the repository hosted on the SVN server.
• Author Information at Line Level
– For each line of a file stored on a SVN server the author (user name) and the revision number of the last change applied to that line is displayed.
• Check Differences Between Local Version and Repository Version
– Compare the local working copy version of a file with the SVN repository version.
• Visual Conflict Editing
– Visually edit the conflicts generated in the local version of a file by an update operation.
• Revision Graph
– The history of a SVN resource can be viewed as a graph in which a node represents one revision of the resource committed to the trunk or a branch of the SVN repository.
• Directory Change Set
– The Directory Change Set view presents a set with all the resources changed between two revision numbers of a SVN folder.
• Integration with Bug Tracking Tools
– The commit message can include a bug ID which links the committed revision with a bug tracking tool. Special SVN properties configure the format and location of the bug ID in the commit message.

Home Page – http://www.syncrosvnclient.com/

Tagged : / / / / / / / / / / / / / / /

Syncro Soft Announces New Release of Syncro SVN Client

syncro-svn-client

Syncro Soft Announces New Release of Syncro SVN Client

Syncro Soft Ltd, the producer of Syncro SVN Client, has announced the immediate availability of version 5.1 of its Subversion (SVN) client.

PR Log (Press Release)Mar 15, 2010 – Release date: March 15, 2010

Version 5.1 of Syncro SVN Client improves working copy load time, automatically refreshes the working copy on external file changes, makes repository browsing more responsive, adds support for repository imports at file level, adds support for replacing resources, improves handling of obstructed resources, improves history support, allows creating branches/tags directly from the repository and offers options to print or save as image a revision graph.

For the complete list of features please visit http://www.syncrosvnclient.com

New in version 5.1:

A working copy is cached, so when it is loaded next time in the Working Copy view, the operation will be much faster than in the previous versions of Syncro SVN Client.

The working copy is automatically refreshed if changes are detected in the file system. This is done in order to update the state of the resources modified by external applications.

You can configure the repository connections timeout and stop non-responsive repository browsing operations.

Added support for importing files into a repository.

Working copy resources can be replaced with their HEAD or BASE revision.

Operations correctly take into account obstructed resources.

The history for a resource deleted from the repository but which is still present in the working copy is now displayed by properly detecting the revision at which the resource was deleted.

The Branch/Tag action can be performed directly on the repository, without having a working copy previously checked out.

Generated revision graphs can be printed or saved as images.

Pricing and Availability
Syncro SVN Client with One Year Maintenance Pack costs $59
Syncro SVN Client Site License with One Year Maintenance Pack costs $2970
Volume discount rates are available starting with 5 licenses.

Syncro SVN Client can be run on Windows, Mac OS X, Linux, Solaris.

To purchase please visit the Syncro SVN Client store at
http://www.syncrosvnclient.com/buy.html
Syncro SVN Client 5 can be freely evaluated for 30 days from
http://www.syncrosvnclient.com/download.html

About Syncro Soft LTD

Syncro Soft is a privately held software company founded in 1998 with a large area of expertise in XML technologies: XML Schema, Relax NG, Schematron, XSLT, XPath and XQuery. The main product oXygen XML Editor provides the best coverage of the today XML technologies; it complies with the established standards released by W3C and other organizations and enhances developer productivity through an intuitive and innovative XML IDE. Syncro Soft is a member of W3C.

oXygen is a registered trademark of Syncro Soft in the U.S and other countries. Subversion is a trademark of CollabNet. Any other trademarks or service marks contained herein are the property of their respective owners.

SOURCE: Syncro Soft Ltd.
support@syncrosvnclient.com
http://www.syncrosvnclient.com/

# # #

Syncro Soft provides consulting services that are focused on creating Java based XML solutions. Other aspect is the integration of the XML Editor within your content management system.

Tagged : / / / / / / / / / / / / / /

ANT Builds and Subversion (SVN) | Ant integration with Subversion guide

ant-builds-and-subversion

As I have mentioned in a previous blog entry, I have come to love using ANT in my development environment. One of the things that I like about it is how well it integrates with my Subversion repository using SVNAnt. If you are not using either ANT or Subversion, you owe it to yourself and your team to check it out.

Here we’ll go over a simple build script that exports application files from the Subversion repository into a local folder in the CFEclipse project. You can then view the following entry on how to ftp that into your production/staging server.
First we need to make sure that your ANT install has the necessary SVNAnt jar files. You can download them here: http://subclipse.tigris.org/svnant.html. Once you unpack the svnant-1.0.0.zip file, you’ll find three jar files: svnant.jar, svnClientAdapter.jar, svnjavahl.jar. Place them on your
[ANTInstall]/lib* folder.

Once you have the jar files in place, you can define them in your build file’s property section like so:
<!– svnant lib –>
<property name=”svnant.lib” value=”lib” />
<property name=”svnant.jar” value=”${svnant.lib}/svnant.jar” />
<property name=”svnClientAdapter.jar” value=”${svnant.lib}/svnClientAdapter.jar” />
<property name=”svnjavahl.jar” value=”${svnant.lib}/svnjavahl.jar” />
Followed by this path definition after all your properties have been defined:

<!– path to the svnant libraries. Usually they will be located in ANT_HOME/lib –>
<path id=”project.classpath”>
<pathelement location=”${svnjavahl.jar}” />
<pathelement location=”${svnant.jar}” />
<pathelement location=”${svnClientAdapter.jar}” />
</path>

Now all you have left to do is add the following task definition:
<!– load the svn task –>
<taskdef resource=”svntask.properties” classpathref=”project.classpath”/>

Now you are all set! You can now call tasks like the following export target:

<!– define properties –>
<!– svn repo url –>
<property name=”svn.url” value=”http://[mysvnhost]/svn/repo/myprojectFiles/” />
<property name=”svn.exportPath” value=”[yourDirectory]:\\[pathToYourCFEclipseProject\\build” />

<target name=”svn.export”>
<echo message=”Exporting application files from svn repository:” />
<input message=”Please enter svn repo username:” addproperty=”svn.username” />
<input message=”Please enter svn repo password:” addproperty=”svn.password” />
<mkdir dir=”${svn.destPath}” />
<svn username=”${svn.username}” password=”${svn.password}”>
<export srcUrl=”${svn.url}” destPath=”${svn.exportPath}” revision=”HEAD” />
</svn>
<echo message=” … finished exporting files.” />
</target>

That’s it. No more running command line tasks to get your subversion commands. For additional info and other SVN tasks you can go to http://subclipse.tigris.org/svnant/svn.html

Tagged : / / / / / / / / / / / / / / / / / / /

How to Use SVN Tasks with ANT ?

svn-tasks-with-ant

This post is about using ANT to perform some of the most common source-control related tasks such as export, tagging, and branching. I am using ANT version 1.7.0 and SVN Ant version 1.1-rc3, bound against Subversion 1.4.0.

The related software can be downloaded here:
1.    SVN Ant = http://subclipse.tigris.org/svnant.html
2.    ANT = http://ant.apache.org/
I shall start with build.properties, which lists a few key/value pairs used in our SVN Ant task build file, referred as svn-tasks.xml:

Content of build.properties:
####START of SVN Properties ####
svn.repository.url=http://xyz.com/repos/somereponame
svn.project.base.path=someprojectname
svn.username=user name to access repo
svn.password=password to access repo
#This shall be name of the tag,
#This property should always be updated before build starts
#This property shall be used to export
tag.name=SOME_TAG_NAME_12222008
#This shall be name of new branch,
#this property should be used only when new branch is to be created
new.branch.name=NEW_BRANCH_12222008
####END of SVN Properties ####
Content of svn-tasks.xml:
<property file=”build.properties”></property>

<!– SVN and SVN-ANT Tasks properties –>
<property name=”svn.repository.url” value=”${svn.repository.url}”/>
<property name=”svn.project.base.path” value=”${svn.project.base.path}” />
<property name=”svn.base.url” value=”${svn.repository.url}/${svn.project.base.path}”/>
<property name=”svnant.lib.dir” location=”svn-ant-lib”/>
<property name=”svnant.javahl” value=”false” />
<property name=”svnant.svnkit” value=”true” />
<!– SVN and SVN-ANT Tasks properties –>

<!– *************************************************************** –>
<!–   Set-Up of SVN-ANT classpath                                   –>
<!– *************************************************************** –>
<path id=”svnant.classpath”>
<fileset dir=”${svnant.lib.dir}”>
<include name=”**/*.jar” />
</fileset>
</path>

<!– *************************************************************** –>
<!–   Loading of SVN task                                           –>
<!– *************************************************************** –>
<typedef resource=”org/tigris/subversion/svnant/svnantlib.xml” classpathref=”svnant.classpath” />

<!– *************************************************************** –>
<!– tool-availability: Determine if SVN-ANT is available.           –>
<!– *************************************************************** –>
<target name=”tool-availability”>
<available resource=”org/tigris/subversion/svnant/svnantlib.xml”
classpathref=”svnant.classpath”
property=”available.svnant”
/>
<echo message=”SVN-ANT is available = ${available.svnant}”/>
</target>

<!– **************************************************************** –>
<!– does-svnant-exist: depends on tool-availablility and     –>
<!–                    displays error message                                   –>
<!– ***************************************************************** –>
<target name=”does-svnant-exist” depends=”tool-availability”>
<fail unless=”available.svnant”>
SVN-ANT is not available, cannot perform tagging or checkout/export svn ant task.
</fail>
</target>

<!– ****************************************************************** –>
<!– svntag: performs tagging using properties from                              –>
<!–         build.properties and uses SVNANT tasks                              –>
<!– ******************************************************************* –>
<target name=”svntag” description=”tags individual project using svnant task”>
<property name=”svn.tag.message” value=”Tagging Project ${project.name} with tag name ${tag.name} from trunk “/>
<property name=”src.url”  value=”${svn.base.url}/${project.name}/trunk/”/>
<property name=”dest.url” value=”${svn.base.url}/${project.name}/tags/${tag.name}”/>

<echo message=”${svn.tag.message}”/>
<echo message=”${src.url}”/>
<echo message=”${dest.url}”/>

<svn javahl=”${svnant.javahl}” svnkit=”${svnant.svnkit}” username=”${svn.username}” password=”${svn.password}”>
<copy srcUrl=”${src.url}” destUrl=”${dest.url}” message=”${svn.tag.message}”/>
</svn>
</target>

<!– ****************************************************************** –>
<!– svnexport: performs export using properties from                            –>
<!–            build.properties and uses SVNANT tasks                           –>
<!– ****************************************************************** –>
<target name=”svnexport” description=”exports individual project using svnant task”>
<property name=”svn.tag.message” value=”Exporting Project ${project.name} with tag name ${tag.name}”/>
<property name=”src.url”  value=”${svn.base.url}/${project.name}/tags/${tag.name}”/>
<property name=”destPath” value=”${dest.path}”/>
<echo message=”${svn.tag.message}”/>
<svn javahl=”${svnant.javahl}” svnkit=”${svnant.svnkit}” username=”${svn.username}” password=”${svn.password}”>
<export srcUrl=”${src.url}” destPath=”${destPath}/${project.name}”/>
</svn>
</target>

<!– ****************************************************************** –>
<!– svnbranch: creates a new branch using properties from                       –>
<!–            build.properties and uses SVNANT tasks                           –>
<!– ****************************************************************** –>
<target name=”svnbranch” description=”creates a new branch for individual project using svnant task”>

<property name=”svn.branch.message” value=”Creating new branch for
Project ${project.name} with new branch name ${new.branch.name} from
trunk”/>
<property name=”src.url”  value=”${svn.base.url}/${project.name}/trunk/”/>
<property name=”dest.url” value=”${svn.base.url}/${project.name}/branches/${new.branch.name}”/>

<echo message=”${svn.branch.message}”/>
<echo message=”${src.url}”/>
<echo message=”${dest.url}”/>

<svn javahl=”${svnant.javahl}” svnkit=”${svnant.svnkit}”
username=”${svn.username}” password=”${svn.password}”>
<copy srcUrl=”${src.url}” destUrl=”${dest.url}” message=”${svn.branch.message}”/>
</svn>
</target>

Link: http://java.dzone.com/articles/how-use-svn-tasks-with-ant

Tagged : / / / / / / / / / / / / / / / / /