0

edit: I'm running that command through .bat file on Windows Server 2008. When I run it from cmd, then everything is OK. So, this is in fact question about quotes in .bat files, not about mercurial. I'm changing title and tags to reflect that.

Is it possible to insert quotes into hg log --template? I tried following:

hg log -r . --template "foo = \"{latesttag}.{latesttagdistance}\""

but that just eats up the quotes. Any other way to do it?

dijxtra
  • 2,681
  • 4
  • 25
  • 37
  • Outputs fine `foo = "v2.0.45-0.44"` with quotes in bash. Presumably it's not a mercurial, but a shell you are using issue. – zerkms Jul 14 '14 at 05:17
  • You're right, I should have mentioned that. I wrote a .bat file on Windows Server 2008. – dijxtra Jul 14 '14 at 05:30

1 Answers1

0

For windows .bat files you just double double quotes character

hg log -r . --template "foo = ""{latesttag}.{latesttagdistance}"""
zerkms
  • 249,484
  • 69
  • 436
  • 539