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

RE: '?' status code on directory in repo.

From: Dale Worley <dworley_at_pingtel.com>
Date: 2005-02-24 15:48:57 CET

> From: Anthony Metcalf [mailto:anthony.metcalf@anferny.ath.cx]
>
> On Wed, 23 Feb 2005 12:24:53 -0500
> "Dale Worley" <dworley@pingtel.com> wrote:
>
> > Subversion notices when you do "svn copy" because you did
> "svn copy".
> > When a file just appears in the directory, Subversion is careful to
> > not write over it, but it has no reason to believe that you want it
> > under version control until you tell it you do.
>
> That I understand that, in the case where the file has never
> been under
> version control, this is the case where the file has been
> under version
> control previously.
>
> When a file that has been deleted, reappears (not just J Random File
> appearing), I wouold expect either:
>
> 1) It is noticed by svn that this file previously existed in the repo,
> and is put under version control, with the history continued.
>
> 2) The above happens but only with an svn add <file>
>
> 3) When svn add <file> is run the message "This file was previously
> under version control, would you like to continue version control or
> re-name file?[Cn]"

It's an interesting concept, but I think the semantics might be more
complicated than first appears. For one thing, it means that "svn add"
would have to check with the repository to see if a file of that name has
ever existed. (Currently, it is a WC-local operation.) And if the
directory has ever been renamed, even the meaning of that is not clear. It
also means that the effect of an add is changed by something that happened
in the distant past, which by definition is no longer effective.

Conversely, svn does have a method for "add this file as a continuation of
its past", which is "svn cp -rXXX ... ; cp (whatever) file.name". Which is
a better reflection of what you're really trying to do -- restore some
specific past version (so that you've made it clear where the history
continues from), followed by a modification of that version. Of course this
is a lot messier if the item in question is a directory tree.

It seems this is one case of a more general concern -- when people have a
copy of a file or a directory tree, and they want to say "Update the
repository to match this." Svn doesn't really support that concept (though
svn_load_dirs.pl is close); what it really supports is "Start with a
specific version from the repository, then let me manipulate it until it is
what I want."

Dale

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Feb 24 15:55:34 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.