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

Re: are directories versioned?

From: <erh_at_swapsimple.com>
Date: 2005-01-02 03:11:35 CET

On Sat, Jan 01, 2005 at 09:38:52PM +0100, Peter N. Lundblad wrote:
> Just to avoid further confusion: in svn, revert changes only the working
> copy. I don't know CC, but that seems different there. (You can "revert"
> changes in the repository by merging changes backwards, but that will keep
> the file in old revisions.)

        it's the same in clearcase. The difference is that CC lets you put the
directory commit and the file commit in different transactions (I'm assuming
CC has a similar transaction per user-typed-command as svn) whereas it seems
that svn ensures both operations happen within a single transaction and
svn doesn't let you revert one change without reverting the other also.

> > (which then shows up in a special lost+found directory)
> > Is it possible for subversion to fail like that if adding (or moving) a file
> > is interrupted halfway through? If so, what happens to the file?
> >
> A commit can fail (or be interrupted) in the middle. That can give you a
> transaction in the repository that is not committed. That transaction can
> be inspected (using svnlook) or removed (using svnadmin). A file in a
> committed transaction (also known as revision) is identified by a path and
> a revision number, so files can't be "unlinked" like you describe for
> clearcase.

        hmm... that seems to imply that there isn't a separate element (to use
a CC term) object that file changes are applied to. Which means that doing
something like figuring out all the changes that might have happened to an
element is essentially impossible because you'd need to search every version
of every directory looking for any file that refers to the one you are
running the command on. Is that right?

So, I'm guessing that to get the contents of a file svn does a single lookup
like this:
path+rev => file contents (perhaps stored as changes to a different path+rev?)
(and directories are just lists of filenames, a cache in effect)

instead of what I was thinking of:
path+rev => directory object
directory object+filename+rev => element obj (like an RCS file)
element obj+path+rev => file contents

eric

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sun Jan 2 21:07:18 2005

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