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

Re: Final year project

From: Ich Selbst <ichselbst_at_gmx.ch>
Date: 2002-10-23 17:33:26 CEST

----- Original Message -----
From: "Arild Fines" <arild.fines@broadpark.no>
Newsgroups: gmane.comp.version-control.subversion.devel
Sent: Tuesday, October 22, 2002 10:10 PM
Subject: FW: Final year project

> news wrote:
> > Hi.
> > Cool idea. I had the same but not the time to implement it :-(
> > I have studied the .NET framework a little bit.
> > My first idea was to go completely C# by using PInvoke to access the
> > SVN API.
>
> P/Invoke only works on dynamic libraries, while the SVN API on Win32
> is still just a set of static libraries. I don't know what the
> timeframe for changing it to DLL's are(anyone?), but I still think I
> would prefer to use MC++ for the low level interface to SVN. P/Invoke
> isn't all that elegant.
>
> > I think you can also learn/borrow some thing from the C++ bindings
> > which are used by the RapidSVN project.

Or just use a COM wrapper like this:
(example of the commit command)

   SVNCOM svn = new SVNCOM.SVN();
   SVNCOM._ISVNEvents_NotifyEventHandler notifyeventobj = new
SVNCOM._ISVNEvents_NotifyEventHandler(this.Notify);
   svn.Notify += notifyeventobj;
   SVNCOM._ISVNEvents_PromptEventHandler prompteventobj = new
SVNCOM._ISVNEvents_PromptEventHandler(this.Prompt);
   svn.Prompt += prompteventobj;
   try
   {
    Invoke(new CommitDelegate(SetMessage), new object [] {"start commit"});
    Debug.WriteLine(commitdir);
    svn.Commit(commitdir, this.message.Text,true);
    Invoke(new CommitDelegate(SetMessage), new object [] {"finished."});
    Invoke(new CommitDelegate(SetMessage), new object [] {"SVN_END"});
   }
   catch (ThreadAbortException)
   {
    Invoke(new CommitDelegate(SetMessage), new object [] {"Exception"});
   }
   catch (System.Exception ex)
   {
    System.Windows.Forms.MessageBox.Show(ex.Message,"Checkout");
    Invoke(new CommitDelegate(SetMessage), new object [] {"Exception"});
   }
   svn.Prompt -= prompteventobj;
   svn.Notify -= notifyeventobj;

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Oct 23 17:34:15 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.