view tests/test-evolve-effectflags.t @ 2449:0b05142117d2

effectflag: detect parent change Add the detection of parent changes.
author Boris Feld <boris.feld@octobus.net>
date Fri, 19 May 2017 19:52:57 +0200
parents 66f05d5f4769
children 98613938d098
line wrap: on
line source

Test the 'effect-flags' feature

Global setup
============

  $ . $TESTDIR/testlib/common.sh
  $ cat >> $HGRCPATH <<EOF
  > [ui]
  > interactive = true
  > [phases]
  > publish=False
  > [extensions]
  > evolve =
  > rebase =
  > [experimental]
  > evolution.effect-flags = 1
  > EOF

  $ hg init $TESTTMP/effect-flags
  $ cd $TESTTMP/effect-flags
  $ mkcommit ROOT

amend touching the description only
-----------------------------------

  $ mkcommit A0
  $ hg amend -m "A1"

check result

  $ hg debugobsolete --rev .
  471f378eab4c5e25f6c77f785b27c936efb22874 fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e 0 (*) {'ef1': '1', 'user': 'test'} (glob)
  $ hg obslog .
  @  fdf9bde5129a (2) A1
  |
  x  471f378eab4c (1) A0
       rewritten by test (*) as fdf9bde5129a (glob)
  

amend touching the metadata only
--------------------------------

  $ mkcommit B0
  $ hg amend -u "bob <bob@bob.com>"

check result

  $ hg debugobsolete --rev .
  ef4a313b1e0ade55718395d80e6b88c5ccd875eb 5485c92d34330dac9d7a63dc07e1e3373835b964 0 (*) {'ef1': '2', 'user': 'test'} (glob)
  $ hg obslog .
  @  5485c92d3433 (4) B0
  |
  x  ef4a313b1e0a (3) B0
       rewritten by test (*) as 5485c92d3433 (glob)
  
rebase (parents change)
-----------------------

  $ mkcommit C0
  $ mkcommit D0
  $ hg rebase -r . -d 'desc(B0)'
  rebasing 6:2ee0a31bd600 "D0" (tip)

check result

  $ hg debugobsolete --rev .
  2ee0a31bd600ca999a5e6e69bfdfde3f9c78a6f9 131ac3eecd92fb2dfd2fc59bb5e0b8efbe9e9201 0 (*) {'ef1': '4', 'user': 'test'} (glob)
  $ hg obslog .
  @  131ac3eecd92 (7) D0
  |
  x  2ee0a31bd600 (6) D0
       rewritten by test (*) as 131ac3eecd92 (glob)