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

[PATCH] Re: svn ci drops files

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2002-10-31 15:42:03 CET

I guess if people start using svn:externals this might be a common
error. What do people think of this approach? It's simple, if a
little crude.

* subversion/libsvn_client/commit.c (svn_client_commit): Ensure all
  targets are from the same working copy.

Index: subversion/libsvn_client/commit.c
===================================================================
--- subversion/libsvn_client/commit.c (revision 3581)
+++ subversion/libsvn_client/commit.c (working copy)
@@ -755,6 +755,18 @@
   SVN_ERR (svn_wc_adm_open (&base_dir_access, NULL, base_dir, TRUE, TRUE,
                             pool));
 
+ for (i = 0; i < targets->nelts; ++i)
+ {
+ svn_wc_adm_access_t *adm_access;
+ const char *target;
+ SVN_ERR (svn_path_get_absolute (&target,
+ ((const char **)targets->elts)[i],
+ pool));
+ SVN_ERR_W (svn_wc_adm_probe_retrieve (&adm_access, base_dir_access,
+ target, pool),
+ "Are all the targets from the same working copy?");
+ }
+
   /* Crawl the working copy for commit items. */
   if ((cmt_err = svn_client__harvest_committables (&committables,
                                                    base_dir_access,

So I get

$ svn ci wc wc/libs/wc
../svn/subversion/libsvn_client/commit.c:767: (apr_err=155005, src_err=0)
svn: Working copy not locked
svn: Are all the targets from the same working copy?
../svn/subversion/libsvn_wc/lock.c:407: (apr_err=155005, src_err=0)
svn: directory not locked (/home/pm/sw/subversion/obj/wc/libs/wc)

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Oct 31 15:42:50 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.