2011-05-24 105 views
1

當我們這樣做hg log -v我們看到:更改格式的日誌-v

changeset: 2639:283fb2da345f 
parent:  2638:e06cb712d37b 
parent:  2631:d8f619046812 
user:  [email protected] 
date:  Wed Apr 13 12:29:57 2011 -0400 
files:  core/src/main/java/com/blah/boards/InvalidRateException.java core/src/main/java/com/blah/boards/InvalidException.java core/src/main/java/com/blah/area/xxx/instructions/AssignInstruction.java core/src/main/java/com/blah/area/xxx/instructions/AutoAssignInstruction.java core/src/main/java/com/blah/area/xxx/instructions/AutoDeliveryInstruction.java 
description: 
Commiting after merge 

有沒有辦法輸出文件更可讀的方式?例如:

files:  
core/src/main/java/com/blah/boards/InvalidRateException.java 
core/src/main/java/com/blah/boards/InvalidException.java 
core/src/main/java/com/blah/area/xxx/instructions/AssignInstruction.java 
core/src/main/java/com/blah/area/xxx/instructions/AutoAssignInstruction.java 
core/src/main/java/com/blah/area/xxx/instructions/AutoDeliveryInstruction.java 

回答

2

您可以通過--template選項指定自己的模板。請參閱hg help templates。你可以嘗試

hg log --template "(...) files:\n{files|stringify|fill76}\n" 
1

如果你想只是一個單一的版本,你可以使用hg status --change 2639顯示了用M,A,R爲前綴的文件列表中的文件列表中,d爲前綴,你可以通過添加--no-status標誌忽略。