开发者

Drastic re-arranging via svn

开发者 https://www.devze.com 2023-03-13 08:51 出处:网络
So I am doing pretty drastic re-arranging of files through SVN. By drastic I mean moving dozens of folders at a time and creating dozens more. I am having a lot of trouble wrestling with SVN. Part of

So I am doing pretty drastic re-arranging of files through SVN. By drastic I mean moving dozens of folders at a time and creating dozens more. I am having a lot of trouble wrestling with SVN. Part of it is I开发者_运维百科 keep forgetting to use 'svn mv' and the other relevant svn commands. Part of this though is the built in tools (find, xargs, etc...) give me more power to do certain things.

To make a long story short I keep getting situations where I move a directory and the source destination appears flagged as '!' and the new destination as '?' which makes sense. However, when I try to add the new destination marked '?' it says it's already under subversion. I am assuming it's .svn directory is causing problem but if I delete it then I get "not a working copy" error.

So the higher level question is, am I stuck with svn mv, svn delete, svn mkdir, etc...? I have searched and found references to git-svn but it is not an option. Any advice for large re-arranging of files via svn? Is there an equivalent to something like:

find . -type d -name somefolder -exec touch somefile \;

Using svn commands to not cause trouble. Or more relevant, if I'm doing edits like these:

mkdir -p {a,b,c}/{d,e}/f

How do I do that using svn mkdir?

Thanks.


To fix your current problem, you could delete the .svn directories from the moved folders. After that you can add them again.

But I would really recommend to use svn mv instead since you lose the reference to the version history of a file otherwise.

Using svn commands to not cause trouble. Or more relevant, if I'm doing edits like these:

mkdir -p {a,b,c}/{d,e}/f

You could try this:

mkdir -p {a,b,c}/{d,e}/f
svn add {a,b,c}/{d,e}/f


I often use xargs when doing large svn operations and I don't find that very limiting compared to using ordinary commands.

0

精彩评论

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