Setting a Dynamic SVN URL based on repository change

Hi,

I'm looking to poll repository for changes, determine if change was made, find URL of change in SVN and extract the URL. Ideally, this would all be in one build plan.

For example, if developer checks in code to Code/ABC/MR3 then I want Code/ABC/MR3/build.xml to run. If developer checks in code to Code/ABC/MR1 then Code/ABC/MR1/build.xml should run. However, I only want one build plan monitoring Code/ABC.

1 answer

Use svn command line from whatever SVN client application you use (TortoiseSVN, CollabNet, etc.)

"C:\Program Files\TortoiseSVN\bin\svn.exe" diff  -r PREV:COMMITTED --summarize

By default this uses the current directory, you can specify a checked out directory or svn repository by including it as an additional parameter, no flag.

You also have a --xml option if you want xml output. This will give you the changelist from the latest revision checked out. You'll still have to write scripts around it to make it work.

Since this only checks the latest revision, it is possible with polling periodically and/or a single builder to "skip" revisions and over look their changes so you make need to improve the call more to your needs. "PREV" could be replaced with the last built revision is you can store that somewhere.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

1,986 views 1 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you