Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| versioncontrol:dollarfreebsd [2006/09/27 13:55] – NikClayton | versioncontrol:dollarfreebsd [2022/10/07 01:39] (current) – Move bakeoff stuff under a single namespace KubilayKocak | ||
|---|---|---|---|
| Line 13: | Line 13: | ||
| ===== SVN Implementation ===== | ===== SVN Implementation ===== | ||
| + | |||
| + | This is [[http:// | ||
| ===== Hg Implementation ===== | ===== Hg Implementation ===== | ||
| + | Hg by default does no keyword expansion at all. There are practical reasons not to do this (including the fact that it does complicates the job of the VCS) but it is seen as %%FreeBSD%% developers as a useful feature. | ||
| + | |||
| + | This allow for the hash of the changeset that touched a file last to be inserted in the file like $Id$. | ||
| + | |||
| + | Like git, hg does have some commands to give information about files and revisions: '' | ||
| ===== Git Implementation ===== | ===== Git Implementation ===== | ||
| Line 20: | Line 27: | ||
| For discussing revisions in debugging, '' | For discussing revisions in debugging, '' | ||
| + | |||
| + | There has been recent work to add checkout hooks to git which would make it easy to have keyword expansion on checkout which could then be compiled into a file and identified with ident(1) or what(1). | ||
| + | |||
| + | Recent commits to the git repository have added support for receive and checkout filters which have added support for imploding an exploding an $ident$ keyword. So git can now support this. | ||
| + | |||
| + | ===== Monotone Implementation ===== | ||
| + | **Partially Supported** | ||
| + | (also see [[http:// | ||
| + | |||
| + | Monotone does not directly support automatic expansion of version strings or other keywords inside file content. | ||
| + | |||
| + | Some of the cases where this kind of feature is used in other systems are better addressed by other mechanisms in monotone; the first requirement (see which revision a source file is at) is actually very easy: the file's SHA-1 hash **is** the version itself, so having the id in the file itself is not needed to identify unchanged files. | ||
| + | |||
| + | It is possible to approximate this feature, if needed, using hooks. A custom attr could be attached to files that need such expansion, and an attr-hook defined in lua to perform the substitution. | ||