This post might be a bit long, but if you think you can help, please read it because it would in literal terms be a lifesaver.
Here's the scenario. I am working on a project [for KDE], whose trunk is hosted at, lets say: http://ubersvn.org/home/uber/trunk/myapp. Also, I'm working on a branch, lets say: http://ubersvn.org/home/uber/branches/work/myapp-mod. This is what I've been doing:
After creating a branch, I worked throughout on my local working copy of the branch, and I frequently used to pull changes from the trunk. I was told that it would help in preventing a load of conflicts when it came to finally merging back to the trunk. So, quite frequently, I used to do:
svnmerge.py merge
svn commit -F svnmerge-commit-message.txt
After the work was done, it was time to merge the branch back to the trunk. I first checked out a working copy of the trunk:
svn co svn+ssh://ubersvn.org/home/uber/trunk/myapp
cd myapp
Then, I followed the documentation for merging back:
svnmerge init svn+ssh://ubersvn.org/home/uber/branches/work/myapp-mod
And to merge back and forth:
svnmerge merge --bidirectional -S svn+ssh://ubersvn.org/home/uber/branches/work/myapp-mod
And here is where the problem starts. Firstly, from the looks of it, it is merging every single revision since I branched. If it is doing this, I don't see the point in me frequently pulling from trunk and keeping my branch up to date. However, I'm just assuming svnmerge somehow uses it to resolve conflicts throughout the merge. So far, so good.
Secondly, it ended abruptly with an error that sounded something like:
Attempt to add tree conflict that already exists
A little search online told me the problem could be solved by:
svn resolve --accept working -R .
And then it shows that some resolves were cleared and all. However, now when I do this:
svnmerge merge --bidirectional -S [BRANCH_URL]
it says, 'no svnmerge info found'. I tried using svnmerge init BRANCH_URL
, but it says that '.' has local modifications. It must be clean
.
So, now the problems I am facing are:
- I cannot pull from my branch since there are local modifications
- To make my working copy clean, I must commit, which is not an option since the merging is only halfway and it would definitely break trunk.
- My files are completely inconsistent. I don't know how the revisions were merged, there are files which include 'mylittleapp.h', but 'mylittleapp.h' was created in a later revision.
- **There are a huge number of conflicts** for **EVERY** new file that was added in my branch. I **absolutely** do not understand this. I was the ONLY developer working on those files, those files were not able in the trunk at any point of time. Why are there so many conflicts in those files?
- There are a huge number of files called `mybigapp.h.merge-(right|left).r[0-9]+`, and `mybigapp.h.working`. `mybigapp.h` itself is FULL of conflicts. So many conflicts that it is humanly impossible to resolve.
- Since half the files assume the existence of a file which is actually not present, I cant test or do anything till I get the file. And I just cannot get any later revisions after the `attempt to add tree conflict` error.
So, how do I proceed from here? One solution seems to be to just diff from the branch, apply to the trunk and then commit. But according to the policies of the organization I work for, it is not acceptable. Any help is greatly appreciated and I'd be really grateful.
Thanks, rohan