TortoiseSVN 日常操作指南(4)

2019-03-29 16:39

提交对话框会显示每一个有修改的文件,包括新增的,删除的,还有没有版本控制的。如果你不想提交某个有修改的文件,只要不勾选那个文件就好了。如果你要提交某个没有做版本控制的文件,只要勾选它就可以提交了。 Commit files or folders?

When you commit files, the commit dialog shows only the files you have selected. When you commit a folder the commit dialog will select the changed files

automatically. If you forget about a new file you created, committing the folder will find it anyway. Committing a folder does not mean that every file gets marked as changed; It just makes your life easier by doing more work for you. Many unversioned files in the commit dialog

If you think that the TSVN commit dialog shows you too many unversioned (e.g. compiler generated or editor backup) files, there are several ways to handle this. You can:

add the file (or a wildcard extension) to the list of files to exclude on the settings page. This will affect every working copy you have.

add the file to the svn:ignore list using the Add to ignore list context menu. This will

only affect the directory on which you set the svn:ignore property. Using the SVN Property Dialog, you can alter the svn:ignore property for a directory. Read Section 4.12, “Ignoring Files And Directories” for more information. 在提交对话框中双击一个有修改的文件,可以启动外挂的比较工具来显示修改细节。 在按下OK按钮之后,会出来一个显示提交进程的对话框。 图 4.9. 显示提交进程的对话框

这个显示进程的窗口中采用了不同颜色的文字来表示不同的提交动作。 蓝色Blue

提交一个修改的或新的条目。 深红Dark red

提交一个删除或覆盖操作。 黑色Black 其它所有条目。

Special Folder Properties

There are several special folder properties which can be used to help give more control over the formatting of commit log messages. Read Section 4.9, “Get/Set Information About Files/Directories” for further information. Integration with Bugtracking Tools

If you have activated the bugtracking system, you could set one or more Issues in the Bug-ID / Issue-Nr: Textfield. Several Issues should be comma separated. Learn

more Section 4.10, “Integration with Bugtracking Systems”. 4.9. Get/Set Information About Files/Directories 图4.10. Subversion属性页

有时你想得到一个文件或文件夹更细节的,比覆盖图标更多的信息。你可以在浏览器属性对话框中得到Subversion提供的所有信息。选择文件或文件夹,然后在菜单中选择属性(注意:这个属性是资源管理器提供的那个菜单中的属性,不在TortoiseSVN子菜单里面)。在属性对话框中TortoiseSVN为在Subversion控制下的文件或文件夹加入了一个新的属性页。 在Subversion的属性页,你可以看到选中文件或文件夹所有的相关信息。另外你还可以读到或设置它的subversion属性。你可以加入你自己的属性,或者一些在subversion中有特殊含义的属性。那些以svn:和svn:externals就是这样的属性。如何使用这些扩展信息请参看4.3.4节, “Referenced Projects”。更多subversion属性信息,请参看Subversion Manual。 要设置一个属性,先在下拉框选择需要的属性名,然后在下方的输入框中键入值。那些有多个值得属性,比如忽略列表,可以分成多行来输入。单击Set按钮来添加属性到列表中。

如果你要应用一个属性到一个目录下的每一个文件和目录,注意选中Recursive复选框。 如果你要修改一个已存在的属性,先在列表中选中他,然后就可以修改了。

同样,要删除一个已存在的属性,可以先在列表中选中他,再单击Remove按钮。 TortoiseSVN也有一些自己的特殊属性,他们以tsvn:打头:

● tsvn:minlogmsgsize设置了提交时日志的最小长度。如果你没有输入指定长度的信息,是不能提交的。这个功能对你在每一次做提交操作时提醒你写一些合适的描述信息是很有用的。如果这个属性没有设置,或者他的值为0,那表示不填日志信息也可以。

● tsvn:logwidthmarker用在需要有一定格式日志信息的项目中,日志信息每行的宽度有限制(常见的是80个字符)。设置这个属性为一个非零值,将导致2个现象:出现一个灰色线条指示最宽的宽度,还有,自动换行没有了。这样你就能看到自己的文字是不是写的太长了。注意:这个功能只有在给日志显示选择了固定宽度字体时才能正常工作。

● tsvn:logtemplate用在一些有日志格式规范的项目中。这个属性包含多行的文本,当进行一个commit操作时,这些文本就会自动插入到提交信息窗口中。接下来,你就可以在其中再加入必要的信息。注意:如果你还使用了tsvn:minlogmsgsize属性,那一定要保证设置的长度比模板中的长,否则你将失去这个保护机制。(Note: if you are also using tsvn:minlogmsgsize, be sure to set the length longer than the template or you will lose the protection mechanism.)

● 在提交对话框中,你可以把有改动的文件列表粘贴进来,包括每个文件的状态(added,modified,等)。tsvn:logfilelistenglish定义了显示的文件状态文字是英文还是本地语言。如果这个属性没有设置,默认为true。

● TortoiseSVN可以使用拼写检查模块,就像OpenOffice和Mozilla使用的。如果你安装了这些东东,这个属性可以决定使用哪个拼写检查模块,比如你的项目的日志信息应该用哪种语言来写。tsvn:projectlanguage设置了日志信息中拼写检查器要使用的语言模块。在这里可以找到你的语言要使用的值:MSDN: Language Identifiers。

某些tsvn:属性需要一个true或者false的值。另外,TSVN会懂得把yes当作true,把no当作false。

Set the tsvn: properties on folders

These tsvn: properties must be set on folders for the system to work. When you commit a file or folder the properties are read from that folder. If the properties are not found there, TortoiseSVN will search upwards through the folder tree to find them until it comes to an unversioned folder, or the tree root (eg. C:\\) is found. If you can be sure that each user checks out only from e.g trunk/ and not some subfolder, then it is sufficient to set the properties on trunk/. If you can't be sure, you should set the properties recursively on each subfolder. A property setting deeper in the project hierarchy overrides settings on higher levels (closer to trunk/). For tsvn: properties only you can use the Recursive checkbox to set the property to all subfolders in the hierarchy, without also setting it on all files.

Commit properties

Subversion properties are versioned. After you change or add a property you have to commit your changes. Conflicts on properties

If there's a conflict on committing the changes, because another user has changed the same property, Subversion generates a .prej file. Delete this file after you have resolved the conflict.

Automatic property setting

You can configure subversion to set properties automatically on files and folders when they are added to the repository. Read Section 4.21, “TortoiseSVN's Settings” for further information.

TortoiseSVN能够和一些bug跟踪系统整合到一起。这需要使用那些bugtraq:开头的属性。更多相关信息请阅读第4.10节 “整合BUG跟踪系统Integration with Bugtracking Systems”。

4.10. Bug跟踪系统Integration with Bugtracking Systems

你可以选择为TortoiseSVN整合一套Bug跟踪系统。要达到这个目的,你必须为目录定义一些以bugtraq:开头的属性(第4.9节 获取(修改)文件(目录)信息): bugtraq:message 这个属性能够激活Bug跟踪系统。一旦这个属性被设置,提交修改时,TortoiseSVN会要求你输入一个流水号。而这个属性的值将被放在日志信息的末尾,其中必须包含%BUGID%,这个%BUGID%在提交时会被流水号替换掉。这就能保证你提交的日志信息中包括Bug流水号,这个流水号经常会有一个特定的格式,并且与你的Bug跟踪系统协调工作。比如,我们的TortoiseSVN项目就正在使用这样的流水号:%BUGID%。(e.g the TortoiseSVN project is using Issue : %BUGID%, but this depends on your Tool.) bugtraq:append 当这个属性为true时,上面提到的BUGID将出现在日志的末尾,当为false时,BUGID将出现在日志的开头。该属性的有效值为true或false。假如没有定义,系统将默认为true,这样能够保证已有项目正常运行。 bugtraq:url 将这个属性设置为你的Bug跟踪系统的url。这个url应该被合适的编码过并且包

含%BUGID%,%BUGID%会被输入的流水号替换掉的。这样,TortoiseSVN就会在日志对话框中显示一个链接,你就可以通过点击这个链接直接跳到Bug跟踪系统。如果你不提供这个属性,TortoiseSVN将只显示那个流水号,也不会链接到哪里。比如:TortoiseSVN项目使用的是http://tortoisesvn.tigris.org/issues/show_bug.cgi?id=%BUGID%


TortoiseSVN 日常操作指南(4).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:关于我市地下空间开发利用的调查与思考

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: