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

[Patch] Set wc admin dir name in bindings [Was: Fix position of apr_initialize() in Python bindings]

From: Branko ─îibej <brane_at_xbc.nu>
Date: 2005-10-01 02:09:17 CEST

Max's patch gave me an idea for implementing the svn_wc_set_adm_dir hack
for all bindings libs. Can someone please review this and tell me if I'm
completely insane?

Index: svn_wc.i
===================================================================
--- svn_wc.i (revision 16381)
+++ svn_wc.i (working copy)
@@ -296,3 +296,30 @@
 %}
 
 %include svn_wc_h.swg
+
+%init %{
+#ifdef WIN32
+if (getenv ("SVN_ASP_DOT_NET_HACK"))
+{
+#if defined(SWIGPYTHON)
+ static const char set_adm_dir_err_prefix[] = "svn-py: ";
+#elif defined(SWIGPERL)
+ static const char set_adm_dir_err_prefix[] = "svn-pl: ";
+#elif defined(SWIGRUBY)
+ static const char set_adm_dir_err_prefix[] = "svn-rb: ";
+#else
+ static const char set_adm_dir_err_prefix[] = "svn-??: ";
+#endif
+
+ apr_pool_t *pool = svn_pool_create(NULL);
+ svn_error_t *const set_adm_dir_err = svn_wc_set_adm_dir("_svn", pool);
+ svn_pool_destroy(pool);
+ if (set_adm_dir_err)
+ {
+ svn_handle_error2(set_adm_dir_err, stderr, FALSE,
+ set_adm_dir_err_prefix);
+ exit(1);
+ }
+}
+#endif /* WIN32 */
+%}

-- Brane

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 1 02:11:28 2005

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.