tests/test-evolve-effectflags.t
author Pierre-Yves David <pierre-yves.david@octobus.net>
Mon, 22 May 2017 16:01:59 +0200
changeset 2470 5d015dfd7753
parent 2453 ad08aedf25ac
child 2492 c9f1118b33d6
permissions -rw-r--r--
compat: merge with stable Stable has multiple changeset that solve deprecation warning for the future Mercurial 4.3.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2446
4b2f4da124a2 effectflag: allow to save effect of change in obsmarkers
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
     1
Test the 'effect-flags' feature
4b2f4da124a2 effectflag: allow to save effect of change in obsmarkers
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
     2
4b2f4da124a2 effectflag: allow to save effect of change in obsmarkers
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
     3
Global setup
4b2f4da124a2 effectflag: allow to save effect of change in obsmarkers
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
     4
============
4b2f4da124a2 effectflag: allow to save effect of change in obsmarkers
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
     5
4b2f4da124a2 effectflag: allow to save effect of change in obsmarkers
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
     6
  $ . $TESTDIR/testlib/common.sh
4b2f4da124a2 effectflag: allow to save effect of change in obsmarkers
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
     7
  $ cat >> $HGRCPATH <<EOF
4b2f4da124a2 effectflag: allow to save effect of change in obsmarkers
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
     8
  > [ui]
4b2f4da124a2 effectflag: allow to save effect of change in obsmarkers
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
     9
  > interactive = true
4b2f4da124a2 effectflag: allow to save effect of change in obsmarkers
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    10
  > [phases]
4b2f4da124a2 effectflag: allow to save effect of change in obsmarkers
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    11
  > publish=False
4b2f4da124a2 effectflag: allow to save effect of change in obsmarkers
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    12
  > [extensions]
4b2f4da124a2 effectflag: allow to save effect of change in obsmarkers
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    13
  > evolve =
2449
0b05142117d2 effectflag: detect parent change
Boris Feld <boris.feld@octobus.net>
parents: 2448
diff changeset
    14
  > rebase =
2446
4b2f4da124a2 effectflag: allow to save effect of change in obsmarkers
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    15
  > [experimental]
4b2f4da124a2 effectflag: allow to save effect of change in obsmarkers
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    16
  > evolution.effect-flags = 1
4b2f4da124a2 effectflag: allow to save effect of change in obsmarkers
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    17
  > EOF
4b2f4da124a2 effectflag: allow to save effect of change in obsmarkers
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    18
4b2f4da124a2 effectflag: allow to save effect of change in obsmarkers
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    19
  $ hg init $TESTTMP/effect-flags
4b2f4da124a2 effectflag: allow to save effect of change in obsmarkers
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    20
  $ cd $TESTTMP/effect-flags
4b2f4da124a2 effectflag: allow to save effect of change in obsmarkers
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    21
  $ mkcommit ROOT
4b2f4da124a2 effectflag: allow to save effect of change in obsmarkers
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    22
2447
631ccf45f0bb effect-flag: rework existing test to prepare for mor tests
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2446
diff changeset
    23
amend touching the description only
631ccf45f0bb effect-flag: rework existing test to prepare for mor tests
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2446
diff changeset
    24
-----------------------------------
2446
4b2f4da124a2 effectflag: allow to save effect of change in obsmarkers
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    25
4b2f4da124a2 effectflag: allow to save effect of change in obsmarkers
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    26
  $ mkcommit A0
4b2f4da124a2 effectflag: allow to save effect of change in obsmarkers
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    27
  $ hg amend -m "A1"
4b2f4da124a2 effectflag: allow to save effect of change in obsmarkers
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    28
4b2f4da124a2 effectflag: allow to save effect of change in obsmarkers
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    29
check result
4b2f4da124a2 effectflag: allow to save effect of change in obsmarkers
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    30
2447
631ccf45f0bb effect-flag: rework existing test to prepare for mor tests
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2446
diff changeset
    31
  $ hg debugobsolete --rev .
2446
4b2f4da124a2 effectflag: allow to save effect of change in obsmarkers
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    32
  471f378eab4c5e25f6c77f785b27c936efb22874 fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e 0 (*) {'ef1': '1', 'user': 'test'} (glob)
4b2f4da124a2 effectflag: allow to save effect of change in obsmarkers
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    33
  $ hg obslog .
4b2f4da124a2 effectflag: allow to save effect of change in obsmarkers
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    34
  @  fdf9bde5129a (2) A1
4b2f4da124a2 effectflag: allow to save effect of change in obsmarkers
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    35
  |
4b2f4da124a2 effectflag: allow to save effect of change in obsmarkers
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    36
  x  471f378eab4c (1) A0
2453
ad08aedf25ac obshistory: display informations from the obs marker effect flag
Boris Feld <boris.feld@octobus.net>
parents: 2452
diff changeset
    37
       rewritten(description) by test (*) as fdf9bde5129a (glob)
2446
4b2f4da124a2 effectflag: allow to save effect of change in obsmarkers
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    38
  
2448
66f05d5f4769 effectflag: detect meta changes
Boris Feld <boris.feld@octobus.net>
parents: 2447
diff changeset
    39
66f05d5f4769 effectflag: detect meta changes
Boris Feld <boris.feld@octobus.net>
parents: 2447
diff changeset
    40
amend touching the metadata only
66f05d5f4769 effectflag: detect meta changes
Boris Feld <boris.feld@octobus.net>
parents: 2447
diff changeset
    41
--------------------------------
66f05d5f4769 effectflag: detect meta changes
Boris Feld <boris.feld@octobus.net>
parents: 2447
diff changeset
    42
66f05d5f4769 effectflag: detect meta changes
Boris Feld <boris.feld@octobus.net>
parents: 2447
diff changeset
    43
  $ mkcommit B0
66f05d5f4769 effectflag: detect meta changes
Boris Feld <boris.feld@octobus.net>
parents: 2447
diff changeset
    44
  $ hg amend -u "bob <bob@bob.com>"
66f05d5f4769 effectflag: detect meta changes
Boris Feld <boris.feld@octobus.net>
parents: 2447
diff changeset
    45
66f05d5f4769 effectflag: detect meta changes
Boris Feld <boris.feld@octobus.net>
parents: 2447
diff changeset
    46
check result
66f05d5f4769 effectflag: detect meta changes
Boris Feld <boris.feld@octobus.net>
parents: 2447
diff changeset
    47
66f05d5f4769 effectflag: detect meta changes
Boris Feld <boris.feld@octobus.net>
parents: 2447
diff changeset
    48
  $ hg debugobsolete --rev .
66f05d5f4769 effectflag: detect meta changes
Boris Feld <boris.feld@octobus.net>
parents: 2447
diff changeset
    49
  ef4a313b1e0ade55718395d80e6b88c5ccd875eb 5485c92d34330dac9d7a63dc07e1e3373835b964 0 (*) {'ef1': '2', 'user': 'test'} (glob)
66f05d5f4769 effectflag: detect meta changes
Boris Feld <boris.feld@octobus.net>
parents: 2447
diff changeset
    50
  $ hg obslog .
66f05d5f4769 effectflag: detect meta changes
Boris Feld <boris.feld@octobus.net>
parents: 2447
diff changeset
    51
  @  5485c92d3433 (4) B0
66f05d5f4769 effectflag: detect meta changes
Boris Feld <boris.feld@octobus.net>
parents: 2447
diff changeset
    52
  |
66f05d5f4769 effectflag: detect meta changes
Boris Feld <boris.feld@octobus.net>
parents: 2447
diff changeset
    53
  x  ef4a313b1e0a (3) B0
2453
ad08aedf25ac obshistory: display informations from the obs marker effect flag
Boris Feld <boris.feld@octobus.net>
parents: 2452
diff changeset
    54
       rewritten(meta) by test (*) as 5485c92d3433 (glob)
2448
66f05d5f4769 effectflag: detect meta changes
Boris Feld <boris.feld@octobus.net>
parents: 2447
diff changeset
    55
  
2453
ad08aedf25ac obshistory: display informations from the obs marker effect flag
Boris Feld <boris.feld@octobus.net>
parents: 2452
diff changeset
    56
2449
0b05142117d2 effectflag: detect parent change
Boris Feld <boris.feld@octobus.net>
parents: 2448
diff changeset
    57
rebase (parents change)
0b05142117d2 effectflag: detect parent change
Boris Feld <boris.feld@octobus.net>
parents: 2448
diff changeset
    58
-----------------------
0b05142117d2 effectflag: detect parent change
Boris Feld <boris.feld@octobus.net>
parents: 2448
diff changeset
    59
0b05142117d2 effectflag: detect parent change
Boris Feld <boris.feld@octobus.net>
parents: 2448
diff changeset
    60
  $ mkcommit C0
0b05142117d2 effectflag: detect parent change
Boris Feld <boris.feld@octobus.net>
parents: 2448
diff changeset
    61
  $ mkcommit D0
0b05142117d2 effectflag: detect parent change
Boris Feld <boris.feld@octobus.net>
parents: 2448
diff changeset
    62
  $ hg rebase -r . -d 'desc(B0)'
0b05142117d2 effectflag: detect parent change
Boris Feld <boris.feld@octobus.net>
parents: 2448
diff changeset
    63
  rebasing 6:2ee0a31bd600 "D0" (tip)
0b05142117d2 effectflag: detect parent change
Boris Feld <boris.feld@octobus.net>
parents: 2448
diff changeset
    64
0b05142117d2 effectflag: detect parent change
Boris Feld <boris.feld@octobus.net>
parents: 2448
diff changeset
    65
check result
0b05142117d2 effectflag: detect parent change
Boris Feld <boris.feld@octobus.net>
parents: 2448
diff changeset
    66
0b05142117d2 effectflag: detect parent change
Boris Feld <boris.feld@octobus.net>
parents: 2448
diff changeset
    67
  $ hg debugobsolete --rev .
0b05142117d2 effectflag: detect parent change
Boris Feld <boris.feld@octobus.net>
parents: 2448
diff changeset
    68
  2ee0a31bd600ca999a5e6e69bfdfde3f9c78a6f9 131ac3eecd92fb2dfd2fc59bb5e0b8efbe9e9201 0 (*) {'ef1': '4', 'user': 'test'} (glob)
0b05142117d2 effectflag: detect parent change
Boris Feld <boris.feld@octobus.net>
parents: 2448
diff changeset
    69
  $ hg obslog .
0b05142117d2 effectflag: detect parent change
Boris Feld <boris.feld@octobus.net>
parents: 2448
diff changeset
    70
  @  131ac3eecd92 (7) D0
0b05142117d2 effectflag: detect parent change
Boris Feld <boris.feld@octobus.net>
parents: 2448
diff changeset
    71
  |
0b05142117d2 effectflag: detect parent change
Boris Feld <boris.feld@octobus.net>
parents: 2448
diff changeset
    72
  x  2ee0a31bd600 (6) D0
2453
ad08aedf25ac obshistory: display informations from the obs marker effect flag
Boris Feld <boris.feld@octobus.net>
parents: 2452
diff changeset
    73
       rewritten(parent) by test (*) as 131ac3eecd92 (glob)
2449
0b05142117d2 effectflag: detect parent change
Boris Feld <boris.feld@octobus.net>
parents: 2448
diff changeset
    74
  
2450
98613938d098 effectflag: basic diff change detection
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2449
diff changeset
    75
98613938d098 effectflag: basic diff change detection
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2449
diff changeset
    76
amend touching the diff
98613938d098 effectflag: basic diff change detection
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2449
diff changeset
    77
-----------------------
98613938d098 effectflag: basic diff change detection
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2449
diff changeset
    78
98613938d098 effectflag: basic diff change detection
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2449
diff changeset
    79
  $ mkcommit E0
98613938d098 effectflag: basic diff change detection
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2449
diff changeset
    80
  $ echo 42 >> E0
98613938d098 effectflag: basic diff change detection
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2449
diff changeset
    81
  $ hg amend
98613938d098 effectflag: basic diff change detection
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2449
diff changeset
    82
98613938d098 effectflag: basic diff change detection
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2449
diff changeset
    83
check result
98613938d098 effectflag: basic diff change detection
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2449
diff changeset
    84
98613938d098 effectflag: basic diff change detection
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2449
diff changeset
    85
  $ hg debugobsolete --rev .
98613938d098 effectflag: basic diff change detection
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2449
diff changeset
    86
  5734caf1004261ffc2ed05763b82bf9d75ba3788 0 {f75604747b4fd2dfebe7f48c6e629aea15e3b237} (*) {'ef1': '0', 'user': 'test'} (glob)
98613938d098 effectflag: basic diff change detection
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2449
diff changeset
    87
  f75604747b4fd2dfebe7f48c6e629aea15e3b237 bed7e49faeb8ae06649b547a755d50f5bb0be220 0 (*) {'ef1': '8', 'user': 'test'} (glob)
98613938d098 effectflag: basic diff change detection
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2449
diff changeset
    88
  $ hg obslog .
98613938d098 effectflag: basic diff change detection
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2449
diff changeset
    89
  @  bed7e49faeb8 (10) E0
98613938d098 effectflag: basic diff change detection
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2449
diff changeset
    90
  |
98613938d098 effectflag: basic diff change detection
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2449
diff changeset
    91
  x  f75604747b4f (8) E0
2453
ad08aedf25ac obshistory: display informations from the obs marker effect flag
Boris Feld <boris.feld@octobus.net>
parents: 2452
diff changeset
    92
       rewritten(content) by test (*) as bed7e49faeb8 (glob)
2450
98613938d098 effectflag: basic diff change detection
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2449
diff changeset
    93
  
2451
5dc7294327ed effectflag: add test combining multiple flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2450
diff changeset
    94
5dc7294327ed effectflag: add test combining multiple flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2450
diff changeset
    95
amend with multiple effect (desc and meta)
5dc7294327ed effectflag: add test combining multiple flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2450
diff changeset
    96
-------------------------------------------
5dc7294327ed effectflag: add test combining multiple flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2450
diff changeset
    97
5dc7294327ed effectflag: add test combining multiple flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2450
diff changeset
    98
  $ mkcommit F0
5dc7294327ed effectflag: add test combining multiple flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2450
diff changeset
    99
  $ hg amend -m F1 -u "bob <bob@bob.com>"
5dc7294327ed effectflag: add test combining multiple flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2450
diff changeset
   100
5dc7294327ed effectflag: add test combining multiple flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2450
diff changeset
   101
check result
5dc7294327ed effectflag: add test combining multiple flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2450
diff changeset
   102
5dc7294327ed effectflag: add test combining multiple flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2450
diff changeset
   103
  $ hg debugobsolete --rev .
2452
d3844cdc202a test: add (glob) to globed line
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2451
diff changeset
   104
  713ccc39944e10bd35b7f6eaed3eef0eab60e50b 7d0186621c5ba1b0f7c5c99668d43273cb44c2fe 0 (*) {'ef1': '3', 'user': 'test'} (glob)
2451
5dc7294327ed effectflag: add test combining multiple flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2450
diff changeset
   105
  $ hg obslog .
5dc7294327ed effectflag: add test combining multiple flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2450
diff changeset
   106
  @  7d0186621c5b (12) F1
5dc7294327ed effectflag: add test combining multiple flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2450
diff changeset
   107
  |
5dc7294327ed effectflag: add test combining multiple flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2450
diff changeset
   108
  x  713ccc39944e (11) F0
2453
ad08aedf25ac obshistory: display informations from the obs marker effect flag
Boris Feld <boris.feld@octobus.net>
parents: 2452
diff changeset
   109
       rewritten(description, meta) by test (*) as 7d0186621c5b (glob)
2451
5dc7294327ed effectflag: add test combining multiple flag
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2450
diff changeset
   110