$id:文件名、创建日期/时间 Exp $

发布于 2024-07-10 01:58:18 字数 185 浏览 7 评论 0原文

我经常在 C/C++ 源代码中遇到以下语句:

$Id: lzio.c,v 1.24 2003/03/20 16:00:56 roberto Exp $

$Id: file name, version, timestamp, creator Exp $

你知道哪个软件产生这些“签名”吗?

Frequently I come across the following statements in C/C++ source code:

$Id: lzio.c,v 1.24 2003/03/20 16:00:56 roberto Exp $

$Id: file name, version, timestamp, creator Exp $

Have you got any idea which software produces those "signatures"?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

旧城烟雨 2024-07-17 01:58:18

Subversion 中的关键字替换会产生这种排序信息,特别是 ID:

ID

该关键字是其他关键字的压缩组合。 它是
替换看起来像 $Id:
calc.c 148 2006-07-28 21:30:43Z 莎莉
$,并被解释为意味着
文件 calc.c 最后更改于
7月晚上修订148
2006 年 2 月 28 日,由用户 sally 发布。

你可以告诉 subversion 使用 svn:keywords 插入这些值

告诉 Subversion 是否
替换特定的关键字
文件,我们再次转向
与属性相关的子命令。 这
svn:keywords 属性,当设置在
版本化文件,控制哪些
关键字将被替换
文件。 该值是以空格分隔的
关键字名称或别名的列表
在上表中找到

您还可以通过编辑配置来自动进行这些替换:

Subversion 还提供
自动道具功能,它可以让你
创建文件名映射
属性名称和值的模式。
这些映射是在您的
运行时配置区。 他们又
不仅影响添加和进口
可以覆盖任何默认的 MIME 类型
Subversion 期间做出的决定
这些操作,他们还可以设置
额外的 Subversion 或自定义
属性也一样。 例如,你
可能会创建一个映射来表示
每当您添加 JPEG 文件时,
匹配模式*.jpg—颠覆
应该自动设置
这些文件上的 svn:mime-type 属性
到图像/jpeg。 或者也许是任何文件
匹配 *.cpp 应该有
svn:eol-style 设置为 native,并且
svn:keywords 设置为 Id。 自动螺旋桨
支持也许是最方便的
中的财产相关工具
颠覆工具箱。 参见 参考资料 部分
称为“配置”以了解更多信息
配置该支持。

Keyword substitution in subversion produces this sort of information, in particular Id:

Id

This keyword is a compressed combination of the other keywords. Its
substitution looks something like $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.

You can tell subversion to insert these values using svn:keywords

To tell Subversion whether or not to
substitute keywords on a particular
file, we again turn to the
property-related subcommands. The
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 the keyword names or aliases
found in the previous table

You can also make these substitutions automatic by editing your config:

Subversion also provides the
auto-props feature, which allows you
to create mappings of filename
patterns to property names and values.
These mappings are made in your
runtime configuration area. They again
affect adds and imports, and not only
can override any default MIME type
decision made by Subversion during
those operations, they can also set
additional Subversion or custom
properties, too. For example, you
might create a mapping that says that
any time you add JPEG files—ones that
match the pattern *.jpg—Subversion
should automatically set the
svn:mime-type property on those files
to image/jpeg. Or perhaps any files
that match *.cpp should have
svn:eol-style set to native, and
svn:keywords set to Id. Auto-prop
support is perhaps the handiest
property related tool in the
Subversion toolbox. See the section
called “Config” for more about
configuring that support.

绝影如岚 2024-07-17 01:58:18

诸如CVS之类的版本控制系统可以产生这样的标签。

Version control systems such as CVS can produce such tags.

岁月染过的梦 2024-07-17 01:58:18

RCS 和 CVS 都生成看起来完全一样的字符串。

Both RCS and CVS produce strings that look exactly like that.

泪眸﹌ 2024-07-17 01:58:18

我见过一些 vim 设置可以神奇地自动填充这些值。 SVN 可以在提交前和提交后挂钩上获取这些值,以填充提交日志中的默认信息。

I've seen a few vim setups that will auto-magically populate these values. SVN can grab these values on pre and post commit hooks to fill default information in commit logs.

沉默的熊 2024-07-17 01:58:18

Perforce 支持其中一些关键字(不确定全部)。

Perforce supports some (not sure about all) of those key words.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文