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

Re: How Subversion drove me to shoot myself in the foot.

From: Theo Van Dinter <felicity_at_kluge.net>
Date: 2006-04-18 19:05:11 CEST

On Tue, Apr 18, 2006 at 12:50:57PM -0400, Kevin Galligan wrote:
> "Items specified by *PATH* are scheduled for deletion upon the next commit.
> *Files (and directories that have not been committed) are immediately
> removed from the working copy.* The command will not remove any unversioned
> or modified items; use the --force switch to override this behavior."
>
> The problem was that at the point 'svn delete' was run, those files were
> versioned.

If they were versioned, they were committed, and therefore the files are in
the repository. Simply doing "svn add" does not make files versioned:

$ ls -la testing
ls: testing: No such file or directory
$ touch testing
$ ls -la testing
-rw-r--r-- 1 felicity fame 0 Apr 18 12:57 testing
$ svn add testing
A testing
$ svn delete testing
svn: Use --force to override this restriction
svn: 'testing' has local modifications
$ ls -la testing
-rw-r--r-- 1 felicity fame 0 Apr 18 12:57 testing

> However, here's a question to the experts in the group. Following these
> steps:
>
> 1) Add files
> 2) 'svn delete' files
> 3) commit

As shown above, the "svn delete" won't actually delete the files until they're
first committed after the add. ie:

1) "svn add" files
2) svn commit
3) "svn delete" files
4) svn commit

> Might there be any history of the added file? Even though its deleted?
> Like it adds the file's data, then deletes it, and there's some way to
> access it. I doubt it, but thought it might be good to check.

Did you commit the files first? If so, a previous revision of the directory
will have the files.

-- 
Randomly Generated Tagline:
"I think animal testing is a terrible idea; they get all nervous and give
 the wrong answers."               - Unknown

  • application/pgp-signature attachment: stored
Received on Tue Apr 18 19:09:11 2006

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.