Filenames with spaces in hg log output
Jim Hague
jim.hague at acm.org
Fri Jul 6 05:45:33 CDT 2007
On Thursday 05 July 2007 19:28, Bryan O'Sullivan wrote:
> Jim Hague wrote:
> > Is there any way to delimit filenames in hg log output so that an
> > external process can parse out the filenames containing spaces?
>
> Use a template.
>
> http://hgbook.red-bean.com/hgbookch11.html
I had already read that chapter and didn't remember seeing anything about how
to filter individual filenames rather than the whole {files} string. But
following your prompting, I went back, noticed that filenames are separated
by comma-space in the changelog style, found map-cmdline.changelog, read the
style coverage again, rummaged through cmdutil.py to work out the
possibilities, and replaced the template I was using with a style that
urlencoded each individual filename. Job done - thanks.
Do you have any plans to expand the coverage of styles to include more
reference material?
Oh, and I simply must offer my thanks and admiration for hgbook. Like many
others, I'm coming to Mercurial via CVS, Perforce and Subversion. I am sure
that the excellent Subversion book has been a very big factor in its success,
and hgbook, even with the unfinished bits, is, I think, better. The vital
explanations of branches, merges and distributed working, plus the
behind-the-scenes chapter are masterpieces of clarity and inspire great
confidence in Mercurial's quality.
--
Jim Hague - jim.hague at acm.org Never trust a computer you can't lift.
More information about the Mercurial
mailing list