Mercurial - using hg log to view all ancestors

Change data

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

How can I get a list of all the change sets that appear before d. That is: how can you use hg log to return abc?

+2
source share
3 answers

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

+3
source

Using:

hg log -r "ancestors(d)"

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

+7
source
hg log -r d::a

or

hg log -r a::d

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

+3
source

Source: https://habr.com/ru/post/1788240/


All Articles