- 浏览: 162001 次
- 性别:
- 来自: 北京
最新评论
-
BlueAeri:
好像旧了,有些参数没有,比如 --cups
VBoxManage命令详解 -
jiamb:
非常感谢!
学习ibatis的一些资料 -
memory_in_08:
正急着找ibatis的此资料呢,3k you..
学习ibatis的一些资料 -
小猪笨笨:
多谢···
学习ibatis的一些资料 -
mingxiao2010:
谢谢你的分享!!
学习ibatis的一些资料
原文地址:http://svnbook.red-bean.com/en/1.5/svn.advanced.props.special.keywords.html Subversion has the ability to substitute keywords—pieces of useful, dynamic information about a versioned file—into the contents of the file itself. Keywords generally provide information about the last modification made to the file. Because this information changes each time the file changes, and more importantly, just after the file changes, it is a hassle for any process except the version control system to keep the data completely up to date. Left to human authors, the information would inevitably grow stale. For example, say you have a document in which you would like to display the last date on which it was modified. You could burden every author of that document to, just before committing their changes, also tweak the part of the document that describes when it was last changed. But sooner or later, someone would forget to do that. Instead, simply ask Subversion to perform keyword substitution on the All keywords are case-sensitive where they appear as anchors in files: you must use the correct capitalization for the keyword to be expanded. You should consider the value of the Subversion defines the list of keywords available for substitution. That list contains the following five keywords, some of which have aliases that you can also use: This keyword describes the last time the file was known to have been changed in the repository, and is of the form This keyword describes the last known revision in which this file changed in the repository, and looks something like This keyword describes the last known user to change this file in the repository, and looks something like This keyword describes the full URL to the latest version of the file in the repository, and looks something like This keyword is a compressed combination of the other keywords. Its substitution looks something like Several of the preceding descriptions use the phrase “last known” or similar wording. Keep in mind that keyword expansion is a client-side operation, and your client “knows” only about changes that have occurred in the repository when you update your working copy to include those changes. If you never update your working copy, your keywords will never expand to different values even if those versioned files are being changed regularly in the repository. Simply adding keyword anchor text to your file does nothing special. Subversion will never attempt to perform textual substitutions on your file contents unless explicitly asked to do so. After all, you might be writing a document [13] about how to use keywords, and you don't want Subversion to substitute your beautiful examples of unsubstituted keyword anchors! To tell Subversion whether to substitute keywords on a particular file, we again turn to the property-related subcommands. The For example, say you have a versioned file named With no Now you have made a local property modification on the Immediately after you commit this property change, Subversion will update your working file with the new substitute text. Instead of seeing your keyword anchor Note also that we set the If someone else now commits a change to Where's $GlobalRev$? New users are often confused by how the To do this, you need external processing. Subversion ships with a tool called svnversion, which was designed for just this purpose. It crawls your working copy and generates as output the revision(s) it finds. You can use this program, plus some additional tooling, to embed that revision information into your files. For more information onsvnversion, see the section called “svnversion”. Subversion 1.2 introduced a new variant of the keyword syntax, which brought additional, useful—though perhaps atypical—functionality. You can now tell Subversion to maintain a fixed length (in terms of the number of bytes consumed) for the substituted keyword. By using a double colon ( For example, say you have a document in which you have some section of tabular data reflecting the document's Subversion keywords. Using the original Subversion keyword substitution syntax, your file might look something like: Now, that looks nice and tabular at the start of things. But when you then commit that file (with keyword substitution enabled, of course), you see: The result is not so beautiful. And you might be tempted to then adjust the file after the substitution so that it again looks tabular. But that holds only as long as the keyword values are the same width. If the last committed revision rolls into a new place value (say, from 99 to 100), or if another person with a longer username commits the file, stuff gets all crooked again. However, if you are using Subversion 1.2 or later, you can use the new fixed-length keyword syntax and define some field widths that seem sane, so your file might look like this: You commit this change to your file. This time, Subversion notices the new fixed-length keyword syntax and maintains the width of the fields as defined by the padding you placed between the double colon and the trailing dollar sign. After substitution, the width of the fields is completely unchanged—the short values for The use of fixed-length keywords is especially handy when performing substitutions into complex file formats that themselves use fixed-length fields for data, or for which the stored size of a given data field is overbearingly difficult to modify from outside the format's native application (such as for Microsoft Office documents). Be aware that because the width of a keyword field is measured in bytes, the potential for corruption of multibyte values exists. For example, a username that contains some multibyte UTF-8 characters might suffer truncation in the middle of the string of bytes that make up one of those characters. The result will be a mere truncation when viewed at the byte level, but will likely appear as a string with an incorrect or garbled final character when viewed as UTF-8 text. It is conceivable that certain applications, when asked to load the file, would notice the broken UTF-8 text and deem the entire file corrupt, refusing to operate on the file altogether. So, when limiting keywords to a fixed size, choose a size that allows for this type of byte-wise expansion. Keyword Substitution
LastChangedDate
keyword. You control where the keyword is inserted into your document by placing a keyword anchor at the desired location in the file. This anchor is just a string of text formatted as $
KeywordName
$
.svn:keywords
property to be case-sensitive, too—certain keyword names will be recognized regardless of case, but this behavior is deprecated.Date
$Date: 2006-07-22 21:42:37 -0700 (Sat, 22 Jul 2006) $
. It may also be specified as LastChangedDate
. Unlike the Id
keyword, which uses UTC, the Date
keyword displays dates using the local time zone.Revision
$Revision: 144 $
. It may also be specified as LastChangedRevision
or Rev
.Author
$Author: harry $
. It may also be specified as LastChangedBy
.HeadURL
$HeadURL: http://svn.collab.net/repos/trunk/README $
. It may be abbreviated as URL
.Id
$Id: calc.c 148 2006-07-28 21:30:43Z sally $
, and is interpreted to mean that the file calc.c
was last changed in revision 148 on the evening of July 28, 2006 by the user sally
. The date displayed by this keyword is in UTC, unlike that of the Date
keyword (which uses the local time zone).svn:keywords
property, when set on a versioned file, controls which keywords will be substituted on that file. The value is a space-delimited list of keyword names or aliases.weather.txt
that looks like this:Here is the latest report from the front lines.
$LastChangedDate$
$Rev$
Cumulus clouds are appearing more frequently as summer approaches.
svn:keywords
property set on that file, Subversion will do nothing special. Now, let's enable substitution of theLastChangedDate
keyword.$ svn propset svn:keywords "Date Author" weather.txt
property 'svn:keywords' set on 'weather.txt'
$
weather.txt
file. You will see no changes to the file's contents (unless you made some of your own prior to setting the property). Notice that the file contained a keyword anchor for the Rev
keyword, yet we did not include that keyword in the property value we set. Subversion will happily ignore requests to substitute keywords that are not present in the file and will not substitute keywords that are not present in the svn:keywords
property value.$LastChangedDate$
, you'll see its substituted result. That result also contains the name of the keyword and continues to be delimited by the dollar sign ($
) characters. And as we predicted, the Rev
keyword was not substituted because we didn't ask for it to be.svn:keywords
property to Date Author
, yet the keyword anchor used the alias $LastChangedDate$
and still expanded correctly:Here is the latest report from the front lines.
$LastChangedDate: 2006-07-22 21:42:37 -0700 (Sat, 22 Jul 2006) $
$Rev$
Cumulus clouds are appearing more frequently as summer approaches.
weather.txt
, your copy of that file will continue to display the same substituted keyword value as before—until you update your working copy. At that time, the keywords in your weather.txt
file will be resubstituted with information that reflects the most recent known commit to that file.$Rev$
keyword works. Since the repository has a single, globally increasing revision number, many people assume that it is this number that is reflected by the $Rev$
keyword's value. But $Rev$
expands to show the last revision in which the file changed, not the last revision to which it was updated. Understanding this clears the confusion, but frustration often remains—without the support of a Subversion keyword to do so, how can you automatically get the global revision number into your files?::
) after the keyword name, followed by a number of space characters, you define that fixed width. When Subversion goes to substitute your keyword for the keyword and its value, it will essentially replace only those space characters, leaving the overall width of the keyword field unchanged. If the substituted value is shorter than the defined field width, there will be extra padding characters (spaces) at the end of the substituted field; if it is too long, it is truncated with a special hash (#
) character just before the final dollar sign terminator.$Rev$: Revision of last commit
$Author$: Author of last commit
$Date$: Date of last commit
$Rev: 12 $: Revision of last commit
$Author: harry $: Author of last commit
$Date: 2006-03-15 02:33:03 -0500 (Wed, 15 Mar 2006) $: Date of last commit
$Rev:: $: Revision of last commit
$Author:: $: Author of last commit
$Date:: $: Date of last commit
Rev
and Author
are padded with spaces, and the long Date
field is truncated by a hash character:$Rev:: 13 $: Revision of last commit
$Author:: harry $: Author of last commit
$Date:: 2006-03-15 0#$: Date of last commit
发表评论
-
JavaScript的5种调用函数的方法
2011-03-22 17:49 862http://www.cnblogs.com/lhb25/ar ... -
(转载)memcached命令
2010-05-14 16:40 2644命令行查看Memcached运行状态 很多时候需要监控服务器 ... -
( 转载)如何用Sysctl调整Linux操作系统的性能
2010-02-01 14:17 1162Sysctl是一个允许您改变正在运行中的Linux系统的接口。 ... -
linux tcp 连接的配置
2009-12-14 10:46 4480tcp_syn_retries :INTEGER默认值是5对于 ... -
给VirtualBox的linux系统共享window的目录
2009-07-21 16:46 2502VirtualBox上装了Ubuntu8, 那么如何共享Vis ... -
linux服务器优化调优笔记
2009-07-20 18:40 1895++不使用atime属性,例需为/data设置notime,可 ... -
减少Linux下服务器的TIME_WAIT套接字数量
2009-07-20 18:25 1452Squid是一种用来缓冲Internet数据的软件。它是这样实 ... -
自我评价表
2009-06-28 21:48 10381。技能检验 编程技能 ... -
vim 格式化
2009-06-26 10:22 1387"""""& ... -
设置ubuntu不启动图形界面
2009-06-22 18:03 17321.安装 rcconf 2.执行 rcconf 命令 3. ... -
简单的 vim 配置(转)
2009-06-18 10:45 895简单的 vim 配置(转)2008-02-20 19:37在终 ... -
memcached 安装日志
2009-05-19 17:08 7761、下载memcached-1.2.1.tar.gz和libe ... -
限制Apache并发连接数
2009-04-27 20:17 1939限制Apache并发连接数 大型动态系统中,如果客户端不顾 ... -
双机集群(HA)系统
2009-04-27 11:36 1279双机集群(HA)系统 LATCH HA ... -
eclipse 反编译插件
2009-03-12 20:30 745下载附件查看 -
在 MyEclipse 5.1GA 上使用 XFire 编写 Web Service
2009-02-13 15:05 1641注:本文对于在MyEclipse 下使用xfire帮助很大,个 ... -
Squid是什么?
2009-02-11 10:15 28471.Squid是什么? S ... -
Memcache是什么
2009-02-11 10:09 1264Memcache是什么Memcache是danga.com的一 ... -
VBoxManage命令详解
2008-12-24 17:04 11316VBoxManage命令详解 本人对vboxmange命令按我 ... -
如何实现eclipse中代码自动提示功能
2008-11-11 13:54 1656eclipse版本3.0时就已经支持代码提示功能,以前使用在 ...
相关推荐
svn:keywords svn:eol-style svn:externals svn:special 自动属性设置 Peg和实施修订版本 外部定义 卖主分支 常规的卖主分支管理过程 svn_load_dirs.pl 本地化 理解地区 Subversion对地区的支持 Subversion版本库URL...
svn:keywords svn:eol-style svn:externals svn:special 自动属性设置 Peg和实施修订版本 外部定义 卖主分支 常规的卖主分支管理过程 svn_load_dirs.pl 本地化 理解地区 Subversion对地区的支持 Subversion版本库URL...
### SVN基本指令详解 #### 目录架构与用途解析 ... svn propset svn:keywords "Id" filename ``` 以上是对SVN基本指令及部分进阶操作的详细解析,掌握了这些,你就可以有效地管理和协作代码库了。
svn:keywords 4.17.1.2. 增加和编辑属性 4.17.1.3. Exporting and Importing Properties 4.17.1.4. 二进制属性 4.17.1.5. 自动属性设置 4.17.2. TortoiseSVN 项目属性 4.18. External Items 4.18.1. ...
在Java代码中,通过设置特定的关键词(Keywords),如`Id`、`LastChangedDate`、`LastChangedBy`、`LastChangedRevision`和`HeadURL`,SVN可以在每次提交时自动更新这些信息。例如,`Id`关键字会被替换为文件的完整...
- 属性设置:可以为文件或目录设置特定的SVN属性,如`svn:keywords`用于插入版本信息。 4. **冲突解决**: - 当多个人对同一文件的同一部分进行修改并提交时,会出现冲突。SVN会在冲突文件中标识出冲突区域,需要...
svn在高级主题部分介绍了修订规格符(Revision Specifiers)、修订关键词(Revision Keywords)和修订日期(Revision Dates)。此外,还讨论了属性(Properties)的概念和作用,属性是版本控制之外的元数据信息,...
- **修订关键字(Revision Keywords)**:在文件中自动插入版本信息的特殊字符串。 - **修订日期(Revision Dates)**:与版本相关的日期信息。 - **定位修订(Peg and Operative Revisions)**:允许指定特定版本下的操作...
4.34. svn:keywords 属性页 4.35. svn:eol-style 属性页 4.36. tsvn:bugtraq 属性页 4.37. 日志信息属性页的大小 4.38. 语言属性页 4.39. svn:mime-type 属性页 4.40. svn:needs-lock 属性页 4.41. svn:executable ...
会从语言、编码、链接、自定义标记、设置版本的自动增加(并引申Eclipse下如何设置SVN中的svn:keywords属性)几个方面来个性你的Javadoc文档。 本人博客:http://www.blogjava.net/lishunli/,希望大家支持
此外,`hgsubversion`还支持一些高级特性,例如处理Subversion的属性(svn:keywords、svn:eol-style等),以及处理Subversion的分支和标签。 在Python开发中,选择合适的库可以极大地提高开发效率和项目质量。`...
- **修订关键词(Revision Keywords)**:特定的关键词可以自动替换为修订版本的信息。 - **修订日期(Revision Dates)**:每条修订都有一个对应的日期时间戳。 - **初始化检出(Initial Checkout)**:首次从...
- **修订关键字(Revision Keywords)**:在文件中嵌入版本信息的特殊标记,例如$Rev$表示当前文件的版本号。 - **属性(Properties)**:附加在文件或目录上的元数据,可用于记录作者信息、版权声明等内容。 #### ...
其核心概念包括测试套件(Test Suite)、测试用例(Test Case)和步骤(Steps),这些步骤通常由关键字(Keywords)组成。关键词可以是自定义的或者预定义的,它们封装了具体的测试逻辑。 3. **RIDE 界面组件** - ...
How to enable and disable autocorrect keywords with syntax highlighting Insert Menu Commands UltraEdit includes several special insert functions under the Insert menu. You can use these functions to ...
charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"><title>ReadMe.io : Crowdsource Your Developer Hub</title><meta name="keywords" content="readme,...
3.在同时出现多个重复的关键字时,请谨慎修改,有些可能是定义函数的, 具体参考http://code.google.com/p/smali/source/browse/#svn/dalvik-docs/opcodes 4.保存时的文本编码要设置为ANSI格式,具体操作在菜单栏的...