开发者

why Tortoise SVN removes files by "SVN update.."

开发者 https://www.devze.com 2023-04-06 01:00 出处:网络
I am going to use TortoiseSVN and trying to learn it! But I faced an ambiguity in version control action.

I am going to use TortoiseSVN and trying to learn it! But I faced an ambiguity in version control action. I create a test project, and commit it to the repository then I remove some files and folder and again commit the change to the repository. Now I want to retrieve those deleted files and folders through the previous version! ( I think it should be feasible !) so I right clicked on the folder and chose the “Update to reversion...” and used the first version (which contains the deleted items) and chose “copy to working..” so all files got back to their places so far so good but when I tried to commit it does not show anything and when I click on “SVN Update..” , Tortoise removed all the deleted files agian! In order to test I re-update to the older version and I added a new folder and commit it开发者_StackOverflow to SVN, but when I clicked on “SVN update ..” again all of my files were deleted (except the new folder)! I don’t understand what is the whole point of “update to revision..” when you can’t keep the changes? What is wrong here?


That's what update does. It updates to the latest version.

Let's clarify this by example. Let's imagine you have the following revisions:

1: a.txt b.txt c.txt
2: b.txt (deleted a/c)

When you "update to version 1", you will get a-c.txt.

Then, when you say "SVN Update," SVN looks at the tree and says "the latest version is 2; let me delete a.txt and c.txt."

I think what you want is to perform a rollback and "undo" checking in the deletion changes. Either that, or just re-add the files and things will work as you expect.

0

精彩评论

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

关注公众号