[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: Peter N. Lundblad <peter_at_famlundblad.se>
Date: 2005-01-01 21:38:52 CET

On Thu, 30 Dec 2004 erh@swapsimple.com wrote:

> On Wed, Dec 29, 2004 at 02:33:05PM +0100, Peter N. Lundblad wrote:
> > On Mon, 27 Dec 2004 erh@swapsimple.com wrote:
> > > Judging from the behaviour of various svn commands, it seems that
> > > directories aren't versioned in subversion. It doesn't appear to be
> >
> > This is not true. Directories are versioned. Moving a file, committing and
> > checking out an old version of the directory will retain the old filename,
> > for example.
>
> hmm.. ok. I've worked with clearcase a bit and it makes an explicit
> distinction between creating a file ("element" in clearcase-speak) and adding
> it to a directory. Of course, if you commit the file, but revert the change
> to the directory, you end up with an unlinked element in the repository.

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.)

> (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.

Hope this clears some things up,
//Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sat Jan 1 21:53:27 2005

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.