transplant's --merge flag, was: Re: Combining history of two branches

Nicolas Schier schier at shf.de
Thu May 7 00:44:43 CDT 2009


Martin Geisler <mg at lazybytes.net> schrieb:
> [...]
>
> I just tried with a simple test and transplant *didn't* transplant the
> merges. There is a --merge flag, but I don't really understand what the
> help says about it:
>
>     You can optionally mark selected transplanted changesets as merge
>     changesets. You will not be prompted to transplant any ancestors of
>     a merged transplant, and you can merge descendants of them normally
>     instead of transplanting them.
>

Transplanting a changeset using the --merge flag changes the 'hg glog'
output from:

   ~/test# hg glog
   @  changeset:   2:aff985fa61bf
   |  tag:         tip
   |  parent:      0:1e240dde6ff8
   |  user:        Nicolas Schier <schier at shf.de>
   |  date:        Do Mai 07 07:40:53 2009 +0200
   |  summary:     created file3
   |
   | o  changeset:   1:96716f9bac14
   |/   user:        Nicolas Schier <schier at shf.de>
   |    date:        Do Mai 07 07:40:29 2009 +0200
   |    summary:     created file2
   |
   o  changeset:   0:1e240dde6ff8
      user:        Nicolas Schier <schier at shf.de>
      date:        Do Mai 07 07:40:04 2009 +0200
      summary:     created file

to:

   ~/test# hg transplant --merge 1
   applying 96716f9bac14
   1:96716f9bac14 merged at 672d6c818d9a
   ~/test# hg glog
   @    changeset:   3:672d6c818d9a
   |\   tag:         tip
   | |  parent:      2:aff985fa61bf
   | |  parent:      1:96716f9bac14
   | |  user:        Nicolas Schier <schier at shf.de>
   | |  date:        Do Mai 07 07:40:29 2009 +0200
   | |  summary:     created file2
   | |
   | o  changeset:   2:aff985fa61bf
   | |  parent:      0:1e240dde6ff8
   | |  user:        Nicolas Schier <schier at shf.de>
   | |  date:        Do Mai 07 07:40:53 2009 +0200
   | |  summary:     created file3
   | |
   o |  changeset:   1:96716f9bac14
   |/   user:        Nicolas Schier <schier at shf.de>
   |    date:        Do Mai 07 07:40:29 2009 +0200
   |    summary:     created file2
   |
   o  changeset:   0:1e240dde6ff8
      user:        Nicolas Schier <schier at shf.de>
      date:        Do Mai 07 07:40:04 2009 +0200
      summary:     created file
   
You can see where your transplanted changeset came from. I think that is
the main point of the --merge flag.

Regards,
Nicolas




More information about the Mercurial mailing list