[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

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

From: Andy Levy <andy.levy_at_gmail.com>
Date: Mon, 13 Oct 2008 22:07:27 -0400

On Mon, Oct 13, 2008 at 20:39, <Chris_Hoang_at_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_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-10-14 04:07:49 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.