Mercurial - use hg log to view all ancestors

我们两清 提交于 2019-12-24 01:55:04

问题


Given changesets

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

How can I get a listing of all changesets that come before d. Ie: how can you use hg log to return a-b-c?


回答1:


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




回答2:


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.




回答3:


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.



来源:https://stackoverflow.com/questions/4797840/mercurial-use-hg-log-to-view-all-ancestors

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!