开发者

svn: clean way to replace external with local folder of same name

开发者 https://www.devze.com 2023-02-03 21:36 出处:网络
I have a repository checked out in various places. I have a folder X that is an external to another repository. I want X to be local. There are other questions but they don\'t seem to have run into my

I have a repository checked out in various places. I have a folder X that is an external to another repository. I want X to be local. There are other questions but they don't seem to have run into my difficulties.

What I did is I edited the svn:externals and removed that line. Then I commited the repo. Then I took the folder, removed all the .svn entries in it (to make it a regular folder), and svn added it, then commited. This worked fine.

However, when I updated another checkout of开发者_StackOverflow the repo, I ran into problems. The first error was something like:

UUID mismatch: existing directory XXX was checked out from a different repository.

Ok, already svn up fails, but I try deleting the folder and re-updating. Now it manages re-get all of the contents, but now I get a new error:

Can't remove file XXX: Access is denied

I try updating again, and nothing happens. I delete a file within that folder and update again from the root, nothing happens. I delete the folder X, and nothing happens - so it seems to have just forgotten about it! My only recourse is to delete the root directory of X and re-svn up from a level down (since all this was also happening in a sub folder that was also an external).

Not good.. I don't want to have to do some manual rigamarole on all the sites where this repository is checked out. What to do?


Maybe not the cleanest solution, but it works:

  • Remove the external folder in you local copy (DO NOT use svn rm folder)
  • Update with the version from the repository


Not sure if it would work, but worth the try.

Try updating to the revision where you deleted the externals, after that make your update to the head.

// XX revision of the externals deletion
svn update -rXX 
// to see if the folder is deleted
svn status
// delete the folder if he is on the local working copy
svn rm folder
// Update to head
svn update
0

精彩评论

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

关注公众号