开发者

Mercurial alternative to the following git log command

开发者 https://www.devze.com 2023-04-01 13:23 出处:网络
I wonder if there\'s a compatible alternative to the f开发者_如何学编程ollowing git log command in Mercurial:

I wonder if there's a compatible alternative to the f开发者_如何学编程ollowing git log command in Mercurial:

git log --pretty=oneline --parents --name-only --reverse

Thanks.


This is as close as I got with --template:

$ hg log --template "{rev}:{node|short} {parents}{desc|firstline}\n{files}\n"

Which produces:

15047:8050db40bc5a 15045:7f504202cb5c ui: pass ' ' to raw_input when prompting
mercurial/ui.py
15046:c019df62de45 15043:0bb0f807dfc3 15045:7f504202cb5c merge with stable
mercurial/commands.py mercurial/help/config.txt
15045:7f504202cb5c help/config: strip trailing whitespace
mercurial/help/config.txt

Using a style file, you can customize the way parents is printed to be the full hash and change the delimiter of files to a new line.


Got it working with the following command:

log --debug -r : --style my.style

Contents of the my.style:

changeset = "{node} {parents} {desc|firstline}\n{files}\n"
file  = "{file}\n"
parent = "{node} "

The output would be almost identical to the git command that I posted with the one exception: there will be one odd whitespace after

0

精彩评论

暂无评论...
验证码 换一张
取 消