开发者

SVN merge from trunk to branch after trunk directory name has been changed

开发者 https://www.devze.com 2023-04-01 15:38 出处:网络
I have a situation where I branched off trunk and after a number of days of development work in my branch, someone else changed the name of the project directory in trunk. Something like this:

I have a situation where I branched off trunk and after a number of days of development work in my branch, someone else changed the name of the project directory in trunk. Something like this: from /Project/Directory/trunk/old_dir_name to /Project/Directory/trunk/new_dir_name

This has caused me a rash of proble开发者_如何转开发ms (of course).

Looking at the log entry from when he did this, all it shows is: Action Path Copy from path Revision Deleted /Project/Directory/trunk/old_dir_name Added /Project/Directory/trunk/new_dir_name /Project/Directory/trunk/old_dir_name 12345

When I tried a test merge of trunk into my branch so I'd have the latest updates, I got a Conflicted error on one file. If I try a test merge for the latest revision of just that file I get: Error Repository moved permanently to '.../!svn/bc/13649/Project/Directory/old_dir_name/trunk'.

How do I fix this so I can keep my branch up to date as needed?

(If it matters we use the TortoiseSVN front-end).


This is well known svn bug since 2002 - see here.

For example if you rename file/directory(or file under it) in a branch, and the file/directory(or file under it) changed on trunk you'll have problem to merge branch to trunk.

Why this happens? It's simple - svn rename is implemented as remove of file (a) and adding it with new name (a'). So (a') on branch in my example and (a) are not inherited from the same file. Hovewer, svn tries to minimize the problem and adds to (a') tag information about (a), so if you do svn log on (a') you see rename action, as well changes of (a) too.

0

精彩评论

暂无评论...
验证码 换一张
取 消