Project

General

Profile

Index » History » Version 2

tin, 06/03/2014 18:07

1 1 tin
h1. Index
2
3
test file
4 2 tin
5
h3. Automatic version control in source files for Mercurial DVCS
6
7
Based on "Mercurial extension":http://mercurial.selenic.com/wiki/KeywordExtension
8
This extension allows the expansion of RCS/CVS-like and user defined keys in text files tracked by Mercurial. 
9
10
Modify/add to your $PROJECT$/.hg/hgrc
11
12
<pre>
13
[extensions]
14
keyword =
15
16
[keyword]
17
**.c=
18
**.h=
19
ignore_dir\**.* = ignore
20
21
[keywordmaps]
22
Tree = {branch}
23
HGdate = {date|rfc822date}
24
Project maintainers = {author}
25
Id = {file} | Rev {rev} {changelog} | {date|utcdate} {author|user}
26
Revision = {node|short}
27
</pre>
28
29
By using this mercurial will automatically look for headers in commited files and automatically modify to result like this:
30
31
32
/******************************************************************************
33
/* $Id: %{color:lime}fw/system/i2c.c | Rev 26  | 2014/03/06 09:52:46 xdevs% $
34
/* $Project maintainers: %{color:lime}xdevs.com% $
35
/* $Revision: %{color:lime}f669b607dcd1% $
36
/* $Tree: %{color:lime}default% $
37
/*
38
/* I2C Driver
39
/* Copyright (c) 2010-2014, xDevs.com Microcontroller Software Support
40
/* IAR ARM 6.5 | LPC11U38FBD64/501
41
/*
42
/*/
43
44
h3. Add color in wiki
45
46
@%{color:red}red%@ result is %{color:red}red%
47
48
@%{color:#ffee33}ffee33%@ result is %{color:#ffee33}ffee33%