$id: name of file, date/time creation Exp $
Asked Answered
A

5

10

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"?

Ambivalence answered 6/12, 2008 at 14:7 Comment(0)
G
7

Version control systems such as CVS can produce such tags.

Grati answered 6/12, 2008 at 14:9 Comment(1)
I think that probably most tools do support including CVS, SVN (subversion), Perforce, Git, Mercurial.Forenoon
L
8

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.

Legendary answered 6/12, 2008 at 15:41 Comment(0)
G
7

Version control systems such as CVS can produce such tags.

Grati answered 6/12, 2008 at 14:9 Comment(1)
I think that probably most tools do support including CVS, SVN (subversion), Perforce, Git, Mercurial.Forenoon
P
4

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

Phoney answered 6/12, 2008 at 14:10 Comment(0)
P
3

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.

Pappose answered 6/12, 2008 at 14:19 Comment(0)
M
1

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

Mastoidectomy answered 6/12, 2008 at 15:37 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.