tests/test-absorb-strip.t
author Gregory Szorc <gregory.szorc@gmail.com>
Wed, 05 Sep 2018 09:04:40 -0700
changeset 39486 43d92d68ac88
parent 38917 5111d11b8719
child 39667 0b7594ada0db
permissions -rw-r--r--
wireprotov2peer: properly format errors formatrichmessage() expects an iterable containing dicts with well-defined keys. We were passing in something else. This caused an exception. Change the code to call formatrichmessage() with the proper argument. And add a TODO to potentially emit the proper data structure from the server in the first place. Differential Revision: https://phab.mercurial-scm.org/D4441

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