How do you find the parent of a named mercurial branch?

Thanks for the revset examples. I fiddled around and found this solution that I kind of like:

hg log -r "parents(min(branch(foo)))"

which will print the revision that the first commit on the foo branch was based on. You can look for the branch (or lack thereof indicating the default branch) in that changeset and that is the parent branch of foo (at least the way parent branch is defined in the question).

But I have this nagging feeling…parents() could return more than one changeset. Could the first commit on a branch ever have two parents? I can’t think of how that could happen.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)