You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by NS Klanten <ns...@gmail.com> on 2015/05/10 22:19:57 UTC

fsfs storage

Hello all,

Where  are the "initial" or base  text files (source codes) are stored in
fsfs storage ?

I commit a new source code to my svn server, however after searching all
the related svn folders in my server, I can not find the plain text file. I
assume that source code is just stored as plain text in fsfs storage and it
isn't hashed, is my assumption correct?


Thanks in advance for your help,
Jennifer Brooks.

Re: fsfs storage

Posted by Nico Kadel-Garcia <nk...@gmail.com>.
On Mon, May 11, 2015 at 9:27 PM, Daniel Shahaf <d....@daniel.shahaf.name> wrote:
> Geoff Field wrote on Mon, May 11, 2015 at 11:14:41 +1000:
>> The files are stored in original format in your working copy under
>> ./.svn/pristine/*, but with hashed names.
>>
>
> That's an implementation detail.
>
>> On the server, they're stored under ./db/revs as a series of deltas.
>> If you look at ./db/revs/0 with a text editor, for example, you'll see
>
> That's *extremely* dangerous advice.  If you open one of those files in
> a text editor, you run an extremely high risk of corrupting your
> repository, quite possibly creating a latent corruption that will only
> manifest months or years later.

Use a pager, such as 'less'.


> Don't ever edit those files.  If you're curious, use a sandbox, or an
> svnsync mirror, and play with that.
>
>> If you're only storing text files, there's half a chance of
>> understanding what's stored in the delta files.  I wouldn't even
>> consider editing them, though.
>
> Don't bother trying.  It's not possible to edit a revision file without
> corrupting the repository.
>
>> There is probably a setting somewhere to allow a "shadow" version to
>> be set up somewhere - if not, it would be a nice idea.  I know in
>> SourceSafe, I was able to set up "shadow" folders on a server so that
>> changes were automatically updated.  I suspect that SubVersion would
>> require a server-side post-commit hook to be written to do the same
>> job.  Does anybody have one they could share?
>
> svnwcsub, documented in the FAQ.
>
>>
>
> Cheers,
>
> Daniel
>
> P.S. Geoff: don't let the above discourage you from understanding how
> svn works behind the scenes.  The only thing I ask is that you don't
> give people advice that effectively teaches them how to corrupt their
> repositories....

Re: fsfs storage

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Geoff Field wrote on Mon, May 11, 2015 at 11:14:41 +1000:
> The files are stored in original format in your working copy under
> ./.svn/pristine/*, but with hashed names.
>  

That's an implementation detail.

> On the server, they're stored under ./db/revs as a series of deltas.
> If you look at ./db/revs/0 with a text editor, for example, you'll see

That's *extremely* dangerous advice.  If you open one of those files in
a text editor, you run an extremely high risk of corrupting your
repository, quite possibly creating a latent corruption that will only
manifest months or years later.

Don't ever edit those files.  If you're curious, use a sandbox, or an
svnsync mirror, and play with that.

> If you're only storing text files, there's half a chance of
> understanding what's stored in the delta files.  I wouldn't even
> consider editing them, though.

Don't bother trying.  It's not possible to edit a revision file without
corrupting the repository.

> There is probably a setting somewhere to allow a "shadow" version to
> be set up somewhere - if not, it would be a nice idea.  I know in
> SourceSafe, I was able to set up "shadow" folders on a server so that
> changes were automatically updated.  I suspect that SubVersion would
> require a server-side post-commit hook to be written to do the same
> job.  Does anybody have one they could share?

svnwcsub, documented in the FAQ.

>

Cheers,

Daniel

P.S. Geoff: don't let the above discourage you from understanding how
svn works behind the scenes.  The only thing I ask is that you don't
give people advice that effectively teaches them how to corrupt their
repositories....

RE: fsfs storage

Posted by Geoff Field <Ge...@aapl.com.au>.
	From: NS Klanten
	Sent: Monday, 11 May 2015 6:20 AM
	Subject: fsfs storage
	
	
	Hello all, 

	Where  are the "initial" or base  text files (source codes) are stored in fsfs storage ?

	I commit a new source code to my svn server, however after searching all the related svn folders in my server, I can not find the plain text file. I assume that source code is just stored as plain text in fsfs storage and it isn't hashed, is my assumption correct?


	Thanks in advance for your help,
	Jennifer Brooks.

Hi Jennifer,
 
The files are stored in original format in your working copy under ./.svn/pristine/*, but with hashed names.
 
On the server, they're stored under ./db/revs as a series of deltas.  If you look at ./db/revs/0 with a text editor, for example, you'll see it starts with the word "PLAIN".  Every other file from there on starts with the word "DELTA".  For the sake of efficient storage, there is no plain storage of the original files.  You'll find this with many version control systems.
 
If you're only storing text files, there's half a chance of understanding what's stored in the delta files.  I wouldn't even consider editing them, though.
 
There is probably a setting somewhere to allow a "shadow" version to be set up somewhere - if not, it would be a nice idea.  I know in SourceSafe, I was able to set up "shadow" folders on a server so that changes were automatically updated.  I suspect that SubVersion would require a server-side post-commit hook to be written to do the same job.  Does anybody have one they could share?

Regards,

Geoff

-- 
Apologies for the auto-generated legal boilerplate added by our IT department:


- The contents of this email, and any attachments, are strictly private
and confidential.
- It may contain legally privileged or sensitive information and is intended
solely for the individual or entity to which it is addressed.
- Only the intended recipient may review, reproduce, retransmit, disclose,
disseminate or otherwise use or take action in reliance upon the information
contained in this email and any attachments, with the permission of
Australian Arrow Pty. Ltd.
- If you have received this communication in error, please reply to the sender
immediately and promptly delete the email and attachments, together with
any copies, from all computers.
- It is your responsibility to scan this communication and any attached files
for computer viruses and other defects and we recommend that it be
subjected to your virus checking procedures prior to use.
- Australian Arrow Pty. Ltd. does not accept liability for any loss or damage
of any nature, howsoever caused, which may result
directly or indirectly from this communication or any attached files. 



Re: fsfs storage

Posted by Daniel Becroft <dj...@gmail.com>.
On Mon, May 11, 2015 at 10:56 AM NS Klanten <ns...@gmail.com> wrote:

> Hello all,
>
> Where  are the "initial" or base  text files (source codes) are stored in
> fsfs storage ?
>
> I commit a new source code to my svn server, however after searching all
> the related svn folders in my server, I can not find the plain text file. I
> assume that source code is just stored as plain text in fsfs storage and it
> isn't hashed, is my assumption correct?
>

The SVN repository should be treated like a black box. You checkout code,
you commit code, but as far as where that actual data is stored, it
shouldn't be messed with directly. There are numerous SVN clients available
for interacting with the repository.

What are you trying to achieve?