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:path ,path 指向了保存日志信息的文件。为了预先填入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 The options |
: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/wc specifies the path from where to read and use the project properties. |
:ignore | 将/path 中的对象加入到忽略列表,也就是将这些文件添加到 svn:ignore 属性。 |
:blame |
为 如果设置了 如果设置了 也支持 |
: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:0 TortoiseProc.exe /command:update /path:"c:\svn_wc\" /closeonend:0 TortoiseProc.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 命令 (命令行执行工具)的更多相关文章
- Android 命令行执行工具类
最近在做android项目的时候,需要执行命令行命令,之前在网上找的不仅杂乱而且错误多,于是自己写了一份. 话不多说,直接上代码 import android.util.Log; import jav ...
- libvirt 命令行交互工具之virsh
libvirt是当前主流VM最低层库.IBM PowerVM也不例外,libvirt是深入玩虚拟化必须玩转的东西; 简单测试玩玩libvirt 的virsh命令行交互工具, 你我都知libvirt大体 ...
- php 运行linux命令 与 linux下命令行执行php
1.php运行linux命令 exec函数:string exec(string command, string [array], int [return_var]); 执行函数后不输出结果,返回最 ...
- Python中最好用的命令行解析工具:argparse
Python 做为一个脚本语言,可以很方便地写各种工具.当你在服务端要运行一个工具或服务时,输入参数似乎是一种硬需(当然你也可以通过配置文件来实现). 如果要以命令行执行,那你需要解析一个命令行参数解 ...
- 使用命令行执行jmeter的方法
1. 简介 使用非 GUI 模式,即命令行模式运行 JMeter 测试脚本能够大大缩减所需要的系统资 本文介绍windows下以命令行模式运行的方法. 1.1. 命令介绍 jmeter -n -t & ...
- 命令行编译工具NMAKE
简介 大家已经习惯于微软提供的功能强大的IDE,已经很少考虑手动编连项目了,所谓技多不压身,有空的时候还是随我一块了解一下命令行编译. C/C++/VC++程序员或有Unix/Linux编程经验应该很 ...
- You-Get 视频下载工具 Python命令行下载工具
You-Get 是一个命令行工具, 用来下载各大视频网站的视频, 是我目前知道的命令行下载工具中最好的一个, 之前使用过 youtube-dl, 但是 youtube-dl 吧, 下载好的视频是分段的 ...
- Cmder | 一款命令行增强工具
文章目录 什么是cmder 安装cmder 让cmder便于使用 将cmder添加到右键菜单中 在设置中添加语言环境 设置默认使用cmd.PowerShell还是bash 调节背景的透明度 添加 ll ...
- virsh命令行管理工具
virsh命令行管理工具 Libvirt有两种控制方式,命令行和图形界面 图形界面: 通过执行名virt-manager,启动libvirt的图形界面,在图形界面下可以一步一步的创建虚拟机,管理虚拟机 ...
随机推荐
- Mockito各场景使用介绍
场景1:某三方接口所有方法都需要Mock 实现方式1-配置configrution bean 实现方式2-在application context中配置mock bean 场景2:某三方接口部分方法m ...
- RibbonControl中的主题设计
Ribbon+扁平化 据调查,其实人们可能最多只用到全部 Office 功能的 5%,为此,微软交互式团队推出了Ribbon风格,一时间,很多软件升级后都换成了Ribbon界面:扁平化其实不是新东西, ...
- WinForm 之 VS2010发布、打包安装程序
第一步.在vs2010 打开要打包的应用程序解决方案,右键“ 解决方案 ” → “ 添加 ” → “ 新建项目 ” → “ 其他项目类型 ” → “ 安装和部署 ” → “ Visual Studio ...
- PAT《数据结构学习与实验指导》实验项目集 2-05 2-06 2-07 2-08
题目地址:here pat 2-05 求集合数据的均方差 没什么可说的,大水题 #include<cstdio> #include<cmath> int main() { in ...
- 微信小程序 - tab+swiper切换(非组件)
无奈slot不支持循环,无法成为组件. 该模板适用于新闻等,点击下载示例:tabswiper
- 利用mvn进行多环境配置
代码里的resource信息有很多,代码里写死某一个环境的配置的话,有以下若干问题. 1. dev,不同的beta上,使用的resource信息不同. 2. 代码没有发布到对应的环境上,需要去机器上需 ...
- Android学习笔记五:四大组件(转)
转自:http://blog.csdn.net/shenggaofei/article/details/52450668 Android四大组件分别为activity.service.content ...
- React-Native视频组件react-native-video使用(安卓版)
转载请注明原文地址:http://www.cnblogs.com/ygj0930/p/7366019.html 一:安装 在IDE中打开你的项目,然后在IDE的terminal,输入: npm i - ...
- RN组件备忘录
1:ActivityIndicator:圆形的loading提示符号. 2:Button:按钮 3:FlatList:高性能列表组件,支持下拉刷新. 4:Image:图片组件,能显示 网络图片.静态资 ...
- Struts2学习笔记二:开发流程
一:创建项目,添加依赖包 二:在web.xml配置核心控制器 <filter> <filter-name>struts2</filter-name> <fil ...