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

PATCH: add -R ignores "directory exists" error

From: solo turn <soloturn99_at_yahoo.com>
Date: 2002-08-18 21:01:54 CEST

currently svn add -R stops on the first directory which exists, and
you have to fiddle out all the files you added by your own. this
patch allows to run svn -R in the wc-root, and add all new files.

Index: ./subversion/libsvn_client/add.c
===================================================================
--- ./subversion/libsvn_client/add.c
+++ ./subversion/libsvn_client/add.c 2002-08-18 20:40:44.593890000
+0200
@@ -51,10 +51,19 @@
   svn_wc_adm_access_t *dir_access;
 
   /* Add this directory to revision control. */
- SVN_ERR (svn_wc_add (dirname, adm_access,
+ err = svn_wc_add (dirname, adm_access,
                        NULL, SVN_INVALID_REVNUM,
- notify_added, notify_baton, pool));
+ notify_added, notify_baton, pool);
 
+ if (err) {
+ if (!(err->apr_err == SVN_ERR_ENTRY_EXISTS)) {
+ /* ignore "exists" errors, but nothing else */
+ return err;
+ }
+ /* reset err */
+ err = SVN_NO_ERROR;
+ }
+
   SVN_ERR (svn_wc_adm_retrieve (&dir_access, adm_access, dirname,
pool));
 
   /* Create a subpool for iterative memory control. */

__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Aug 18 21:02:27 2002

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.