You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by "Rafael \"fumasa\" Giorgetti" <fu...@gmail.com> on 2006/07/04 18:03:44 UTC

Problem with svn_client_mkdir function

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

Re: Problem with svn_client_mkdir function

Posted by "Rafael \"fumasa\" Giorgetti" <fu...@gmail.com>.
Can anyone help with that? tell how works the svn_client_mkdir
function... or something else?

On 7/4/06, Rafael fumasa Giorgetti <fu...@gmail.com> wrote:
> 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;
>         }
> }
>


-- 
[]'s

Rafael 'fumasa' Giorgetti

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org