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

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
a mkdir function?
I'm working in svn integration with monodevelop... I have make a mkdir
function... and that use in low level the svn_client_mkdir function in
libsvn_client... I guess I'm doing some wrong... but I don't have an
error returned or nothing... looks like ok... but the directory on
repository isn't created... the code is in C#... I think the problem
is in my array... but I don't know... any issue?

-- 
[]'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.