Hi,<div><br></div><div>I&#39;ve attached a small patch that adds multiple line keyword expansion to the keyword extension. I don&#39;t know if it will have wide enough appeal to warrant being included, but I thought I&#39;d offer it up for consideration. The patch is made against keyword.py in the 1.0.1 mercurial release.</div>
<div><br></div><div>The idea was to allow me to manage separate repositories with different source code licenses, and to still be able to push changesets between them without the license differences getting pushed between repositories.</div>
<div><br></div><div>RCS style expansions work as before (and are also functional within multiline expansions).</div><div><br></div><div>The markers for the beginning and end of the expanded block are similar in style to emacs local variable blocks (Begin XYZ: to End:).</div>
<div><br></div><div>Cheers,</div><div>Toby.</div><div><br></div><div>As an example, my .hg/hgrc file for the GPL&#39;ed version of my code contains:</div><div><br></div><div><div>[extensions]</div><div>hglocal.keyword=</div>
<div><br></div><div>[keyword]</div><div>**.cpp=</div><div>**.hpp=</div><div><br></div><div>[longkeywordmaps]<br></div><div>License = \</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;// Copyright (C) 2006-2008 Tobias Sargeant (<a href="mailto:tobias.sargeant@gmail.com">tobias.sargeant@gmail.com</a>).</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;// All rights reserved.</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;//</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;// This file is part of the Carve CSG Library (<a href="http://carve-csg.com/">http://carve-csg.com/</a>)</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;//</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;// This file may be used under the terms of the GNU General Public</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;// License version 2.0 as published by the Free Software Foundation</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;// and appearing in the file LICENSE.GPL2 included in the packaging of</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;// this file.</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;//</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;// This file is provided &quot;AS IS&quot; with NO WARRANTY OF ANY KIND,</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;// INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;// A PARTICULAR PURPOSE.</div>
<div><br></div><div>and this means that:</div><div><br></div><div><div>// Begin License:</div><div>// End:<br></div><div><br></div><div>is expanded to:</div><div><br></div><div><div>// Begin License:</div><div>// Copyright (C) 2006-2008 Tobias Sargeant (<a href="mailto:tobias.sargeant@gmail.com">tobias.sargeant@gmail.com</a>).</div>
<div>// All rights reserved.</div><div>//</div><div>// This file is part of the Carve CSG Library (<a href="http://carve-csg.com/">http://carve-csg.com/</a>)</div><div>//</div><div>// This file may be used under the terms of the GNU General Public</div>
<div>// License version 2.0 as published by the Free Software Foundation</div><div>// and appearing in the file LICENSE.GPL2 included in the packaging of</div><div>// this file.</div><div>//</div><div>// This file is provided &quot;AS IS&quot; with NO WARRANTY OF ANY KIND,</div>
<div>// INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR</div><div>// A PARTICULAR PURPOSE.</div><div>// End:</div><div><br></div></div></div></div>