troubleshooting Question

automate the svn merge process with shell script

Avatar of CharanR
CharanR asked on
Shell Scripting
1 Comment1 Solution1940 ViewsLast Modified:
I want to automate the process of merging tag to trunk in svn using shell script. I'm finding difficulty when getting the revision number of tags and put it in svn merge automatically.

these are the following steps to merge the tag to trunk

1. checkout tag
2. checkout trunk
3. cd to tag
4. run the command svn log --stop-on-copy (this will give the revisions. Please see the code snippet)
5. get the revision number from the above command (here the revision is 2780 from code snippet)
6. svn merge --dry-run -r2780:HEAD http://url/path  (testing the merge. if test merge fails ask the user whether the real merge can be done or not)
7. If user says yes, run svn merge  -r2780:HEAD http://url/path
8. print merge successful
svn log --stop-on-copy
r2811 | harry | 2009-12-24 11:47:57 -0800 (Thu, 24 Dec 2009) | 1 line

removed *.db
r2790 | sally | 2009-12-23 15:35:26 -0800 (Wed, 23 Dec 2009) | 1 line

updated index.jsp
r2787 | sally | 2009-12-23 15:33:09 -0800 (Wed, 23 Dec 2009) | 1 line

r2780 | sally | 2009-12-23 15:20:04 -0800 (Wed, 23 Dec 2009) | 1 line

Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 1 Comment.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 1 Comment.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros