Commit by Command and Auto-Close Dialog

25 views
Skip to first unread message

Dario Ammann

unread,
Nov 23, 2022, 11:29:35 AM11/23/22
to TortoiseSVN
Dear colleagues

First of all I have to tell you, that tortoisesvn is really a great tool.

I want to use SVN from Matlab in a loop, in which I want to update files and check them in in SVN automatically.

Therefore I use the following commands:
cmd='"C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe" /command:commit /closeonend:1 /path:"C:\ConnectSB\05_Script\01_Scripts\_Archiv\isnestedfield.m" /logmsg:"DAAM: MatlabTestMessage"'
dos(cmd);

Unfortunately the dialog window does not close but stays open and I have to do manually OK, which is not reasonable for usage in an automatic loop.

Then I read I can change that in the settings.
I changed to autoclose to "Auto-close if no erros" (see attachment).
But still the dialog window stays open.

What do I need to do, that I have the auto-close?
Is there a way to have the auto-close only at the script calls but not at manual SVN handling?


Kind regards & Thank you

Dario Ammann


Dialog.pngSettings.png

Daniel Sahlberg

unread,
Nov 23, 2022, 4:58:48 PM11/23/22
to TortoiseSVN
Sorry for not checking the code and half-guessing, but I think the auto-close is related to the progress dialog at the end of commit (compare with the description of /closeonend in the manual section D. Automating TortoiseSVN [1]). The manual even state: "Remember that TortoiseSVN is a GUI client, and this automation guide shows you how to make the TortoiseSVN dialogs appear to collect user input. If you want to write a script which requires no input, you should use the official Subversion command line client instead."

If you use the command line client instead (distributed as an optional part of the TortoiseSVN installation package) you can call

"C:\Program Files\TortoiseSVN\bin\svn.exe" commit -m 'DAAM: MatlabTestMessage'

instead. For updates, use the update command. You may still encounter that the command line client ask for input, for example if you get a conflict between local changes in your WC and changes from somewhere else.

Kind regards,
Daniel


Dario Ammann

unread,
Nov 24, 2022, 5:34:41 AM11/24/22
to TortoiseSVN
Hello Daniel

Thank you for your reply.

Unfortunately it did not work or maybe I'm doing something wrong.

According to the syntax (svn commit -m "LogMessage" [-depth ARG] [--no-unlock] PATH), I created the following command call:
cmd = '"C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe" commit -m "DAAM: MatlabTestMessage" "C:\ConnectSB\05_Script\01_Scripts\_Archive\isnestedfield.m"'

When I execute, I get this dialog, even if I enter the command directly in the DOS command prompt:

Popup.png

Does it work on your SVN environment?

1) "C:\Program Files\TortoiseSVN\bin\svn.exe" doesn't exist in my folder, does "C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe" also work?
2) Is it correct, if I enter this command in DOS or where do I have to do it?
3) May I add closeonend:1?

Kind regards

Dario

Daniel Sahlberg

unread,
Nov 24, 2022, 5:55:00 AM11/24/22
to TortoiseSVN
torsdag 24 november 2022 kl. 11:34:41 UTC+1 skrev Dario Ammann:
1) "C:\Program Files\TortoiseSVN\bin\svn.exe" doesn't exist in my folder, does "C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe" also work?

svn.exe is the command line client. You must manually select this when you install TortoiseSVN (I don't remember offhand if you need to select to do an "advanced" install or something like this, but look for "command line tools" when you install).

TortoiseProc.exe is the GUI client, you must not call this.
 
2) Is it correct, if I enter this command in DOS or where do I have to do it?

You can test this in a command prompt if you want to check it before adding to your scripts.
 
3) May I add closeonend:1?

No, this is a parameter related to TortoiseProc.exe.

Try svn help commit for information about the options in the command line client.

Kind regards,
Daniel

Dario Ammann

unread,
Nov 24, 2022, 11:13:08 AM11/24/22
to TortoiseSVN
Hello Daniel

Thank you for your great support!

Now it works perfectly.


Kind regards

Dario
Reply all
Reply to author
Forward
0 new messages