开发者

Using svn to delete multiple directories at once so then I can replace them with new directories of the same name

I find a lot of svn commands out there to delete directories and files. Unfortunately, every time I run these commands, I get strange errors afterwards like 'not under version control' or 'conflict'. I'm just looking for a straightforward svn command that will allow me to delete all the directories under the MARKT directory below so I can then create new directories with the same nanme as the one I deleted, without any conflict arising:

[root@Proxima marketing]# cd MARKT
[root@Proxima MARKT]# ls
app  Capfile  config  db  doc  IDENTIFIED  lib  log  public  Rakefile  README  README.txt  script  test  tmp  vendor
开发者_StackOverflow社区

I'm using mac OSX. Thanks for any response.

I try to delete a directory and commit and I get this:

Commit failed (details follow):
Aborting commit: '/Users/jmerlino/MARKSITE AUGUST/db' remains in tree-conflict

In fact, I get this tree conflict for every single directory.


remains in tree-conflict

means that the directory has been merged and svn has found the directory is missing (or added) when it thinks it should/ shouldn't be. In short, its telling you that something is a big wrong and that you need to sort it out (resolve it) before continuing.

You have to svn resolve the parent directory before you can do anything with that WC. (ok, you could svn revert is you prefer to start again)


Tree conflicts are basically merges between 2 different directory trees that svn cannot fix by itself. This of a directory as a file with a list of files in it, if you delete lines from this file (eg delete directories) or add lines (add dirs) and then merge this 'file', and svn cannot perform the merge (eg as you've deleted and added the same dir on different merge targets) then it will tell you - by reporting a conflict. Its then up to you to fix things and tell svn you've fixed it.


To delete a directory under MARKT:

> cd MARKT
> svn delete <dir1>
> svn delete <dir2>
> svn commit

To create a new directory under MARKT:

> mkdir <dir1>
> mkdir <dir2>
> svn add <dir1>
> svn add <dir2>
> svn commit
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜