tests/test-absorb-strip.t
author Matt Harbison <matt_harbison@yahoo.com>
Wed, 19 Dec 2018 14:51:21 -0500
changeset 41013 87c98ffbc8c7
parent 40190 31dfa7dac4c9
child 41817 c91321e86071
permissions -rw-r--r--
py3: use bytes stdout in hghave.py This fixes a failure in test-run-tests.t around notarealhghavefeature. It seems crazy to me that all of this needs to be adjusted in all of these tests, but the line as run-tests.py sees it in _processoutput() before doing anything is already mangled with a trailing '\r'. Switching to normalizenewlines=True for TTest works, but I'm sure that breaks other stuff.

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=$TESTDIR/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 -a
  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