SubWCRev program no more supporting VBA in V1.9x ?

165 views
Skip to first unread message

Matthias Schäfer

unread,
Mar 25, 2017, 3:41:48 AM3/25/17
to us...@tortoisesvn.tigris.org, Oliver Kopf, Bernd Jatz

Dear Sir and Madam,

 

we do have a problem regarding the COM device (SubWCRev.exe) in V1.9x.

In VBA we are creating/using SubWCRev.object and several methods are based on it, have a look at your documentation:

 

https://tortoisesvn.net/docs/release/TortoiseSVN_de/tsvn-subwcrev-com-interface.html

 

Unfortunately this works for 1.7.8 version, but not longer for 1.9x versions:

TortoiseSVN 1.7.11, Build 23600 - 64 Bit , 2012/12/12 19:08:52

Subversion 1.7.8,

apr 1.4.6

apr-utils 1.3.12

neon 0.29.6

OpenSSL 1.0.1c 10 May 2012

zlib 1.2.7

 

The question is, have you changed the SubWCRev.exe including the support of VBA SubWCRev.object? The examples website is showing only C# commands, too.

In earlier days there was an example of VBA based code and program. Could it be possible that VBA is no longer supported in 1.9x SubWCRev.exe?

Is VBA code changed? The documentation has no info regarding VBA code.

 

We´ve found the solution/workaround of replace the 1.9x SubWCRev.exe with the 1.7.8 version. But the problem is we need to use new version!

 

Have a look to the code crashing the SubWCRev.exe:

 

Internal:

http://jira.kopfweb.de:8080/secure/EditIssue!default.jspa?id=17561

 

Mit freundlichen Grüßen / Best regards

 

Matthias Schäfer

 

KOPF GmbH / Kapbachstr. 6 / 76829 Landau / Germany

Tel.: +49 6341 91767-33 / Fax : +49 6341 91767-50

Email: Matthias...@kopfweb.de

 

Geschäftsführer: Oliver Kopf - HRB Landau Nr. 3090 - Amtsgericht Landau

 

Stefan Küng

unread,
Mar 25, 2017, 4:01:42 AM3/25/17
to us...@tortoisesvn.tigris.org, Oliver Kopf, Bernd Jatz, Matthias...@kopfweb.de
On 22.03.2017 12:08, Matthias Schäfer wrote:
> we do have a problem regarding the COM device (SubWCRev.exe) in V1.9x.
>
> In VBA we are creating/using |SubWCRev.object ||and several methods are
> based on it, have a look at your documentation:|
>
> https://tortoisesvn.net/docs/release/TortoiseSVN_de/tsvn-subwcrev-com-interface.html
>
> Unfortunately this works for 1.7.8 version, but not longer for 1.9x
> versions:
[snip]

> The question is, have you changed the SubWCRev.exe including the support
> of VBA |SubWCRev.object? The examples website is showing only C#
> commands, too.|
>
> |In earlier days there was an example of VBA based code and program.
> Could it be possible that VBA is no longer supported in 1.9x SubWCRev.exe?|

VBA is still supported, as is any other language capable of using COM
objects.


> |Is VBA code changed? The documentation has no info regarding VBA code.|

Nothing has changed regarding VBA.

> |Have a look to the code crashing the |SubWCRev.exe:

the code screenshot doesn't show the whole script. Also I don't know
what 'IsProp' and 'UpdateProp' do - SubWCRev doesn't provide those.

What I can see is that you don't check the return value of
'oSvn.GetWCInfo' - if that returns S_FALSE, then there was an error
while fetching the svn status and all subsequent calls to oSvn will
return false data.

Also: you mentioned that it doesn't work anymore. But what exactly
doesn't work anymore? Which part of your script? What happens and what
do you expect to happen instead?
What happens if you run
$ svn st path
where 'path' is the string from ActiveWorkbook.FullName ?

> Internal:
>
> http://jira.kopfweb.de:8080/secure/EditIssue!default.jspa?id=17561

that link seems to be 'internal' as you mentioned. Not really useful to
me here.


Stefan

--
___
oo // \\ "De Chelonian Mobile"
(_,\/ \_/ \ TortoiseSVN
\ \_/_\_/> The coolest interface to (Sub)version control
/_/ \_\ http://tortoisesvn.net

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3222906

To unsubscribe from this discussion, e-mail: [users-un...@tortoisesvn.tigris.org].

Matthias Schäfer

unread,
Mar 31, 2017, 8:19:27 PM3/31/17
to Stefan Kueng, us...@tortoisesvn.tigris.org, Oliver Kopf, Bernd Jatz

Dear Mr. Kueng,

 

thanks for your quick reply. I have further information for you:

 

The Script is perfectly working with 1.7x version. Updated to 1.9.x SubWCRevCOM.exe causes the “error”:

·         Excel freezing

·         SubWCRevCOM.exe consuming 12 to 13 % CPU Power constantly

·         SubWCRevCOM.exe memory grows and grows … up to 1.3 Gigabytes (then I stopped the process, otherwise it would grow further and bigger).

I made an error handling for the complete script, so it is ensured that the VBA Code is not causing the problem (Please remember that its working fine for years now with V1.7x).

Because there is no documentation for VBA (except some snippets from internet and sourcecode etc.) I was not able to find out how to check out the result out of “oSvn.GetWCInfo ActiveWorkbook.FullName, 1, 1”. Do you have an idea how it has to look like in VBA?

 

There are two instances to control the errors:

 

·         “On Error GoTo NoSVN” (to the end of script) --> for the whole script (if there is any error the whole script is stopped!)

·         “If oSvn.IsSvnItem = True Then” --> The second instance, that checks if the file is in SVN-control. (If the data is no SVN-Item the script stops, too)

o   Even if the file has no SVN-Control the SubWCRecCom.exe is opened and seems to struggle. That must have something to do with this code:

 

I reckon, that when the object is created in VBA with this command, the SubWCRec.exe is started. Then there is an not identified error, but the SubWCRev still runs with memory overflow without being stopped. Excel is working after killing the process SubWCRev manually.

 

Something must be changed, because if I replace the SubWCRevCOM.exe to Version 1.7x it is working great. Rest of files in this case are still on 1.9.5.

 

Mit freundlichen Grüßen / Best regards

 

Matthias Schäfer

 

KOPF GmbH / Kapbachstr. 6 / 76829 Landau / Germany

Tel.: +49 6341 91767-33 / Fax : +49 6341 91767-50

Email: Matthias...@kopfweb.de

 

Geschäftsführer: Oliver Kopf - HRB Landau Nr. 3090 - Amtsgericht Landau

 

-----Ursprüngliche Nachricht-----
Von: Stefan Kueng [mailto:torto...@gmail.com]
Gesendet: Samstag, 25. März 2017 09:02
An: users
Cc: Oliver Kopf; Bernd Jatz; Matthias Schäfer
Betreff: Re: SubWCRev program no more supporting VBA in V1.9x ?

Stefan Küng

unread,
Mar 31, 2017, 9:14:07 PM3/31/17
to Matthias Schäfer, us...@tortoisesvn.tigris.org, Oliver Kopf, Bernd Jatz
On 30.03.2017 12:50, Matthias Schäfer wrote:
> Dear Mr. Kueng,
>
>
>
> thanks for your quick reply. I have further information for you:
>
>
>
> The Script is perfectly working with 1.7x version. Updated to 1.9.x
> SubWCRevCOM.exe causes the “error”:
>
> · Excel freezing
>
> · SubWCRevCOM.exe consuming 12 to 13 % CPU Power constantly
>
> · SubWCRevCOM.exe memory grows and grows … up to 1.3 Gigabytes
> (then I stopped the process, otherwise it would grow further and bigger).
>
> I made an error handling for the complete script, so it is ensured that
> the VBA Code is not causing the problem (Please remember that its
> working fine for years now with V1.7x).
>
> Because there is no documentation for VBA (except some snippets from
> internet and sourcecode etc.) I was not able to find out how to check
> out the result out of “oSvn.GetWCInfo ActiveWorkbook.FullName, 1, 1”. Do
> you have an idea how it has to look like in VBA?
>
>
>
> There are two instances to control the errors:
>
>
>
> · “On Error GoTo NoSVN” (to the end of script) --> for the whole
> script (if there is any error the whole script is stopped!)
>
> · “If oSvn.IsSvnItem = True Then” --> The second instance, that
> checks if the file is in SVN-control. (If the data is no SVN-Item the
> script stops, too)
>
> o Even if the file has no SVN-Control the SubWCRecCom.exe is opened
> and seems to struggle. That must have something to do with this code:
>
>
>
> I reckon, that when the object is created in VBA with this command, the
> SubWCRec.exe is started. Then there is an not identified error, but the
> SubWCRev still runs with memory overflow without being stopped. Excel is
> working after killing the process SubWCRev manually.
>
>
>
> Something must be changed, because if I replace the SubWCRevCOM.exe to
> Version 1.7x it is working great. Rest of files in this case are still
> on 1.9.5.

If you replace SubWCRevCOM with an older version and it works without
having you to check out a new working copy, then of course the new
SubWCRevCOM won't work: the working copy formats are not compatible.
You have to run a WC-Upgrade on the working copy first:
with TortoiseSVN, right-click on the working copy root folder and then
select "Upgrade WC".

Stefan

--
___
oo // \\ "De Chelonian Mobile"
(_,\/ \_/ \ TortoiseSVN
\ \_/_\_/> The coolest interface to (Sub)version control
/_/ \_\ http://tortoisesvn.net

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3225155

Matthias Schäfer

unread,
Apr 4, 2017, 6:04:49 AM4/4/17
to Stefan Kueng, us...@tortoisesvn.tigris.org, Oliver Kopf, Bernd Jatz

Dear Mr. Kueng,

 

the bug is only for SVN upgraded version 1.9x!

 

the scenarios are:

Updated SVN 1.9x and  SubWCRevCOM 1.7.11 = Working

SVN 1.7.11 and SubWCRevCOM 1.7.11 = Working

SVN 1.9x and SubWCRevCOM 1.9x 0 Not Working

 

So what can we do now? See facts below

-          Documentation is gone since 1.9x for VBA.

-          Once SubWCRecCOM is opened in updated package “1.9x” it is growing bigger and bigger and “freezes”

-          If SubWCRecCOM 1.9x is replaced with 1.7.11 it is working again!

-          How can I check this error furher? (Tools, Dumps?)

 

Mit freundlichen Grüßen / Best regards

 

Matthias Schäfer

 

KOPF GmbH / Kapbachstr. 6 / 76829 Landau / Germany

Tel.: +49 6341 91767-33 / Fax : +49 6341 91767-50

Email: Matthias...@kopfweb.de

 

Geschäftsführer: Oliver Kopf - HRB Landau Nr. 3090 - Amtsgericht Landau

 

 

-----Ursprüngliche Nachricht-----
Von: Stefan Kueng [mailto:torto...@gmail.com]

Gesendet: Donnerstag, 30. März 2017 19:37
An: Matthias Schäfer; users


Cc: Oliver Kopf; Bernd Jatz

Betreff: Re: AW: SubWCRev program no more supporting VBA in V1.9x ?

Stefan Küng

unread,
Apr 4, 2017, 2:10:46 PM4/4/17
to Matthias Schäfer, us...@tortoisesvn.tigris.org, Oliver Kopf, Bernd Jatz
On 04.04.2017 12:03, Matthias Schäfer wrote:
> Dear Mr. Kueng,
>
>
>
> the bug is only for SVN upgraded version 1.9x!
>
>
>
> the scenarios are:
>
> Updated SVN 1.9x and SubWCRevCOM 1.7.11 = Working
>
> SVN 1.7.11 and SubWCRevCOM 1.7.11 = Working
>
> _SVN 1.9x and SubWCRevCOM 1.9x 0 Not Working_
>
>
>
> So what can we do now? See facts below
>
> - Documentation is gone since 1.9x for VBA.

Since we can't document every scripting language there is, there's no
need for a specific VBA documentation - it's COM after all.

> - Once SubWCRecCOM is opened in _updated_ package “1.9x” it is
> growing bigger and bigger and “freezes”
>
> - If SubWCRecCOM 1.9x is replaced with 1.7.11 it is working again!
>
> - How can I check this error furher? (Tools, Dumps?)

What's the output of SubWCRev.exe for the path you use with SubWCRevCOM?
What's the output of 'svn.exe st -v path' for that path?

Stefan

--
___
oo // \\ "De Chelonian Mobile"
(_,\/ \_/ \ TortoiseSVN
\ \_/_\_/> The coolest interface to (Sub)version control
/_/ \_\ http://tortoisesvn.net

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3226376

Stefan Küng

unread,
Apr 4, 2017, 2:39:19 PM4/4/17
to Matthias Schäfer, us...@tortoisesvn.tigris.org, Oliver Kopf, Bernd Jatz
On Tue, Apr 4, 2017 at 8:10 PM, Stefan Kueng <torto...@gmail.com> wrote:


On 04.04.2017 12:03, Matthias Schäfer wrote:
Dear Mr. Kueng,



the bug is only for SVN upgraded version 1.9x!



the scenarios are:

Updated SVN 1.9x and  SubWCRevCOM 1.7.11 = Working

SVN 1.7.11 and SubWCRevCOM 1.7.11 = Working

_SVN 1.9x and SubWCRevCOM 1.9x 0 Not Working_



So what can we do now? See facts below

-          Documentation is gone since 1.9x for VBA.

Since we can't document every scripting language there is, there's no need for a specific VBA documentation - it's COM after all.

-          Once SubWCRecCOM is opened in _updated_ package “1.9x” it is
growing bigger and bigger and “freezes”

-          If SubWCRecCOM 1.9x is replaced with 1.7.11 it is working again!

-          How can I check this error furher? (Tools, Dumps?)

What's the output of SubWCRev.exe for the path you use with SubWCRevCOM?
What's the output of 'svn.exe st -v path' for that path?


I've just created a word 2016 document and added a macro that uses SubWCRevCOM without any problems: I can read all properties with no issues.

Stefan


--
       ___
  oo  // \\      "De Chelonian Mobile"
 (_,\/ \_/ \     TortoiseSVN
   \ \_/_\_/>    The coolest Interface to (Sub)Version Control
   /_/   \_\     http://tortoisesvn.net

Matthias Schäfer

unread,
May 30, 2017, 7:32:02 AM5/30/17
to Stefan Küng, us...@tortoisesvn.tigris.org, Oliver Kopf, Bernd Jatz

Dear Mr. Kueng,

 

after some researches i can definitely say, that the method .GetWCInfo (Svn.GetWCInfo ActiveWorkbook.FullName, 1, 1) is causing the error and only in conjunction with the VBA-Sub Private Sub Workbook_WindowActivate(ByVal Wn As Window) and only in the new version.

 

The reason could be: while activating the template in excel this error occurs, because there is not an information from the excel file, which has no file location until it is saved.

(But remembering its working with version 1.7X). The method  should have an exit, if there is no info. How is it possible to get an result from the method?

I tried MsgBox, Variable and Debug.Print. Nothing is working.

 

He is the shortest possible sub I made for testing:

 

·         The rrror occurs only in the new version

o   On “Error GoTo” is not Working in this case

o   “If oSvn.IsSvnItem = True Then Else” etc. is not working

 

The documentation says:

“Naturally you must call this before you can access the information using the remaining methods.”

https://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-subwcrev-com-interface.html

 

So is this method really necessary? I made some tests without this method, I think it´s working without it?!

If you want to test, please try this in Excel (Word same problems, but not examined in closer detail):

 

Private Sub Workbook_WindowActivate(ByVal Wn As Window)

On Error GoTo Err

 

Dim oSvn As Object

Set oSvn = CreateObject("SubWCRev.object.1")

oSvn.GetWCInfo ActiveWorkbook.FullName, 1, 1

 

If oSvn.IsSvnItem = True Then

    MsgBox (oSvn.Revision)

Else

    MsgBox ("Kein Svn")

End If

 

Err:

Set oSvn = Nothing

End Sub

 

Mit freundlichen Grüßen / Best regards

 

Matthias Schäfer

 

KOPF GmbH / Kapbachstr. 6 / 76829 Landau / Germany

Tel.: +49 6341 91767-33 / Fax : +49 6341 91767-50

Email: Matthias...@kopfweb.de

 

Geschäftsführer: Oliver Kopf - HRB Landau Nr. 3090 - Amtsgericht Landau

 

Von: Stefan Küng [mailto:torto...@gmail.com]

Gesendet: Dienstag, 4. April 2017 20:38
An: Matthias Schäfer; users
Cc: Oliver Kopf; Bernd Jatz

Stefan Küng

unread,
May 30, 2017, 3:41:06 PM5/30/17
to Matthias Schäfer, us...@tortoisesvn.tigris.org, Oliver Kopf, Bernd Jatz
On 30.05.2017 13:32, Matthias Schäfer wrote:
> Dear Mr. Kueng,
>
> after some researches i can definitely say, that the method _.GetWCInfo_
> (_Svn.GetWCInfo ActiveWorkbook.FullName, 1, 1) _is causing the error and
> only in conjunction with the VBA-Sub _Private Sub
> Workbook_WindowActivate(ByVal Wn As Window)_ and only in the new version.
>
> The reason could be: while activating the template in excel this error
> occurs, because there is not an information from the excel file, which
> has no file location until it is saved.
>
> (But remembering its working with version 1.7X). The method should have
> an exit, if there is no info. How is it possible to get an result from
> the method?
>
> I tried MsgBox, Variable and Debug.Print. Nothing is working.
>
> He is the shortest possible sub I made for testing:__
>
> __
>
> __
>
> ·The rrror occurs only in the new version
>
> oOn “Error GoTo” is not Working in this case
>
> o“If oSvn.IsSvnItem = True Then Else” etc. is not working
>
> The documentation says:
>
> “Naturally you must call this before you can access the information
> using the remaining methods.”
>
> https://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-subwcrev-com-interface.html
>
> So is this method really necessary? I made some tests without this
> method, I think it´s working without it?!

If you don't call this method, the other methods will return only
default values.

> If you want to test, please try this in _Excel _(Word same problems, but
> not examined in closer detail):
>
> Private Sub Workbook_WindowActivate(ByVal Wn As Window)
>
> On Error GoTo Err
>
> Dim oSvn As Object
>
> Set oSvn = CreateObject("SubWCRev.object.1")
>
> oSvn.GetWCInfo ActiveWorkbook.FullName, 1, 1

I could reproduce the problem: you mentioned that "has no file location
until it's saved". Which means you pass an invalid (empty) path to
GetWCInfo.
I've fixed the problem in r27849, but until the next release, you should
check for valid paths yourself:

Set svnPath = ActiveWorkbook.FullName;
Set fso = CreateObject("Scripting.FileSystemObject")
If (fso.FileExists(svnPath)) Then
oSvn.GetWCInfo svnPath, 1, 1
End If

Stefan

--
___
oo // \\ "De Chelonian Mobile"
(_,\/ \_/ \ TortoiseSVN
\ \_/_\_/> The coolest interface to (Sub)version control
/_/ \_\ http://tortoisesvn.net

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3241188

Matthias Schäfer

unread,
Jun 2, 2017, 8:24:08 PM6/2/17
to Stefan Kueng, us...@tortoisesvn.tigris.org, Oliver Kopf, Bernd Jatz
Dear Mr. Kueng,

"I've fixed the problem in r27849 [...]"
that´s good news. Is there a time plan (approximately) for the release of r27849?

Mit freundlichen Grüßen / Best regards

Matthias Schäfer

KOPF GmbH / Kapbachstr. 6 / 76829 Landau / Germany
Tel.: +49 6341 91767-33 / Fax : +49 6341 91767-50
Email: Matthias...@kopfweb.de

Geschäftsführer: Oliver Kopf - HRB Landau Nr. 3090 - Amtsgericht Landau

-----Ursprüngliche Nachricht-----
Von: Stefan Kueng [mailto:torto...@gmail.com]

Gesendet: Dienstag, 30. Mai 2017 21:41


An: Matthias Schäfer; users
Cc: Oliver Kopf; Bernd Jatz

Betreff: Re: AW: AW: AW: SubWCRev program no more supporting VBA in V1.9x ?

Stefan

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3241440

Stefan Küng

unread,
Jun 2, 2017, 8:49:08 PM6/2/17
to Matthias Schäfer, us...@tortoisesvn.tigris.org, Oliver Kopf, Bernd Jatz
On 31.05.2017 10:07, Matthias Schäfer wrote:
> Dear Mr. Kueng,
>
> "I've fixed the problem in r27849 [...]"
> that´s good news. Is there a time plan (approximately) for the release of r27849?

Sorry, no.
There is no date set for the next release, but definitely this year :)
you can use a nightly build or better yet, use the workaround I showed
you in your script.
Nightly builds are currently not working - waiting for the new signing
certificate. But they should be working again in a few days.

Stefan

--
___
oo // \\ "De Chelonian Mobile"
(_,\/ \_/ \ TortoiseSVN
\ \_/_\_/> The coolest interface to (Sub)version control
/_/ \_\ http://tortoisesvn.net

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3241578

r...@rehoffman.com

unread,
Nov 30, 2017, 11:37:27 AM11/30/17
to TortoiseSVN
I was having exactly the same problem in Word and the fix works for me as well.

Thank you both for persisting with this!
Reply all
Reply to author
Forward
0 new messages