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

Re: [patch]: make svn delete remove the file

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2002-04-22 14:19:57 CEST

William Uther <will+@cs.cmu.edu> writes:

> + /* Get entries info BEFORE we remove it from the entries file */
> + SVN_ERR (svn_io_check_path (path->data, &kind, pool));
> + SVN_ERR (svn_wc_text_modified_p (&modified, path, pool));
> +
> /* Mark the entry for deletion. */
> SVN_ERR (svn_wc_delete (path, notify_func, notify_baton, pool));
>
> - if (force)
> + if ((kind == svn_node_file)
> + && (force || !modified))
> {
> /* Remove the file. */
> apr_err = apr_file_remove (path->data, pool);

While this probably works, I don't like the inconsistency in the
behaviour of 'svn rm'. After I do 'svn rm' on a file I don't know
whether the file has been removed from the filesyatem or not, 'svn st'
will show 'D' but the file may still exist. Also if I do 'svn rm on a
directory, files within the directory will still exist on the
filesystem even if they are not modified.

Here's how I would like 'svn rm' to work: after 'svn rm' the files are
always removed. However 'svn rm' first checks for modifications and if
there are any the command fails. When 'svn rm' fails either the
--force flag can be used or 'svn revert' can be used first to remove
the modifications. This applies both to files and file properties,
and also to directories, in which case the children of the directory
are checked as well.

This scheme also solve the problem that after an 'svn rm' on a
modified file, which at present is allowed, there is no simple way to
undo the deletion and retain the modification. I think it would be
better for the user to either choose to revert the modification before
the 'svn rm' succeeds, or to have to --force the 'svn rm'.

I would really like 'svn rm directory' to remove the directory from
the filesystem, as well as removing any files it contains. Perhaps we
could move it into the .svn area?

-- 
Philip
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Apr 22 14:21:02 2002

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