1

I'm fiddling around with the hg log command to store the mercurial messages in a file, such as this (lines broken for readability):

hg log --template "Rev. {rev} from {date|rfc822date}:
    \r\n--------------------------------------------
    \r\n\t{desc|strip|fill68|tabindent}\r\n\r\n\r\n" > hglog.txt

The problem is with the fill68 filter which breaks lines after 68 chars. In theory, that is, because those line breaks are Unix line breaks and are not displayed in Notepad.

Is there a way to replace \n with \r\n, by piping hg log's output through another command maybe?

I wish to run this command in an automated VS post-build script, so I can't do this manually.

Felix Dombek
  • 13,664
  • 17
  • 79
  • 131

1 Answers1

1

From Windows you can invoke the MORE command as specified here:

hg log ... | more /p > hglog.txt
Community
  • 1
  • 1
neif
  • 480
  • 7
  • 13