top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

Copy changes from one branch to another using SVN

+1 vote
277 views

I have the following setup "trunk and branch A (created from trunk)"

Now, what I want to do is only commit my changes to the trunk and make sure that every committed change is replicated into branch A. This should be an automatic commit, triggered by the commit to trunk, while being aware of the fact that no other changes should be done in branch A but the autocommit from trunk.

Another "would-like" requirement is that the commit metadata like author and commit time/date are kept, but this is not a must have. Is that possible with svn, maybe with autocommit hooks? If not, what other way would you see to achieve that?

posted Sep 30, 2013 by Jai Prakash

Share this question
Facebook Share Button Twitter Share Button Google+ Share Button LinkedIn Share Button Multiple Social Share Button
why? Wouldn't this mean that trunk and branch A are identical at all times - in which case what's the purpose of branch A over trunk?
Well, in case of our teams code base this is true. But our teams code base only makes up a small part of the whole trunk, so there are some dependencies (code and compiled libs) which are different in the two branches. And we do have to run tests against both branches to make sure it works with the different dependencies. Does that make sense?

1 Answer

0 votes

Post commit script that deletes branch A and then recreates branch A from trunk, i.e. make branch A effectively a tag. Since the delete and copy are server side commands, no workspace is needed to make it work.

However this will fail if (when) you need to make custom changes on branch A.

answer Sep 30, 2013 by Salil Agrawal
But that has the effect that i will have all the changes from trunk in branch A, which is not what I want. I only want some certain changes inside there, the changes committed from our team.
Similar Questions
+1 vote

I have two branch in one repository that I need to maintain for 2 different deliveries.
Say branch1 and branch2 in test.git repo.

test.git
- branch1
foo_v1/text.txt
foo_v2/text.txt
- branch2
foo/text.txt

branch1 is developers branch all source looks version'ed manner and branch2 is superset for branch1, example foo_v1 and foo_v2 are the directories in branch1 where developer will update the latest one here foo_v2 and branch2 foo is same as the latest one of branch1 for an instance.

Suppose developer send 10 patches on branch1 where are changes in terms of _/ then I need to apply on my local repo branch1, till now is fine then I need to apply same 10 patches on to my branch2 where source tree which is quite question here how can I do.

+1 vote

We are using Subversion (SVN 1.6.12-r955802).

Since the Apache version 2.2.24 has some security issues (multi-site security issue), we have moved to Apache version 2.2.25. But this updated version has the second commit issue. Issue details are given below.

"The issue with Apache 2.2.25 is when you have 'space' in folder name / file name. The first commit of these files / folders (with space in the name) is successful. We are facing issue only when subsequent commit is happening. We are using Tortoise SVN as client"

+1 vote

I periodically receive this kind of errors -

X:>svn commit -m "BLA BLA" itextsharp.dll iTextSharp.xml
Sending iTextSharp.xml
Sending itextsharp.dll
Transmitting file data ..
svn: E135000: Commit failed (details follow):
svn: E135000: While preparing 'iTextSharp.xml' for commit
svn: E135000: Inconsistent line ending style
svn: E720032: Additional errors:
svn: E720032: Transaction '1718-1ca' cleanup failed
svn: E720032: Can't remove file 'Depotdbtxn-protorevs1718-1ca.rev': The process cannot access the file because it is being used by another process.

Question 1: Is there a way to have SVN normalize line ending on commit by itself?
Question 2: Why txn-protorevs aren't being cleaned up properly?

0 votes

We are using Visual SVN server in our company. It worked well, but users unable to create particular branch from trunk folder

I have put svnadmin verify to check repository and found error as below

  • Verified revision 508448.
  • Verified revision 508449.
  • Verified revision 508450.
  • Verified revision 508451.

svnadmin: E160004: Mergeinfo-count discrepancy on a-1.0.r508452/9674: expected 1244741480414057964+0, counted 116

Could you please tell me what to do

Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...