views:

47

answers:

2

I have been working in a branch for a couple months and am now trying to merge the trunk into the branch, before finally merging my branch into the trunk.

After successfully merging a few revisions, SVN threw an error about the "bin" folder being locked. When I created my branch, the folder was called "Bin", but at this particular revision that threw the error, another developer inadvertently committed a duplicate directory called "bin". During the merge, SVN attempted to bring down the new "bin", but Windows balked, throwing the lock error.

My question is how to deal with this? Although the project in question went through many changes, including deleting the Bin, deleting the bin, and eventually adding the Bin back, I have to replay all of those actions when I am merging revision-by-revision from the trunk to my branch. How do I get past the error when it occurred in the past? Do I go into Repo Browser and delete the duplicate "bin" folder in the old revision? This is very frustrating because it wasn't an error when the other developer checked the duplicate directory in, but it causes an error when trying to merge/update that revision to my working copy.

Also, am I supposed to be committing after merging each revision into my branch? Or am I safe to keep merging and commit my branch only at the end?

Thanks for any help you can provide.

+2  A: 
sbi
SVN merging works by taking the changes applied to each revision and applying it to the merge-target. Its not the same as running winmerge on 2 files. I think this is what he means.
gbjbaanb
Thanks for the info. I am posting a new comment with additional merge-related questions.
Scott
A: 

the idea of merging is to commit only at the end - once you're happy with the merge result. You shoull review the merge operation as there's always a case where the computer gets confused, you don't want to commit those confusions in!

Ok, so to fix the problem here.. I think I'd suggest trying to merge all your changes up to the offending revision, then merging the bad revision by itself and seeing if that helps. When you get to the tree-conflict error, you can fix things up manually, resolve the conflict and then merge the remaining revisions.

An alternative approach might be to create a new branch from trunk at the same point you started your branch, then checkout the trunk's HEAD revision and commit, then merge that (single revision) to your branch so you'll get all the changes without the intermediate problem. Then you can update your mergeinfo property to tell your branch that you've merged all the revisions from trunk already so it won't try to merge them next time. A bit of a fudge, but it might save you some headache.

Generally though, problems like this are solved by understanding how svn merge works, tree-conflicts are a nuisance but once you've got them, they're easy to fix. What you describe does sound like a tree-conflict, but let us know if you're getting a different error.

gbjbaanb
This is not an SVN problem at all, and certainly no conflict. SVN can very well handle that case-sensitive names. It only chokes when the file system presents the just created `Bin` as the just-deleted `bin`. There's nothing SVN can do to overcome this. Even if you merge smoothly using a case-sensitive file system, this will bite Windows user when they update.
sbi
To get past the error, I deleted the existing Bin in my working copy using File Explorer. The merge from trunk to my branch for this particular revision then successfully created the duplicate "bin". So now what? Do I just continue merging? What will happen when I attempt an Update? A commit?
Scott
The revision that previously gave me trouble was 1434. By deleting Bin in my working copy, that merge worked successfully. The very next merge (1435) blew up with the same lock error. I suppose it's because Tortoise or SVN is computing the delta between 1434 and 1435 and the files in my branch working copy, and is somehow evaluating the Bin and bin again. How exactly should I proceed?
Scott
no, its because the merge is expecting a Bin directory (that you deleted) and cant find it to apply the merge to. But as you expect this, just svn resolve the conflict, and then carry on.
gbjbaanb
Thanks for the help. I guess the confusing thing is that by merging problematic revisions that occurred in the past, I am introducing errors into my branch that were already solved in later revisions of trunk. I'm just confused whether my "fixing" the (temporary) errors in my branch will further confuse matters during the reintegration back into trunk.
Scott