简体   繁体   中英

Redirected output of “hg status” to a file lacks newlines?

In IntelliJ Idea, I'm trying to write a changeset to a.txt file using this command:

hg status > status.txt

The status.txt file will be shared with my supervisor for review.

The command works, and the changeset is written, but no newline characters are added, so I'm getting this actual output in the file:

A file1A file2A file3R file4R file5  

As opposed to this expected output:

A file1
A file2
A file3
R file4
R file5

Is there any way to format the output to be more readable?

The two respondents were correct. Mercurial writes Unix newline characters into the output file. If you open the output file in MS Word or Notepad, you will see a jumble of text.

However, if you open it in a text editor like Notepad++, you will see a better-organized format of the output text.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM