user1717259
user1717259

Reputation: 2883

Renamed directory, now SVN not allowing me to commit

I had a directory (a maven project) called old dir.

I changed the name to new dir by doing an svn rename within Tortoisesvn.

If you do svn status, I see it's done an SVN add on the new dir and and an svn delete on the old dir. When committing under Tortoisesvn, the directories and their contents are listed as either added or deleted, so it does appear that both 'sides' are being committed. However, committing gives this error.

svn: Commit failed (details follow):
svn: Cannot commit 'path\to\new dir' because it was moved from 'path\to\old dir' which is not part of the commit; both sides of the move must be committed together

A related problem: Renamed file, now SVN not allowing me to commit?

Upvotes: 3

Views: 4525

Answers (2)

Ivan Zhakov
Ivan Zhakov

Reputation: 4041

The error message already suggest solution: you should commit both sides of the moves. I.e. original and new location or common parent of them.

Upvotes: 1

user1717259
user1717259

Reputation: 2883

As the directory is a maven project, there were unversioned files in the new dir. mvn clean on the new dir meant that the old and new directories matched, and so the svn commit was then allowed.

Upvotes: 0

Related Questions