Problem with svn_client_mkdir function
From: Rafael \ <fumasa_at_gmail.com>
Date: 2006-07-04 20:03:44 CEST
hi... anyone can help me with a development problem when I try to make
--
[]'s
Rafael 'fumasa' Giorgetti
the code:
[DllImport("libsvn_client-1.so.0")] static extern IntPtr
svn_client_mkdir( ref IntPtr commit_info, IntPtr apr_array_paths,
IntPtr ctx, IntPtr pool);
public void Mkdir(string[] paths, UpdateCallback callback) {
if (paths == null || callback == null)
throw new ArgumentNullException();
lock (sync) {
if (inProgress) throw new SubversionException("Another Subversion
operation is already in progress.");
inProgress = true;
}
updatecallback = callback;
IntPtr localpool = newpool(pool);
try {
// Put each item into an APR array.
IntPtr array = apr_array_make(localpool, 0, IntPtr.Size);
foreach (string path in paths) {
IntPtr item = apr_array_push(array);
Marshal.WriteIntPtr(item, apr_pstrdup(localpool, path));
}
IntPtr commit_info = IntPtr.Zero;
CheckError(svn_client_mkdir (
ref commit_info, array, ctx, localpool));
} finally {
commitmessage = null;
updatecallback = null;
apr_pool_destroy(localpool);
inProgress = false;
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Jul 4 20:05:10 2006
|
This is an archived mail posted to the Subversion Users mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.