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

Re: some questions on how exactly SVN works when restoring an old file version

From: Ben Reser <ben_at_reser.org>
Date: Fri, 15 Feb 2013 10:15:01 -0800

On Fri, Feb 15, 2013 at 9:20 AM, Bo Chen <bo.irvine.chen_at_gmail.com> wrote:
> Hi, can anyone help me a little bit for these questions: How does SVN work
> when recovering to a desired copy, specifically, how EXACTLY SVN does by
> combining the delta to reconstruct a desired file version.In CVS, they
> record the delta (for text file), as well as the update information like in
> which lines we have an insertion/deletion. However, in SVN, do we keep this
> information? Otherwise, how can we restore a desired file version. For
> example, I create one file, and make one simple insertion (insert a
> character). The following shows the file versions and the corresponding
> delta information in the repository. Can anyone tell me how exactly can I
> restore the second file version by the fist file version and the delta file
> for the second file version? I appreciate very much for your help.

The deltas are stored in svndiff format. The documentation of the
format is stored here:
https://svn.apache.org/repos/asf/subversion/trunk/notes/svndiff

You may find the fsfsverify.py tool handy in understanding the data
stored in the rev files. For example the following command will show
you the windows and instructions in the svndiff data:
fsfsverify.py -i $REPO/db/revs2

You can find fsfsverify.py here:
https://svn.apache.org/repos/asf/subversion/trunk/contrib/server-side/fsfsverify.py
Received on 2013-02-15 20:15:48 CET

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

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