You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Ch...@playstation.sony.com on 2008/10/14 00:39:05 UTC

Where does Subversion keep the initial version of a file after the initial commit?

Hello,

I have just used TortoiseSVN to do an initial commit of a simple 
experimental project of mine into a Subversion
repository, freshly created.

After the initial commit, I could use TortoiseSVN to browse my repository. 
 And I saw my source code file there, 
as intended.        It was only when I used DOS commands to 'browse' 
through my repository that I didn't see my 
source code file. 

I wonder if you could please help me understand how and where Subversion 
keeps the source code file after the
initial commit?      If my understanding is correct, for each commit, 
Subversion keeps, in the repository,  a small file with
information of what has changed.   This makes me think that for the 
initial commit, Subversion would need to store 
the complete source code file, somewhere.  And I wonder where this would 
be?

The reason I am having these questions is that I am planning to set up my 
repository on a Windows shared drive,
which is regularly backed up.    If the source code file is in the 
repository, then my code back-up would be taken care 
of.    And if I loose my source code file, in my development environment, 
I think I would still be OK. 

But if the source code file is actually somewhere else outside of the 
repository, then I would need to find another way 
to back up my code.

Thank you for your help.

Chris

RE: Where does Subversion keep the initial version of a file after the initial commit?

Posted by "Wu Li (wuli2)" <wu...@cisco.com>.
Hello,

Re: Where does Subversion keep the initial version of a file after the initial commit?

Posted by Andy Levy <an...@gmail.com>.
On Mon, Oct 13, 2008 at 20:39,  <Ch...@playstation.sony.com> wrote:
>
> Hello,
>
> I have just used TortoiseSVN to do an initial commit of a simple
> experimental project of mine into a Subversion
> repository, freshly created.
>
> After the initial commit, I could use TortoiseSVN to browse my repository.
>  And I saw my source code file there,
> as intended.        It was only when I used DOS commands to 'browse' through
> my repository that I didn't see my
> source code file.
>
> I wonder if you could please help me understand how and where Subversion
> keeps the source code file after the
> initial commit?      If my understanding is correct, for each commit,
> Subversion keeps, in the repository,  a small file with
> information of what has changed.   This makes me think that for the initial
> commit, Subversion would need to store
> the complete source code file, somewhere.  And I wonder where this would be?

You cannot see the "original file" except via a Subversion client.
When you use FSFS for your back-end (the default since 1.2),
Subversion stores each revision as a separate file. If you commit 50
files as revision 1, you get one file in the repository database
representing that revision. If you then commit a change to each of
those files as separate commits, you will get 50 more revision files,
one for each commit.

You cannot look at these files and "read" the original file & changes
you committed directly. You must use the Subversion libraries.

> The reason I am having these questions is that I am planning to set up my
> repository on a Windows shared drive,
> which is regularly backed up.

That's really not a good idea, as there are permissions problems that
may result. Not to mention the fact that all users will need Full
Control on that directory, which means a single errant keystroke could
destroy the repository. Sure, you might have a backup, but why put
yourself in a position where it'd be so easy to require it be used,
regularly?

Doing a plain copy of the repository is not a recommended backup
procedure. If someone is committing to the repository while the backup
is being made, you could lose data.  See
http://svnbook.red-bean.com/en/1.5/svn.reposadmin.maint.html#svn.reposadmin.maint.backup

>    If the source code file is in the
> repository, then my code back-up would be taken care
> of.

> But if the source code file is actually somewhere else outside of the
> repository, then I would need to find another way
> to back up my code.

Where else would the repository "keep" the files if not in the
repository itself? It would make no sense to set up a storage location
for Subversion only to not use it at all.

Have you read the manual yet?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Where does Subversion keep the initial version of a file after the initial commit?

Posted by Hari Kodungallur <hk...@gmail.com>.
On Mon, Oct 13, 2008 at 5:39 PM, <Ch...@playstation.sony.com> wrote:

>
> Hello,
>
> I have just used TortoiseSVN to do an initial commit of a simple
> experimental project of mine into a Subversion
> repository, freshly created.
>
> After the initial commit, I could use TortoiseSVN to browse my repository.
>  And I saw my source code file there,
> as intended.        It was only when I used DOS commands to 'browse'
> through my repository that I didn't see my
> source code file.
>
> I wonder if you could please help me understand how and where Subversion
> keeps the source code file after the
> initial commit?      If my understanding is correct, for each commit,
> Subversion keeps, in the repository,  a small file with
> information of what has changed.   This makes me think that for the initial
> commit, Subversion would need to store
> the complete source code file, somewhere.  And I wonder where this would
> be?
>
> The reason I am having these questions is that I am planning to set up my
> repository on a Windows shared drive,
> which is regularly backed up.    If the source code file is in the
> repository, then my code back-up would be taken care
> of.    And if I loose my source code file, in my development environment, I
> think I would still be OK.
>
> But if the source code file is actually somewhere else outside of the
> repository, then I would need to find another way
> to back up my code.
>
> Thank you for your help.



All the files are within the ROOT/revs directory of the repository. Each
file is not separately. Instead each file in that directory represents a
revision. Your files are there in those revision numbered files and you can
just backup the repository directory and you are good to go :-)

rgds
-Hari