TortoiseSVN 命令 (命令行执行工具)

TortoiseSVN是一个GUI客户端,这个自动化指导为你展示了让TortoiseSVN对话框显示并收集客户输入,如果你希望编写不需要输入的脚本,你应该使用官方的Subversion命令行客户端。

TortoiseSVN的GUI程序叫做TortoiseProc.exe。所有的命令通过参数/command:xxxx指定,其中xxxx是必须的命令名。大多数此类命令至少需要一个路径参数,使用/path:"some\path"指定。在下面的命令表格中,命令引用的是/command:xxxx参数,余下的代表了/path:"some\path"参数。

因为一些命令需要一个目标路径的列表(例如提交一些特定的文件),/path参数可以接收多个路径,使用*分割。

TortoiseSVN 使用临时文件在 shell 扩展和主程序之间传递多个参数。从 TortoiseSVN 1.5.0 开始,废弃/notempfile参数,不再需要增加此参数。

The progress dialog which is used for commits, updates and many more commands usually stays open after the command has finished until the user presses theOK button. This can be changed by checking the corresponding option in the settings dialog. But using that setting will close the progress dialog, no matter if you start the command from your batch file or from the TortoiseSVN context menu.

To specify a different location of the configuration file, use the parameter /configdir:"path\to\config\directory". This will override the default path, including any registry setting.

如果想在进度对话框执行完毕后自动关闭,而又不必设置永久性的参数,可以传递/closeonend参数。

  • /closeonend:0 不自动关闭对话框

  • /closeonend:1 如果没发生错误则自动关闭对话框

  • /closeonend:2 如果没发生错误和冲突则自动关闭对话框

  • /closeonend:3如果没有错误、冲突和合并,会自动关闭

  • /closeonend:4如果没有错误、冲突和合并,会自动关闭

下面的列表列出了所有可以使用TortoiseProc.exe访问的命令,就像上面的描述,必须使用/command:xxxxxx的形式,在列表中,因为节省空间的关系省略了/command的前缀。

表 D.1. 有效命令及选项列表

命令 描述
:about 显示关于对话框。如果没有给命令也会显示。
:log 打开日志对话框,/path 指定了显示日志的文件或目录,另外还有三个选项可以设置: /startrev:xxx/endrev:xxx/strict
:checkout 打开检出对话框,/path指定了目标路径,而/url制定了检出的URL。
:import 打开导入对话框,/path 指定了数据导入路径。
:update 将工作副本的/path更新到HEAD,如果给定参数/rev,就会弹出一个对话框询问用户需要更新到哪个修订版本。为了防止指定修订版本号/rev:1234的对话框,需要选项/nonrecursive/ignoreexternals
:commit 打开提交对话框,/path 指定了目标路径或需要提交的文件列表,你也可以使用参数 /logmsg 给提交窗口传递预定义的日志信息,或者你不希望将日志传递给命令行,你也可以使用/logmsgfile:pathpath 指向了保存日志信息的文件。为了预先填入bug的ID(如果你设置了集成bug追踪属性),你可以使用/bugid:"the bug id here"完成这个任务。
:add /path的文件添加到版本控制 。
:revert 恢复工作副本的本地修改,/path说明恢复哪些条目。
:cleanup 清理中断和终止的操作,将工作副本的/path解锁。
:resolve /path指定文件的冲突标示为解决,如果给定/noquestion,解决不会向用户确认操作。
:repocreate /path创建一个版本库。
:switch 打开选项对话框。/path 指定目标目录。
:export /path的工作副本导出到另一个目录,如果/path指向另一个未版本控制目录,对话框会询问要导出到/path的URL。
:merge Opens the merge dialog. The /path specifies the target directory. For merging a revision range, the following options are available: /fromurl:URL/revrange:string. For merging two repository trees, the following options are available: /fromurl:URL/tourl:URL/fromrev:xxx and /torev:xxx. These pre-fill the relevant fields in the merge dialog.
:mergeall Opens the merge all dialog. The /path specifies the target directory.
:copy Brings up the branch/tag dialog. The /path is the working copy to branch/tag from. And the /url is the target URL. You can also specify the /logmsg switch to pass a predefined log message to the branch/tag dialog. Or, if you don't want to pass the log message on the command line, use /logmsgfile:path, where path points to a file containing the log message.
:settings 打开设置对话框。
:remove 从版本控制里移除/path中的文件。
:rename 重命名/path的文件,会在对话框中询问新文件,为了防止一个步骤中询问相似文件,传递/noquestion
:diff Starts the external diff program specified in the TortoiseSVN settings. The /path specifies the first file. If the option /path2 is set, then the diff program is started with those two files. If /path2 is omitted, then the diff is done between the file in /path and its BASE. To explicitly set the revision numbers use /startrev:xxx and /endrev:xxx. If/blame is set and /path2 is not set, then the diff is done by first blaming the files with the given revisions.
:showcompare

Depending on the URLs and revisions to compare, this either shows a unified diff (if the option unified is set), a dialog with a list of files that have changed or if the URLs point to files starts the diff viewer for those two files.

The options url1url2revision1 and revision2 must be specified. The options pegrevisionignoreancestryblame and unified are optional.

:conflicteditor Starts the conflict editor specified in the TortoiseSVN settings with the correct files for the conflicted file in /path.
:relocate 打开重定位对话框,/path指定了重定位的工作副本路径。
:help 打开帮助文件
:repostatus 打开为修改检出对话框,/path 指定了工作副本目录。
:repobrowser Starts the repository browser dialog, pointing to the URL of the working copy given in /path or /path points directly to an URL. An additional option /rev:xxx can be used to specify the revision which the repository browser should show. If the /rev:xxx is omitted, it defaults to HEAD. If /path points to an URL, the /projectpropertiespath:path/to/wcspecifies the path from where to read and use the project properties.
:ignore /path中的对象加入到忽略列表,也就是将这些文件添加到 svn:ignore 属性。
:blame

为 /path 选项指定的文件打开追溯对话框。

如果设置了 /startrev 和 /endrev 选项,不会显示询问追溯范围对话框,直接使用这些选项中的版本号。

如果设置了 /line:nnn 选项,TortoiseBlame 会显示指定行数。

也支持 /ignoreeol/ignorespaces 和 /ignoreallspaces 选项。

:cat /path指定的工作副本或URL的文件保存到/savepath:path,修订版本号在/revision:xxx,这样可以得到特定修订版本的文件。
:createpatch 创建/path下的补丁文件。
:revisiongraph 显示/path目录下的版本变化图。
:lock Locks a file or all files in a directory given in /path. The 'lock' dialog is shown so the user can enter a comment for the lock.
:unlock Unlocks a file or all files in a directory given in /path.
:rebuildiconcache Rebuilds the windows icon cache. Only use this in case the windows icons are corrupted. A side effect of this (which can't be avoided) is that the icons on the desktop get rearranged. To suppress the message box, pass /noquestion.
:properties 显示 /path 给出的路径之属性对话框。

Examples (which should be entered on one line):

TortoiseProc.exe /command:commit/path:"c:\svn_wc\file1.txt*c:\svn_wc\file2.txt"/logmsg:"test log message" /closeonend:0TortoiseProc.exe /command:update /path:"c:\svn_wc\" /closeonend:0TortoiseProc.exe /command:log /path:"c:\svn_wc\file1.txt"/startrev:50 /endrev:60 /closeonend:0实际使用的例子:
C:\Programe Files\TortoiseSVN\bin\TortoiseProc.exe /command:checkout /url:"http://code.taobao.org/svn/tair/trunk" \path:"d:\tair"

TortoiseSVN 命令 (命令行执行工具)相关推荐

  1. nmap 命令行执行错误_Unimap:一款基于Nmap实现的扫描速度提升工具

    Unimap Unimap是一款基于Nmap实现的扫描速度提升工具,我们只需要提供一个IP地址给Unimap,即使是大量数据,Unimap也能够以非常快的速度完成网络扫描.Unimap是"U ...

  2. 【Android 安全】DEX 加密 ( Java 工具开发 | 生成 dex 文件 | Java 命令行执行 )

    文章目录 一.生成 dex 文件 二.生成 dex 文件代码示例 三.生成 dex 结果 参考博客 : [Android 安全]DEX 加密 ( 常用 Android 反编译工具 | apktool ...

  3. python超赞插件you-get,执行一行命令即可下载、命令行下载工具推荐!

    you-get 是基于python3实现的多媒体资源下载插件,包括音频.图片.视频等下载功能.执行方式简单直接在.命令行执行命令即可下载相应的资源! [阅读全文] 插件安装 ''' 安装命令:pip ...

  4. Python中最好用的命令行解析工具:argparse

    Python 做为一个脚本语言,可以很方便地写各种工具.当你在服务端要运行一个工具或服务时,输入参数似乎是一种硬需(当然你也可以通过配置文件来实现). 如果要以命令行执行,那你需要解析一个命令行参数解 ...

  5. java命令行参数工具_Java方法中的参数太多,第8部分:工具

    java命令行参数工具 在我的系列文章的前七篇文章中,有关处理Java方法中期望的参数过多的内容集中在减少方法或构造函数期望的参数数量的替代方法上. 在本系列的第八篇文章中,我将介绍一些工具,这些工具 ...

  6. mysql sql执行cmd命令行_命令行执行MySQL的sql文件

    在项目开发过程中, 可能存在数据库导入导出,如果文件过大,会发现通过数据库(MySQL等)管理工具进行文件导入会报错,超出最大文件的限制. 需要更改工具的文件大小限制,网上有很多教程,比较麻烦,这里介 ...

  7. centos 命令行执行多个命令_命令行如何执行jar包里面的方法

    最近遇到一个尴尬的问题,由于公司机测试环境的机房迁移,导致办公区的网络跟测试环境网络之前延迟比较大,大到什么程度呢?大到不能正常使用测试环境. 由于网络组一直在排查,暂时没有答复,所以只能采取一个比较 ...

  8. Linux的命令回收站在哪,Trash-Cli:Linux 上的命令行回收站工具

    相信每个人都对回收站trashcan很熟悉,因为无论是对 Linux 用户,还是 Windows 用户,或者 Mac 用户来说,它都很常见.当你删除一个文件或目录的时候,该文件或目录会被移动到回收站中 ...

  9. java 庖丁解牛api_Java 微信支付 APIv3 平台证书的命令行下载工具

    Certificate Downloader Certificate Downloader 是 Java 微信支付 APIv3 平台证书的命令行下载工具.该工具可从 https://api.mch.w ...

最新文章

  1. Cable master (POJ No.1064)
  2. 如何将自己的站点与Ucenter整合——详解
  3. pandas 季度_pandas_时间序列和常用操作
  4. 荷兰警方错买300万欧元Office套件 法院:微软无需退款
  5. 云端上的字节,引擎火力全开
  6. EOS与金格iWebOffice集成应用实例
  7. 个人微信api接口调用,微信好友收发消息
  8. 测试移动硬盘的真实容量的软件,移动硬盘容量标识有猫腻:实际缩水99%
  9. 艾泰(UTT)WiFi短信验证:无线上网热点短信认证设置流程
  10. Common IO 使用小结
  11. Ubuntu 20.04 禁用笔记本电脑自带键盘
  12. 找茬游戏html5源码,大家来找茬游戏以JS实现
  13. LeetCode 37. 解数独 Sudoku Solver
  14. 小M哥安卓5期视频教程(基础+就业)
  15. 移动App Store测试的“七宗罪”
  16. (matlab代码分享,可运行) 多技能员工排班调度多目标优化(技能熟练度包含学习型、遗忘型)(Part 1)
  17. 随身WIFI折腾日记(一)---霓虹灯
  18. 绘制图像灰度直方图——将图像的灰度分布可视化方法总结
  19. A/B-Test简介
  20. win7的svchost.exe占用内存过高如何解决

热门文章

  1. java循环打印三角形_Java for循环打印三角形(基础)
  2. 用户登录问题python_Python Flask单点登录问题
  3. 小程序中的css样式有哪些,微信小程序中css样式media标签
  4. PCL之在Debian10下配置pcl.1.9.1
  5. 数据库学习--DML(数据管理语言)
  6. 虚拟机中CentOS系统安装流程
  7. Learnopengl
  8. 《强化学习》中的第14章:心理学
  9. java 构造块_java中构造方法、普通块、静态代码块、构造块的执行顺序
  10. (三.1)基于MicroBlaze的PowerlinkC代码分析