- 浏览: 159056 次
- 性别:
- 来自: 北京
最新评论
-
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 832http://www.cnblogs.com/lhb25/ar ... -
(转载)memcached命令
2010-05-14 16:40 2621命令行查看Memcached运行状态 很多时候需要监控服务器 ... -
( 转载)如何用Sysctl调整Linux操作系统的性能
2010-02-01 14:17 1122Sysctl是一个允许您改变正在运行中的Linux系统的接口。 ... -
linux tcp 连接的配置
2009-12-14 10:46 4451tcp_syn_retries :INTEGER默认值是5对于 ... -
给VirtualBox的linux系统共享window的目录
2009-07-21 16:46 2467VirtualBox上装了Ubuntu8, 那么如何共享Vis ... -
linux服务器优化调优笔记
2009-07-20 18:40 1867++不使用atime属性,例需为/data设置notime,可 ... -
减少Linux下服务器的TIME_WAIT套接字数量
2009-07-20 18:25 1420Squid是一种用来缓冲Internet数据的软件。它是这样实 ... -
自我评价表
2009-06-28 21:48 10081。技能检验 编程技能 ... -
vim 格式化
2009-06-26 10:22 1352"""""& ... -
设置ubuntu不启动图形界面
2009-06-22 18:03 17021.安装 rcconf 2.执行 rcconf 命令 3. ... -
简单的 vim 配置(转)
2009-06-18 10:45 856简单的 vim 配置(转)2008-02-20 19:37在终 ... -
memcached 安装日志
2009-05-19 17:08 7561、下载memcached-1.2.1.tar.gz和libe ... -
限制Apache并发连接数
2009-04-27 20:17 1916限制Apache并发连接数 大型动态系统中,如果客户端不顾 ... -
双机集群(HA)系统
2009-04-27 11:36 1252双机集群(HA)系统 LATCH HA ... -
eclipse 反编译插件
2009-03-12 20:30 729下载附件查看 -
在 MyEclipse 5.1GA 上使用 XFire 编写 Web Service
2009-02-13 15:05 1619注:本文对于在MyEclipse 下使用xfire帮助很大,个 ... -
Squid是什么?
2009-02-11 10:15 28241.Squid是什么? S ... -
Memcache是什么
2009-02-11 10:09 1239Memcache是什么Memcache是danga.com的一 ... -
VBoxManage命令详解
2008-12-24 17:04 11202VBoxManage命令详解 本人对vboxmange命令按我 ... -
如何实现eclipse中代码自动提示功能
2008-11-11 13:54 1637eclipse版本3.0时就已经支持代码提示功能,以前使用在 ...
相关推荐
SVN演示 SVN演示 SVN演示 SVN演示 SVN演示 SVN演示
svn客户端svn客户端svn客户端svn客户端svn客户端
SVN培训 SVN培训 SVN培训 SVN培训 SVN培训 SVN培训
svn插件svn插件
安装svn安装svn安装svn
SVN svn SVN中文手册 SVN资料 svn配置SVN svn SVN中文手册 SVN资料 svn配置SVN svn SVN中文手册 SVN资料 svn配置SVN svn SVN中文手册 SVN资料 svn配置SVN svn SVN中文手册 SVN资料 svn配置SVN svn SVN中文手册 SVN...
svn插件,svn插件,svn插件,svn插件,svn插件,svn插件,svn插件,svn插件,svn插件,svn插件,svn插件,svn插件,svn插件,svn插件,svn插件
svn操作手册svn操作手册svn操作手册svn操作手册svn操作手册
centos 7.9服务器 离线 搭建svn服务器 ,该文章适用于 开发人员 实施人员 项目经理用于项目文档管理 代码管理,而不指定如何在centos7.9环境下离线搭建svn服务器,因为大多数的网站只是介绍yum install 的方式,但是...
是否遇到过公司里的sx向svn提交了不该提交的文件?.sdf debug release 等等,是否对此感到崩溃?!是否svn仓库已经占用了大量的磁盘空间? 使用本图形化工具帮助你将这些文件彻底地从svn中删除。 先导出svn仓库 ...
这是最好的SVN右键清除。中文。不分版本。我下载了好多别人的,没一个能很好的用。有些根本就清 不了,有些要清两次。这个是最好用的,本人测试完全保证没问题。 我们建立SVN时经常遇到新建新的SVN项目后但是里面带...
SVN服务端SVN-Server-3.3.1-x64,SVN客户端TortoiseSVN-1.8.10-x64,SVN插件site-1.10.9,SVN客户端pdf使用说明文档. SVN客户端和eclipse SVN插件这两个版本匹配,可以实现对同一项目同时使用subeclipse和Tortoise ...
找到项目目录,右键--选择“Delete SVN Folders”,即可删除SVN信息并断开项目SVN连接
svn漏洞利用工具 .svn svn漏洞那shell svn信息查看器
破解svn密码,用于找回svn密码,直接执行exe文件,就可查看当前打开项目,用到的svn用户名和密码。
svn安装工具 svn安装文件 svn安装文件 svn安装文件 svn安装文件
svn客户端svn客户端svn客户端svn客户端svn客户端svn客户端svn客户端svn客户端svn客户端svn客户端svn客户端
DelSVN 删除svn
下面简单介绍下PLSQL developer工具的SVN版本控制 1, 下载pl/sql-svn插件。 2, 关闭你打开的所有pl/sql窗口。 3,将插件里的SVN_Plugin.dll文件复制到PLSQL DeveloperPlugIns目录下。 4,重新打开pl/sql,...
svn服务器配置 svn服务器配置 svn服务器配置 svn服务器配置