简体   繁体   中英

SVN checkout: how does it work

Sorry if this is a you-should-know-this kind of question (Somebody told me that there are no dumb questions), but here it goes:

I am a newbie into SVN and I just set it up for my eclipse workspace. I made my eclipse workspace the working space for my SVN whereas I am using a directory in my Dropbox for my SVN repository.

I am able to checkin and check out from my workspace to/from svn repository (in dropbox). Once I delete the project from my workspace, I can check it out again from my repository. I was assuming that the repository (in my Dropbox directory) should keep a copy of my code so that I can check it out even if I delete the code from my workspace. But looking into my svn repository, I don't see the physical files from my project. But I am still able to checkout my code if I delete it from my workspace... What is the magic?

Thanks!

I hope, I understood your question - not that one you asked , but the one that you wanted to ask

You expected that the repository will show the stored tree in the same form as it presented in the workspace, but see instead of some strange files. Am I right?

If answer is "yes", then:

A repository is not a dumb mirror of your files, it's special database which stores your data and all history of changes. Only a Subversion-client is able to communicate with the repository and perform bidirectional transformation of repository-data between the repository and the working copy.

PS : A repo on DropBox is Bad Idea (tm) - there are a lot of special (free or not) Subversion hostings - DropBox knows nothing about SVN-specific details and can destroy the whole repo under some conditions.

SVN repository doesn't simply save a copy of your files, as a change control system, it saves all of your file's change history. So you could not only check out your project, you could also check out any version of your project that you did ever check in to SVN.

But I don't know SVN implementation detail, and I didn't ever care about how SVN organized its internal file storage.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM