tests/test-absorb-strip.t
author Gregory Szorc <gregory.szorc@gmail.com>
Tue, 28 Aug 2018 18:05:08 -0700
changeset 39446 36f487a332ad
parent 38917 5111d11b8719
child 39667 0b7594ada0db
permissions -rw-r--r--
wireprotoframing: use our CBOR module Tests changed because our CBOR encoder appears to sort map keys differently from the vendored CBOR package. The CBOR specification does define canonical sorting rules for keys based on the byte values. I'm guessing our implementation doesn't follow them. But our encoder doesn't guarantee that it conforms with the canonical specification. Right now, we just care that output is deterministic. And our encoder does guarantee that. Differential Revision: https://phab.mercurial-scm.org/D4466

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