tests/test-rewind.t
author Pierre-Yves David <pierre-yves.david@octobus.net>
Sun, 17 Jun 2018 00:33:43 +0200
changeset 3863 c31be22d1d90
parent 3862 8d3eed113b77
child 3864 0254c96ce108
permissions -rw-r--r--
rewind: update the working copy if it gets obsoleted If the working copy parent is rewinded, follow the rewind.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3858
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     1
This test file test the rewind command in several situations.
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     2
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     3
Global setup
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     4
============
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     5
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     6
  $ . $TESTDIR/testlib/common.sh
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     7
  $ cat >> $HGRCPATH <<EOF
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     8
  > [ui]
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     9
  > interactive = true
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    10
  > [phases]
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    11
  > publish=False
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    12
  > [extensions]
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    13
  > evolve =
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    14
  > EOF
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    15
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    16
  $ hg init rewind-testing-base
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    17
  $ cd rewind-testing-base
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    18
  $ echo a > root
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    19
  $ hg add root
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    20
  $ hg ci -m 'c_ROOT'
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    21
  $ echo a > A
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    22
  $ hg add A
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    23
  $ hg ci -m 'c_A0'
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    24
  $ echo a > B
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    25
  $ hg add B
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    26
  $ hg ci -m 'c_B0'
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    27
  $ hg log -G
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    28
  @  changeset:   2:7e594302a05d
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    29
  |  tag:         tip
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    30
  |  user:        test
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    31
  |  date:        Thu Jan 01 00:00:00 1970 +0000
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    32
  |  summary:     c_B0
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    33
  |
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    34
  o  changeset:   1:579f120ba918
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    35
  |  user:        test
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    36
  |  date:        Thu Jan 01 00:00:00 1970 +0000
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    37
  |  summary:     c_A0
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    38
  |
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    39
  o  changeset:   0:eba9c2249fe7
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    40
     user:        test
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    41
     date:        Thu Jan 01 00:00:00 1970 +0000
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    42
     summary:     c_ROOT
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    43
  
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    44
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    45
  $ cd ..
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    46
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    47
Test rewinding to single changesets
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    48
====================================
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    49
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    50
  $ hg clone rewind-testing-base rewind-testing-simple-prune
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    51
  updating to branch default
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    52
  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    53
  $ cd rewind-testing-simple-prune
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    54
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    55
Prune changeset unrelated to the working copy
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    56
---------------------------------------------
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    57
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    58
Setup
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    59
`````
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    60
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    61
Update to an unrelated changeset
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    62
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    63
  $ hg up 'desc("c_ROOT")'
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    64
  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    65
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    66
Prune the head
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    67
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    68
  $ hg prune -r 'desc("c_B0")'
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    69
  1 changesets pruned
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    70
  $ hg log -G
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    71
  o  changeset:   1:579f120ba918
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    72
  |  tag:         tip
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    73
  |  user:        test
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    74
  |  date:        Thu Jan 01 00:00:00 1970 +0000
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    75
  |  summary:     c_A0
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    76
  |
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    77
  @  changeset:   0:eba9c2249fe7
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    78
     user:        test
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    79
     date:        Thu Jan 01 00:00:00 1970 +0000
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    80
     summary:     c_ROOT
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    81
  
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    82
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    83
Actual rewind
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    84
`````````````
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    85
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    86
  $ hg rewind --hidden --to 'desc("c_B0")'
3859
6e3d844b56f2 rewind: add a message about the rewinded changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3858
diff changeset
    87
  rewinded to 1 changesets
3858
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    88
  $ hg debugobsolete
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    89
  7e594302a05d3769b27be88fc3cdfd39d7498498 0 {579f120ba91885449adc92eedf48ef3569742cee} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'prune', 'user': 'test'}
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    90
  7e594302a05d3769b27be88fc3cdfd39d7498498 073989a581cf430a844192364fa37606357cbbc2 4 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '2', 'operation': 'rewind', 'user': 'test'}
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    91
  $ hg obslog -r 'desc("c_B0")'
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    92
  o  073989a581cf (3) c_B0
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    93
  |
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    94
  x  7e594302a05d (2) c_B0
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    95
       pruned using prune by test (Thu Jan 01 00:00:00 1970 +0000)
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    96
       rewritten(meta) as 073989a581cf using rewind by test (Thu Jan 01 00:00:00 1970 +0000)
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    97
  
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    98
  $ hg log -G
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    99
  o  changeset:   3:073989a581cf
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   100
  |  tag:         tip
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   101
  |  parent:      1:579f120ba918
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   102
  |  user:        test
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   103
  |  date:        Thu Jan 01 00:00:00 1970 +0000
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   104
  |  summary:     c_B0
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   105
  |
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   106
  o  changeset:   1:579f120ba918
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   107
  |  user:        test
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   108
  |  date:        Thu Jan 01 00:00:00 1970 +0000
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   109
  |  summary:     c_A0
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   110
  |
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   111
  @  changeset:   0:eba9c2249fe7
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   112
     user:        test
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   113
     date:        Thu Jan 01 00:00:00 1970 +0000
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   114
     summary:     c_ROOT
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   115
  
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   116
XXX-TODO: fix the obsfate from "meta-changed as 3" to "identical" or something.
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   117
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   118
  $ hg log -G --hidden
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   119
  o  changeset:   3:073989a581cf
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   120
  |  tag:         tip
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   121
  |  parent:      1:579f120ba918
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   122
  |  user:        test
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   123
  |  date:        Thu Jan 01 00:00:00 1970 +0000
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   124
  |  summary:     c_B0
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   125
  |
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   126
  | x  changeset:   2:7e594302a05d
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   127
  |/   user:        test
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   128
  |    date:        Thu Jan 01 00:00:00 1970 +0000
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   129
  |    obsolete:    meta-changed using rewind as 3:073989a581cf
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   130
  |    summary:     c_B0
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   131
  |
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   132
  o  changeset:   1:579f120ba918
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   133
  |  user:        test
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   134
  |  date:        Thu Jan 01 00:00:00 1970 +0000
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   135
  |  summary:     c_A0
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   136
  |
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   137
  @  changeset:   0:eba9c2249fe7
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   138
     user:        test
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   139
     date:        Thu Jan 01 00:00:00 1970 +0000
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   140
     summary:     c_ROOT
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   141
  
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   142
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   143
Other independant rewind create a different revision
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   144
----------------------------------------------------------
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   145
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   146
setup
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   147
`````
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   148
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   149
note: we use "default-date" to make it a "different rewind"
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   150
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   151
  $ echo '[devel]' >> $HGRCPATH
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   152
  $ echo 'default-date = 1 0' >> $HGRCPATH
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   153
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   154
Actual rewind
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   155
`````````````
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   156
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   157
  $ hg prune 'desc("c_B0")'
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   158
  1 changesets pruned
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   159
  $ hg rewind --hidden --to 'min(desc("c_B0"))'
3859
6e3d844b56f2 rewind: add a message about the rewinded changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3858
diff changeset
   160
  rewinded to 1 changesets
3858
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   161
  $ hg debugobsolete
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   162
  7e594302a05d3769b27be88fc3cdfd39d7498498 0 {579f120ba91885449adc92eedf48ef3569742cee} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'prune', 'user': 'test'}
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   163
  7e594302a05d3769b27be88fc3cdfd39d7498498 073989a581cf430a844192364fa37606357cbbc2 4 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '2', 'operation': 'rewind', 'user': 'test'}
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   164
  073989a581cf430a844192364fa37606357cbbc2 0 {579f120ba91885449adc92eedf48ef3569742cee} (Thu Jan 01 00:00:01 1970 +0000) {'ef1': '0', 'operation': 'prune', 'user': 'test'}
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   165
  7e594302a05d3769b27be88fc3cdfd39d7498498 48acf2c0d9c8961859ce9a913671eb2adc9b057b 4 (Thu Jan 01 00:00:01 1970 +0000) {'ef1': '34', 'operation': 'rewind', 'user': 'test'}
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   166
  $ hg obslog -r 'desc("c_B0")' --all
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   167
  x  073989a581cf (3) c_B0
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   168
  |    pruned using prune by test (Thu Jan 01 00:00:01 1970 +0000)
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   169
  |
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   170
  | o  48acf2c0d9c8 (4) c_B0
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   171
  |/
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   172
  x  7e594302a05d (2) c_B0
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   173
       pruned using prune by test (Thu Jan 01 00:00:00 1970 +0000)
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   174
       rewritten(meta) as 073989a581cf using rewind by test (Thu Jan 01 00:00:00 1970 +0000)
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   175
       rewritten(meta, date) as 48acf2c0d9c8 using rewind by test (Thu Jan 01 00:00:01 1970 +0000)
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   176
  
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   177
  $ hg log -G
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   178
  o  changeset:   4:48acf2c0d9c8
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   179
  |  tag:         tip
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   180
  |  parent:      1:579f120ba918
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   181
  |  user:        test
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   182
  |  date:        Thu Jan 01 00:00:01 1970 +0000
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   183
  |  summary:     c_B0
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   184
  |
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   185
  o  changeset:   1:579f120ba918
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   186
  |  user:        test
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   187
  |  date:        Thu Jan 01 00:00:00 1970 +0000
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   188
  |  summary:     c_A0
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   189
  |
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   190
  @  changeset:   0:eba9c2249fe7
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   191
     user:        test
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   192
     date:        Thu Jan 01 00:00:00 1970 +0000
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   193
     summary:     c_ROOT
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   194
  
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   195
  $ hg log -G --hidden
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   196
  o  changeset:   4:48acf2c0d9c8
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   197
  |  tag:         tip
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   198
  |  parent:      1:579f120ba918
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   199
  |  user:        test
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   200
  |  date:        Thu Jan 01 00:00:01 1970 +0000
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   201
  |  summary:     c_B0
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   202
  |
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   203
  | x  changeset:   3:073989a581cf
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   204
  |/   parent:      1:579f120ba918
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   205
  |    user:        test
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   206
  |    date:        Thu Jan 01 00:00:00 1970 +0000
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   207
  |    obsolete:    pruned using prune
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   208
  |    summary:     c_B0
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   209
  |
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   210
  | x  changeset:   2:7e594302a05d
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   211
  |/   user:        test
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   212
  |    date:        Thu Jan 01 00:00:00 1970 +0000
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   213
  |    obsolete:    rewritten using rewind as 4:48acf2c0d9c8
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   214
  |    obsolete:    meta-changed using rewind as 3:073989a581cf
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   215
  |    summary:     c_B0
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   216
  |
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   217
  o  changeset:   1:579f120ba918
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   218
  |  user:        test
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   219
  |  date:        Thu Jan 01 00:00:00 1970 +0000
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   220
  |  summary:     c_A0
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   221
  |
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   222
  @  changeset:   0:eba9c2249fe7
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   223
     user:        test
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   224
     date:        Thu Jan 01 00:00:00 1970 +0000
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   225
     summary:     c_ROOT
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   226
  
bb4f5ad63877 rewind: add a proto version of the command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   227
  $ cd ..
3860
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   228
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   229
rewind a simple amend - creating content-divergence
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   230
---------------------------------------------------
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   231
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   232
Setup
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   233
`````
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   234
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   235
  $ hg clone rewind-testing-base rewind-testing-single-rewrite
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   236
  updating to branch default
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   237
  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   238
  $ cd rewind-testing-single-rewrite
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   239
  $ echo BB > B
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   240
  $ hg amend -m 'c_B1'
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   241
  $ hg log -G
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   242
  @  changeset:   3:25c8f5ab0c3b
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   243
  |  tag:         tip
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   244
  |  parent:      1:579f120ba918
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   245
  |  user:        test
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   246
  |  date:        Thu Jan 01 00:00:00 1970 +0000
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   247
  |  summary:     c_B1
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   248
  |
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   249
  o  changeset:   1:579f120ba918
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   250
  |  user:        test
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   251
  |  date:        Thu Jan 01 00:00:00 1970 +0000
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   252
  |  summary:     c_A0
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   253
  |
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   254
  o  changeset:   0:eba9c2249fe7
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   255
     user:        test
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   256
     date:        Thu Jan 01 00:00:00 1970 +0000
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   257
     summary:     c_ROOT
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   258
  
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   259
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   260
Actual rewind
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   261
`````````````
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   262
3861
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   263
  $ hg rewind --hidden --to 'desc("c_B0")' --as-divergence
3860
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   264
  2 new content-divergent changesets
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   265
  rewinded to 1 changesets
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   266
  $ hg debugobsolete
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   267
  7e594302a05d3769b27be88fc3cdfd39d7498498 25c8f5ab0c3bb569ec672570f1a901be4c6f032b 0 (Thu Jan 01 00:00:01 1970 +0000) {'ef1': '9', 'operation': 'amend', 'user': 'test'}
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   268
  7e594302a05d3769b27be88fc3cdfd39d7498498 48acf2c0d9c8961859ce9a913671eb2adc9b057b 4 (Thu Jan 01 00:00:01 1970 +0000) {'ef1': '34', 'operation': 'rewind', 'user': 'test'}
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   269
  $ hg obslog --rev 'desc("c_B0")'
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   270
  *  48acf2c0d9c8 (4) c_B0
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   271
  |
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   272
  x  7e594302a05d (2) c_B0
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   273
       rewritten(description, content) as 25c8f5ab0c3b using amend by test (Thu Jan 01 00:00:01 1970 +0000)
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   274
       rewritten(meta, date) as 48acf2c0d9c8 using rewind by test (Thu Jan 01 00:00:01 1970 +0000)
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   275
  
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   276
  $ hg log -G
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   277
  *  changeset:   4:48acf2c0d9c8
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   278
  |  tag:         tip
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   279
  |  parent:      1:579f120ba918
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   280
  |  user:        test
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   281
  |  date:        Thu Jan 01 00:00:01 1970 +0000
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   282
  |  instability: content-divergent
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   283
  |  summary:     c_B0
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   284
  |
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   285
  | @  changeset:   3:25c8f5ab0c3b
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   286
  |/   parent:      1:579f120ba918
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   287
  |    user:        test
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   288
  |    date:        Thu Jan 01 00:00:00 1970 +0000
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   289
  |    instability: content-divergent
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   290
  |    summary:     c_B1
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   291
  |
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   292
  o  changeset:   1:579f120ba918
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   293
  |  user:        test
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   294
  |  date:        Thu Jan 01 00:00:00 1970 +0000
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   295
  |  summary:     c_A0
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   296
  |
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   297
  o  changeset:   0:eba9c2249fe7
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   298
     user:        test
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   299
     date:        Thu Jan 01 00:00:00 1970 +0000
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   300
     summary:     c_ROOT
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   301
  
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   302
  $ hg log -G --hidden
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   303
  *  changeset:   4:48acf2c0d9c8
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   304
  |  tag:         tip
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   305
  |  parent:      1:579f120ba918
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   306
  |  user:        test
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   307
  |  date:        Thu Jan 01 00:00:01 1970 +0000
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   308
  |  instability: content-divergent
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   309
  |  summary:     c_B0
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   310
  |
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   311
  | @  changeset:   3:25c8f5ab0c3b
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   312
  |/   parent:      1:579f120ba918
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   313
  |    user:        test
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   314
  |    date:        Thu Jan 01 00:00:00 1970 +0000
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   315
  |    instability: content-divergent
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   316
  |    summary:     c_B1
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   317
  |
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   318
  | x  changeset:   2:7e594302a05d
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   319
  |/   user:        test
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   320
  |    date:        Thu Jan 01 00:00:00 1970 +0000
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   321
  |    obsolete:    rewritten using rewind as 4:48acf2c0d9c8
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   322
  |    obsolete:    rewritten using amend as 3:25c8f5ab0c3b
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   323
  |    summary:     c_B0
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   324
  |
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   325
  o  changeset:   1:579f120ba918
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   326
  |  user:        test
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   327
  |  date:        Thu Jan 01 00:00:00 1970 +0000
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   328
  |  summary:     c_A0
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   329
  |
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   330
  o  changeset:   0:eba9c2249fe7
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   331
     user:        test
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   332
     date:        Thu Jan 01 00:00:00 1970 +0000
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   333
     summary:     c_ROOT
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   334
  
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   335
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   336
Cleanup
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   337
```````
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   338
  $ hg prune 'max(desc("c_B0"))'
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   339
  1 changesets pruned
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   340
  $ hg log -G
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   341
  @  changeset:   3:25c8f5ab0c3b
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   342
  |  tag:         tip
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   343
  |  parent:      1:579f120ba918
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   344
  |  user:        test
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   345
  |  date:        Thu Jan 01 00:00:00 1970 +0000
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   346
  |  summary:     c_B1
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   347
  |
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   348
  o  changeset:   1:579f120ba918
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   349
  |  user:        test
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   350
  |  date:        Thu Jan 01 00:00:00 1970 +0000
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   351
  |  summary:     c_A0
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   352
  |
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   353
  o  changeset:   0:eba9c2249fe7
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   354
     user:        test
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   355
     date:        Thu Jan 01 00:00:00 1970 +0000
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   356
     summary:     c_ROOT
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   357
  
3861
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   358
  $ echo 'default-date = 2 0' >> $HGRCPATH
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   359
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   360
rewind a simple amend - obsoleting the current latest successors
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   361
----------------------------------------------------------------
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   362
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   363
  $ hg rewind --hidden --to 'min(desc("c_B0"))'
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   364
  rewinded to 1 changesets
3862
8d3eed113b77 rewind: add a message about obsolete changeset
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3861
diff changeset
   365
  (1 changesets obsoleted)
3863
c31be22d1d90 rewind: update the working copy if it gets obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3862
diff changeset
   366
  working directory is now at d8b4471cfb3c
3861
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   367
  $ hg debugobsolete
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   368
  7e594302a05d3769b27be88fc3cdfd39d7498498 25c8f5ab0c3bb569ec672570f1a901be4c6f032b 0 (Thu Jan 01 00:00:01 1970 +0000) {'ef1': '9', 'operation': 'amend', 'user': 'test'}
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   369
  7e594302a05d3769b27be88fc3cdfd39d7498498 48acf2c0d9c8961859ce9a913671eb2adc9b057b 4 (Thu Jan 01 00:00:01 1970 +0000) {'ef1': '34', 'operation': 'rewind', 'user': 'test'}
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   370
  48acf2c0d9c8961859ce9a913671eb2adc9b057b 0 {579f120ba91885449adc92eedf48ef3569742cee} (Thu Jan 01 00:00:01 1970 +0000) {'ef1': '0', 'operation': 'prune', 'user': 'test'}
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   371
  7e594302a05d3769b27be88fc3cdfd39d7498498 d8b4471cfb3caa290e0a78ae6bc57d78656c9075 4 (Thu Jan 01 00:00:02 1970 +0000) {'ef1': '34', 'operation': 'rewind', 'user': 'test'}
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   372
  25c8f5ab0c3bb569ec672570f1a901be4c6f032b d8b4471cfb3caa290e0a78ae6bc57d78656c9075 0 (Thu Jan 01 00:00:02 1970 +0000) {'ef1': '43', 'operation': 'rewind', 'user': 'test'}
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   373
  $ hg obslog --rev 'desc("c_B0")'
3863
c31be22d1d90 rewind: update the working copy if it gets obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3862
diff changeset
   374
  @    d8b4471cfb3c (5) c_B0
3861
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   375
  |\
3863
c31be22d1d90 rewind: update the working copy if it gets obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3862
diff changeset
   376
  x |  25c8f5ab0c3b (3) c_B1
3861
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   377
  |/     rewritten(description, meta, date, content) as d8b4471cfb3c using rewind by test (Thu Jan 01 00:00:02 1970 +0000)
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   378
  |
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   379
  x  7e594302a05d (2) c_B0
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   380
       rewritten(description, content) as 25c8f5ab0c3b using amend by test (Thu Jan 01 00:00:01 1970 +0000)
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   381
       rewritten(meta, date) as 48acf2c0d9c8 using rewind by test (Thu Jan 01 00:00:01 1970 +0000)
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   382
       rewritten(meta, date) as d8b4471cfb3c using rewind by test (Thu Jan 01 00:00:02 1970 +0000)
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   383
  
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   384
  $ hg log -G
3863
c31be22d1d90 rewind: update the working copy if it gets obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3862
diff changeset
   385
  @  changeset:   5:d8b4471cfb3c
3861
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   386
  |  tag:         tip
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   387
  |  parent:      1:579f120ba918
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   388
  |  user:        test
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   389
  |  date:        Thu Jan 01 00:00:02 1970 +0000
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   390
  |  summary:     c_B0
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   391
  |
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   392
  o  changeset:   1:579f120ba918
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   393
  |  user:        test
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   394
  |  date:        Thu Jan 01 00:00:00 1970 +0000
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   395
  |  summary:     c_A0
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   396
  |
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   397
  o  changeset:   0:eba9c2249fe7
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   398
     user:        test
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   399
     date:        Thu Jan 01 00:00:00 1970 +0000
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   400
     summary:     c_ROOT
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   401
  
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   402
  $ hg log -G --hidden
3863
c31be22d1d90 rewind: update the working copy if it gets obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3862
diff changeset
   403
  @  changeset:   5:d8b4471cfb3c
3861
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   404
  |  tag:         tip
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   405
  |  parent:      1:579f120ba918
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   406
  |  user:        test
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   407
  |  date:        Thu Jan 01 00:00:02 1970 +0000
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   408
  |  summary:     c_B0
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   409
  |
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   410
  | x  changeset:   4:48acf2c0d9c8
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   411
  |/   parent:      1:579f120ba918
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   412
  |    user:        test
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   413
  |    date:        Thu Jan 01 00:00:01 1970 +0000
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   414
  |    obsolete:    pruned using prune
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   415
  |    summary:     c_B0
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   416
  |
3863
c31be22d1d90 rewind: update the working copy if it gets obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3862
diff changeset
   417
  | x  changeset:   3:25c8f5ab0c3b
3861
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   418
  |/   parent:      1:579f120ba918
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   419
  |    user:        test
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   420
  |    date:        Thu Jan 01 00:00:00 1970 +0000
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   421
  |    obsolete:    rewritten using rewind as 5:d8b4471cfb3c
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   422
  |    summary:     c_B1
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   423
  |
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   424
  | x  changeset:   2:7e594302a05d
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   425
  |/   user:        test
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   426
  |    date:        Thu Jan 01 00:00:00 1970 +0000
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   427
  |    obsolete:    rewritten using rewind as 5:d8b4471cfb3c
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   428
  |    obsolete:    rewritten using rewind as 4:48acf2c0d9c8
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   429
  |    obsolete:    rewritten using amend as 3:25c8f5ab0c3b
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   430
  |    summary:     c_B0
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   431
  |
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   432
  o  changeset:   1:579f120ba918
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   433
  |  user:        test
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   434
  |  date:        Thu Jan 01 00:00:00 1970 +0000
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   435
  |  summary:     c_A0
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   436
  |
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   437
  o  changeset:   0:eba9c2249fe7
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   438
     user:        test
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   439
     date:        Thu Jan 01 00:00:00 1970 +0000
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   440
     summary:     c_ROOT
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   441