On Oct 16, 9:48 pm, Stefan Küng <tortoise..._at_gmail.com> wrote:
> On 13.10.2009 09:05, alexia wrote:
>
>
>
>
>
> > On Oct 11, 9:17 am, Stefan Küng<tortoise..._at_gmail.com> wrote:
> >> On 11.10.2009 02:59, alexia wrote:
>
> >>> Hi all,
>
> >>> I want to automateTortoiseSVN. Is there ant command line which I can
> >>> tell if afileis in repository (versioned).
> >>> The reason for that is that I want to display the user different menu
> >>> items if thefileisversionedand if it is not.
>
> >> Starting a new process every time you show a context menu? That's not a
> >> good idea because it takes way too long - a context menu has to show up
> >> immediately.
>
> >> You should consider using the svn libraries directly and use the
> >> corresponding APIs to find out whether afileisversionedor not.
>
> >> You *could* use SubWCRev (either the command line or the COM object) to
> >> find out if afileisversioned. I would suggest using the COM object
> >> for this.
> >> Example in javascript:
>
> >> filesystem = new ActiveXObject("Scripting.FileSystemObject");
> >> subwcrevObject = new ActiveXObject("SubWCRev.object");
> >> subwcrevObject.GetWCInfo(filesystem.GetAbsolutePathName("file.txt"), 1, 1);
>
> >> if (subwcrevObject.IsSvnItem)
> >> WScript.Echo("fileisversioned);
> >> else
> >> WScript.Echo("fileis notversioned);
>
> >>http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-subwcrev-com-...
>
> >> Stefan
>
> >> --
> >> ___
> >> oo // \\ "De Chelonian Mobile"
> >> (_,\/ \_/ \ TortoiseSVN
> >> \ \_/_\_/> The coolest Interface to (Sub)Version Control
> >> /_/ \_\ http://tortoisesvn.net
>
> >> ------------------------------------------------------http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=757&dsMessa...
>
> >> To unsubscribe from this discussion, e-mail: [dev-unsubscr..._at_tortoisesvn.tigris.org].
>
> > Thanks.
>
> > Ported it to C#. In case anyone interested.
>
> > using LibSubWCRev;
> > SubWCRev sub = new SubWCRev();
> > sub.GetWCInfo("C:\\PathToMyFile\\MyFile.cc", true, true);
> > if (sub.IsSvnItem == true)
> > {
> > MessageBox.Show("versioned");
> > }
> > else
> > {
> > MessageBox.Show("notversioned");
> > }
>
> > As for the rest of theTortoiseSVNcommands ("commit", "revert"...) I
> > will have to useTortoiseSVNsince there is no COM API in SubWCRev.
> > Or am I missing it?
>
> No, there is no COM interface for TortoiseProc, sorry.
>
> Stefan
>
> --
> ___
> oo // \\ "De Chelonian Mobile"
> (_,\/ \_/ \ TortoiseSVN
> \ \_/_\_/> The coolest Interface to (Sub)Version Control
> /_/ \_\ http://tortoisesvn.net
>
> ------------------------------------------------------http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=757&dsMessa...
>
> To unsubscribe from this discussion, e-mail: [dev-unsubscr..._at_tortoisesvn.tigris.org].- Hide quoted text -
>
> - Show quoted text -
Hello Stefan,
I am using SubWCRev COM to get the status of the file if it is in the
repository. I get the right status. However, there is a small problem.
I saw that when I create object of type SubWCRevCOM.exe it creates new
process (I see it in the TASK manager).
When my app starts, I create the the object which creates a new
process. The life time of my projct is has the life time of my app.
When ever I call GetWCInfo() the amount of menory increases. After ~7
times the amount of memory is ~130MB.
Is there any reason why when I create new object a process starts and
why the amount of memory is getting larger?
I added small C# code
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using LibSubWCRev;
namespace SVNtest
{
class Program
{
static void Main(string[] args)
{
SubWCRev s = new SubWCRev();
for (int i = 0; i < 100; i++)
{
s.GetWCInfo(@"C:\Projects\Eci\SLIP\Trunk
\DataTransportApplication\SlipApp\SlipApp\Program.cs", true, true);
}
}
}
}
Thank you for your help.
------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=757&dsMessageId=2413425
To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2009-11-01 15:03:38 CET