Project

General

Profile

Index » History » Revision 3

Revision 2 (tin, 03/06/2014 06:07 PM) → Revision 3/4 (tin, 03/06/2014 06:11 PM)

h1. Index 

 test file 

 h3. Automatic version control in source files for Mercurial DVCS 

 Based on "Mercurial extension":http://mercurial.selenic.com/wiki/KeywordExtension 
 This extension allows the expansion of RCS/CVS-like and user defined keys in text files tracked by Mercurial.  

 Modify/add to your $PROJECT$/.hg/hgrc 

 <pre> 
 [extensions] 
 keyword = 

 [keyword] 
 **.c= 
 **.h= 
 ignore_dir\**.* = ignore 

 [keywordmaps] 
 Tree = {branch} 
 HGdate = {date|rfc822date} 
 Project maintainers = {author} 
 Id = {file} | Rev {rev} {changelog} | {date|utcdate} {author|user} 
 Revision = {node|short} 
 </pre> 

 By using this mercurial will automatically look for headers in commited files and automatically modify to result like this: 


 /****************************************************************************** 
 /* $Id: %{color:lime}fw/system/i2c.c | Rev 26    | 2014/03/06 09:52:46 xdevs% $ 
 /* $Project maintainers: %{color:lime}xdevs.com% $ 
 /* $Revision: %{color:lime}f669b607dcd1% $ 
 /* $Tree: %{color:lime}default% $ 
 /* 
 /* I2C Driver 
 /* Copyright (c) 2010-2014, xDevs.com Microcontroller Software Support 
 /* IAR ARM 6.5 | LPC11U38FBD64/501 
 /* 
 /*/ 

 http://hgbook.red-bean.com/read/customizing-the-output-of-mercurial.html 

 h3. Add color in wiki 

 @%{color:red}red%@ result is %{color:red}red% 

 @%{color:#ffee33}ffee33%@ result is %{color:#ffee33}ffee33%