开发者

Mercurial - use hg log to view all ancestors

Given changesets

a
--b
----c
------d
--------e

How can I get a listing of all chan开发者_如何学JAVAgesets that come before d. Ie: how can you use hg log to return a-b-c?


Use:

hg log -r "ancestors(d)"

This requires the revsets feature in Mercurial 1.7 and later. See hg help revsets for some great fun.


You can do hg log -r :d (but it will also display d).


hg log -r d::a

or

hg log -r a::d

This will require a reasonably recent (I believe 1.6 or later) version of Mercurial to work.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜