Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mercurial Log of Merges Between Named Branches

Tags:

mercurial

I've got a PowerShell script that finds revisions that merged two named branches together. It loops through all the merges on a particular branch, showing changesets that have a parent on the other named branch.

Is there an hg log command that will do the equivalent? I've played around with Mercurial's revsets feature (hg help revsets), but can't seem to find the magical incantation.

like image 511
Aaron Jensen Avatar asked Jun 30 '11 01:06

Aaron Jensen


People also ask

What does hg commit do?

Use the command hg update to switch to an existing branch. Use hg commit --close-branch to mark this branch head as closed. When all heads of a branch are closed, the branch will be considered closed.

How to change branch hg?

From the main menu, select Hg | Mercurial | Update to. In the Switch Working Directory dialog that opens, specify the target working directory: To switch to another line of development, choose Branch and select the desired branch from the list.

How do I merge two branches in mercurial?

To merge two branches, you pull their heads into the same repository, update to one of them and merge the other, and then commit the result once you're happy with the merge. The resulting changeset has two parents.

What does hg push do?

Description. Push changesets from the local repository to the specified destination. This operation is symmetrical to pull: it is identical to a pull in the destination repository from the current one.


1 Answers

You can use this:

hg log --rev "merge() and branch(default) and children(branch(secondary))"

This will output all changesets that are:

  1. Merge-changesets
  2. on the default-branch
  3. A direct child of any changeset on the secondary branch
like image 63
Lasse V. Karlsen Avatar answered Sep 28 '22 07:09

Lasse V. Karlsen