Project

General

Profile

Index » History » Version 4

tin, 10/04/2014 00:36

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