[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mercurial
Subject:    Re: Help, how did Mozilla do this?
From:       Martin Geisler <martin () geisler ! net>
Date:       2013-04-10 23:07:05
Message-ID: 87eheirnmu.fsf () hbox ! dyndns ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]

Content-Transfer-Encoding: quoted-printable

Johnny P <jpywtora@gmail.com> writes:

> 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".

If you really want, you can create such a merge with 'hg
debugsetparents':

  $ hg init repo
  $ cd repo
  $ echo a > a.txt
  $ hg add
  adding a.txt
  $ hg commit -m a
  $ echo b > a.txt
  $ hg commit -m b
  $ hg debugsetparents 0 1
  $ hg commit -m '"nothing to merge"-merge'
  $ hg glog
  @    changeset:   2:7981d4a1e426
  |\   tag:         tip
  | |  parent:      0:8529b0cd30c2
  | |  parent:      1:415b9c5f4a2c
  | |  user:        Martin Geisler <martin@geisler.net>
  | |  date:        Thu Apr 11 01:03:57 2013 +0200
  | |  summary:     "nothing to merge"-merge
  | |
  | o  changeset:   1:415b9c5f4a2c
  |/   user:        Martin Geisler <martin@geisler.net>
  |    date:        Thu Apr 11 01:03:31 2013 +0200
  |    summary:     b
  |
  o  changeset:   0:8529b0cd30c2
     user:        Martin Geisler <martin@geisler.net>
     date:        Thu Apr 11 01:03:24 2013 +0200
     summary:     a

This corresponds to 'git merge --no-ff', which is sometimes used when
people want to ensure that changes on a feature branch remain "grouped"
after a merge.

-- 
Martin Geisler

[Attachment #5 (application/pgp-signature)]

_______________________________________________
Mercurial mailing list
Mercurial@selenic.com
http://selenic.com/mailman/listinfo/mercurial


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic