Modified directory structure in project, now SVN won't allow me to commit.
I am using an SVN repository to hold revisions for a 开发者_StackOverflowproject. About half way through (having commited several times) i changed the directory structure of the project, and renamed some files.
Now when I try and commit it tells me that the path to an old file (that was renamed, and moved) was not found. Also I am the only person working on this project, so any changes I make to my working copy will be the only changes. I am also using subclipse to manage the project.
How can I commit this modified project?
When you renamed and moved things around, did you use the Subversion commands to rename and move, or did you just change things around on your local filesystem?
Normally Subversion expects to be told that you're moving things around, otherwise it has no way of knowing what you did.
Although there are ways to repair a messed-up working copy, the following brute-force approach often yields fastest results:
- backup your working copy;
- checkout the last committed version from the repository;
- manually inspect the changes between 1) and 2) above (tools such as meld or windiff can help a lot);
- properly merge the changes and commit the new version.
精彩评论