IARI
IARI

Reputation: 1377

SVN: move a directory up one level

Suppose you have a directory

A/A/

containing a project. The duplicated Folder name came to be by accident and should be (re)moved - i.e. the project should sit in A/ directly.

Clearly

svn mv A/A/ .

does not work, it will say something like

svn: E150002: Path '..../A' already exists

The solution that I have found so far is

svn mv A/A/* A/

However, this will not move all files - some are ignored. For instance folders starting with a dot (.idea).

What is the proper way to achieve this?

Upvotes: 1

Views: 259

Answers (1)

gbjbaanb
gbjbaanb

Reputation: 52659

You're trying to delete a directory called A and put another directory of the same name to replace it before the initial directory is actually deleted. obviously this is not going to work!

I would move and rename the subdir, and then rename it again after committing to delete the first one.

Its possible committing the initial delete and then moving the now-hidden subdir might work (you'll have to move URL to URL not using the working copy), but it seems too much of a trick to use for me when something simple is easier to do.

Upvotes: 1

Related Questions