简体   繁体   English

来自Python的TortoiseSVN GUI

[英]TortoiseSVN GUI from python

I need to launch tortoiseSVN GUI (for example Check For Modifications window) from python. 我需要从python启动tortoiseSVN GUI(例如,检查修改窗口)。 Can anyone help me with that? 有人可以帮我吗?

Please, read this: http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-automation.html 请阅读以下内容: http : //tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-automation.html

Check for modifications will be look like: 检查修改将如下所示:

tortoiseproc /command:repostatus /path:c:\path\to\working\copy

You need to invoke Tortoise from command line, on Python you can try doing something like this: 您需要从命令行调用Tortoise,在Python上,您可以尝试执行以下操作:

import os
os.system('"C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe" /command:your_command your_args /path:your_path')

Where you will replace command and path like you need. 您将在需要时替换命令和路径的位置。 The path for TortoiseProc.exe can be read from registry, if you are running on windows is HKEY_LOCAL_MACHINE\\SOFTWARE\\TortoiseSVN and then read the ProcPath value. 如果您在Windows上运行,则可以从注册表中读取TortoiseProc.exe的路径,该路径为HKEY_LOCAL_MACHINE \\ SOFTWARE \\ TortoiseSVN,然后读取ProcPath值。

I can not test this right now, but i think this is what you want to know. 我现在无法测试,但是我想这就是您想知道的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM