Reputation: 1998
I am a git background and just moved to a project where is uses mercurial, the projects is branched with heads model.
Before pushing things to our testing server, I want to make sure that production head is one of my parents list. is there is a command for that?
Upvotes: 2
Views: 509
Reputation: 1998
actually I found a way to do so using "revsets" of mercurial.
in order to list all ancestors for specific changeset, we can use the command
hg log -r "ancestors(84e5bc6fd673)"
now in order to find specific changeset in these parents, we can use the matching function like below
hg log -r "ancestors(84e5bc6fd673) and id(hh6cjb9c48se)"
so if hh6cjb9c48se is part of 84e5bc6fd673 parents it will be printed to the terminal.
Upvotes: 2