view tests/test-absorb-strip.t @ 38917:5111d11b8719

absorb: import extension from Facebook's hg-experimental absorb is a wicked-fast command to use blame information to automatically amend edits to the correct draft revision. Originally written by Jun Wu, this import is hgext3rd/absorb/__init__.py with: * the `testedwith` value changed * the linelog import updated * some missing configitems registered * some imports reordered per check-code.py * some missing __future__ imports added per check-code.py Differential Revision: https://phab.mercurial-scm.org/D3991
author Augie Fackler <augie@google.com>
date Mon, 30 Jul 2018 14:05:56 -0400
parents
children 0b7594ada0db
line wrap: on
line source

Do not strip innocent children. See https://bitbucket.org/facebook/hg-experimental/issues/6/hg-absorb-merges-diverged-commits

  $ cat >> $HGRCPATH << EOF
  > [extensions]
  > absorb=
  > drawdag=$RUNTESTDIR/drawdag.py
  > EOF

  $ hg init
  $ hg debugdrawdag << EOF
  > E
  > |
  > D F
  > |/
  > C
  > |
  > B
  > |
  > A
  > EOF

  $ hg up E -q
  $ echo 1 >> B
  $ echo 2 >> D
  $ hg absorb
  saved backup bundle to * (glob)
  2 of 2 chunk(s) applied

  $ hg log -G -T '{desc}'
  @  E
  |
  o  D
  |
  o  C
  |
  o  B
  |
  | o  F
  | |
  | o  C
  | |
  | o  B
  |/
  o  A