Help, how did Mozilla do this?
Benjamin Pollack
benjamin at bitquabit.com
Wed Apr 10 20:25:34 UTC 2013
On Apr 10, 2013, at 4:14 PM, Benjamin Smedberg <benjamin at smedbergs.us> wrote:
> On 4/10/2013 3:49 PM, Johnny P wrote:
>> Ref: http://hg.mozilla.org/integration/gaia/graph
>>
>> In the picture below I found Mozilla's mercurial repository graph with a situation that I thought was not possible. They have two commits that have the same parent where one is a merge. I have wanted to do this, but cannot find an answer on how to, can anyone help?
>>
>> @ merge pull request from foo polish text
>> |\
>> | o bug 1 - add text ...
>> |/
>> o merge pull request from bar bug 2
>>
>> How did they get this to occur? Usually when you pull changes in that add onto the head, if you attempt to merge you get "nothing to merge".
> The "native" repository for gaia is the git repository, and what you are viewing here is an hg mirror of git. Git merge --no-ff will generate this kind of merge, and it is the default kind of merge performed by the github UI for pull requests.
>
> I suspect that the git->hg conversion just kept the merge even though it isn't possible using native hg.
It actually is possible to do this in native, modern Mercurial if you use named branches. But you're right about the origin.
In Kiln Harmony, we actually flatten out this situation so that the DAG is less confusing. You can still end up with empty diffs, but at least the DAG makes a bit more sense than this does. The downside is that then *Git* users get confused about what the Mercurial graph they're looking at actually means.
Almost-but-not-quite-orthogonal systems are a ton of fun.
--Benjamin
More information about the Mercurial
mailing list