Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to detect if changes from a branch has been indirectly merged with another?

Tags:

mercurial

Let's say we have three named branches A, B and C. Is there a (non ocular) way to detect that changes from C has made it into A?

A ----------------------------
  | \              /
B |  \------------/
  |           /
C  \---------/ -------  
like image 615
MdaG Avatar asked Dec 21 '10 12:12

MdaG


People also ask

How do you check if a branch was merged into another branch?

You can use the git merge-base command to find the latest common commit between the two branches. If that commit is the same as your branch head, then the branch has been completely merged.

What happens to a branch once it has been merged into another?

When you perform a merge, you effectively merge one branch into another—typically a feature branch or bug fix branch into a main branch such as master or develop. Not only will the code changes get merged in, but also all the commits that went into the feature branch.

How do you confirm if git branch has merged into master?

Step 3 − Check status of the merged and not merged branches from master using option --merged and --no-merged. The command and output are shown below. From the output it is clear that the branches bugfix and feature are to be merged to the master branch.

How do you know if there are merge conflicts?

To see the beginning of the merge conflict in your file, search the file for the conflict marker <<<<<<< . When you open the file in your text editor, you'll see the changes from the HEAD or base branch after the line <<<<<<< HEAD .


1 Answers

Starting with Mercurial 1.6.0, you can use revsets to find this:

hg log -r "ancestors(A) and branch(C)"

This shows all the ancestors of A that are on the C branch. You can use templating to extract exactly the information you need from the log entries.

See hg help revsets for full details.

like image 195
Niall C. Avatar answered Nov 15 '22 07:11

Niall C.