Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 154697
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T10:01:29+00:00 2026-05-11T10:01:29+00:00

I am building a target in nant that branches our project. It creates a

  • 0

I am building a target in nant that branches our project.

It creates a branch in SVN, checks out that branch, updates various files within that branch with the new provided version number, checks it all in.

The SVN branch works fine the first time (using the copy command URL->URL) , but if it is run a 2nd time, it copies the trunk to the BranchName/trunk rather than failing saying it already exists.

Is there a reasonable way for Nant to detect that the branch already exists and not to try to do the SVN copy a 2nd time?

I am trying to build some intelligence into the script so that if it is run a 2nd time with the same inputs that nothing bad happens.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T10:01:30+00:00Added an answer on May 11, 2026 at 10:01 am

    Here is my final script:

    <target name='branchSvn'>     <exec program='${svn.executable}'      commandline='info ${svn.build.root.path}/branches/${branch.name}/ --xml' output='svn_${branch.name}.xml' />     <xmlpeek file='svn_${branch.name}.xml' xpath='/info'      property='branch.info' />     <echo message='${svn.build.root.path}/branches/${branch.name}/ already exists.'      if='${branch.info!=''}' />     <delete file='svn_${branch.name}.xml' />     <exec program='${svn.executable}'      commandline='copy ${svn.build.root.path}/trunk ${svn.build.root.path}/branches/${branch.name}/ -m 'Branched ${branch.name} by nant script.''      if='${branch.info==''}' /> </target> 

    I used the -xml function and xmlpeek to get the info i needed.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to specify the target platform (x64, x86) when building a project?
Starting with a .csproj which defines various xml Content files. Have code generation Target
I have an ASP.MVC 3 project that I am trying to get building on
I'm building a thermostat that pulls its target temperatures from a Google Calendar. In
While building the project, the console shows that the source packages were compiled(the one
I have some elisp files in a project that I want to byte compile
I'm building a little upload script. My form has a target to an iFrame
building a site using PHP and MySQL that needs to store a lot of
Building a website that has English & Japanese speaking users, with the Japanese users
I'm building an iPhone application with a base SDK target of 3.1.x. I've got

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.