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

Re: svn commit: rev 5790 - trunk/subversion/libsvn_wc

From: Luke Blanshard <luke_at_blanshard.us>
Date: 2003-05-03 16:02:54 CEST

Is there ever a time when you want remove_file_if_present to fail on
Windows because the permissions are wrong? In other words, why not
simply rewrite remove_file_if_present to set the file read-write before
removing it, instead of repeating the same logic everywhere? Better
yet, only do this extra step on systems that actually require it -- if
you can get APR to encapsulate this.

cmpilato@tigris.org wrote:

>Author: cmpilato
>Date: Sat May 3 00:49:23 2003
>New Revision: 5790
>
>Modified:
> trunk/subversion/libsvn_wc/adm_ops.c
>Log:
>* subversion/libsvn_wc/adm_ops.c
> (svn_wc_remove_from_revision_control): Fixup for revision 5787.
> If the file you're setting attributes on isn't there, don't sweat it.
> Should have taken the queue from all those remove_file_***if_present***
> calls...sheesh...
>
>Modified: trunk/subversion/libsvn_wc/adm_ops.c
>==============================================================================
>--- trunk/subversion/libsvn_wc/adm_ops.c (original)
>+++ trunk/subversion/libsvn_wc/adm_ops.c Sat May 3 00:49:23 2003
>@@ -1648,25 +1648,25 @@
>
> /* Text base. */
> svn_thang = svn_wc__text_base_path (full_path, 0, subpool);
>- SVN_ERR (svn_io_set_file_read_write (svn_thang, FALSE, subpool));
>+ SVN_ERR (svn_io_set_file_read_write (svn_thang, TRUE, subpool));
> SVN_ERR (remove_file_if_present (svn_thang, subpool));
>
> /* Working prop file. */
> SVN_ERR (svn_wc__prop_path (&svn_thang, full_path, adm_access, FALSE,
> subpool));
>- SVN_ERR (svn_io_set_file_read_write (svn_thang, FALSE, subpool));
>+ SVN_ERR (svn_io_set_file_read_write (svn_thang, TRUE, subpool));
> SVN_ERR (remove_file_if_present (svn_thang, subpool));
>
> /* Prop base file. */
> SVN_ERR (svn_wc__prop_base_path (&svn_thang, full_path, adm_access,
> FALSE, subpool));
>- SVN_ERR (svn_io_set_file_read_write (svn_thang, FALSE, subpool));
>+ SVN_ERR (svn_io_set_file_read_write (svn_thang, TRUE, subpool));
> SVN_ERR (remove_file_if_present (svn_thang, subpool));
>
> /* wc-prop file. */
> SVN_ERR (svn_wc__wcprop_path (&svn_thang, full_path, adm_access, FALSE,
> subpool));
>- SVN_ERR (svn_io_set_file_read_write (svn_thang, FALSE, subpool));
>+ SVN_ERR (svn_io_set_file_read_write (svn_thang, TRUE, subpool));
> SVN_ERR (remove_file_if_present (svn_thang, subpool));
> }
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: svn-unsubscribe@subversion.tigris.org
>For additional commands, e-mail: svn-help@subversion.tigris.org
>
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat May 3 16:03:51 2003

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.