Mercurial Feature request

Tom Anderson tom.anderson at timgroup.com
Fri Oct 26 15:59:24 UTC 2012


On 26/10/12 15:40, Antonio Paolini wrote:
> I'm looking for how to release a tarball and I see the "archive" 
> command. I wonder if could be possible more customization of the 
> tarball filename, not only with the export format strings but also 
> with some "template".
> I wish to obtain a name like %b-{tag}-"rev"%r-{date|shortdate}.tar.gz, 
> for example, i.e. "mysoftware-1.0rev17-2012-10-26.tar.gz.

+1

In the meantime, you could use hg log to build the format string. 
Something like:

hg archive "$(hg log -r . --template 
'%b-{tags}-rev%r-{date|shortdate}.tar.gz')"

hg log will interpret the {keywords} and leave the %directives 
untouched; hg archive will then interpret the latter.

tom

-- 

Tom Anderson | Developer | +44 20 7826 4312 | timgroup.com 
<http://timgroup.com/>

STATEMENT OF CONFIDENTIALITY: The information contained in this 
electronic message and any attachments to this message are intended for 
the exclusive use of the addressee(s) and may contain confidential or 
privileged information. If you are not the intended recipient, please 
notify Tom Anderson at TIM Group at tom.anderson at timgroup.com and 
destroy all copies of this message and any attachments.

TIM Group is the trading name for YouDevise Limited. YouDevise Limited 
is registered in England, No. 3331176. Registered office: 3 Copthall 
Avenue, London, EC2R 7BH.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20121026/2faf229d/attachment-0002.html>


More information about the Mercurial mailing list