tests/test-rewind.t
author Pierre-Yves David <pierre-yves.david@octobus.net>
Tue, 27 Nov 2018 04:07:38 +0100
branchmercurial-4.3
changeset 4276 3306820b5a85
parent 3936 537fd9a86c06
permissions -rw-r--r--
test-compat: merge mercurial-4.4 into mercurial-4.3
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
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
    89
  7e594302a05d3769b27be88fc3cdfd39d7498498 0 {579f120ba91885449adc92eedf48ef3569742cee} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'user': 'test'}
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
    90
  7e594302a05d3769b27be88fc3cdfd39d7498498 073989a581cf430a844192364fa37606357cbbc2 4 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '2', 'user': 'test'}
3858
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
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
    95
       pruned by test (Thu Jan 01 00:00:00 1970 +0000)
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
    96
       rewritten(meta) as 073989a581cf by test (Thu Jan 01 00:00:00 1970 +0000)
3858
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
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   129
  |    obsolete:    meta-changed as 073989a581cf
3858
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
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   162
  7e594302a05d3769b27be88fc3cdfd39d7498498 0 {579f120ba91885449adc92eedf48ef3569742cee} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'user': 'test'}
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   163
  7e594302a05d3769b27be88fc3cdfd39d7498498 073989a581cf430a844192364fa37606357cbbc2 4 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '2', 'user': 'test'}
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   164
  073989a581cf430a844192364fa37606357cbbc2 0 {579f120ba91885449adc92eedf48ef3569742cee} (Thu Jan 01 00:00:01 1970 +0000) {'ef1': '0', 'user': 'test'}
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   165
  7e594302a05d3769b27be88fc3cdfd39d7498498 48acf2c0d9c8961859ce9a913671eb2adc9b057b 4 (Thu Jan 01 00:00:01 1970 +0000) {'ef1': '34', 'user': 'test'}
3858
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
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   168
  |    pruned by test (Thu Jan 01 00:00:01 1970 +0000)
3858
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
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   173
       pruned by test (Thu Jan 01 00:00:00 1970 +0000)
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   174
       rewritten(meta) as 073989a581cf by test (Thu Jan 01 00:00:00 1970 +0000)
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   175
       rewritten(meta, date) as 48acf2c0d9c8 by test (Thu Jan 01 00:00:01 1970 +0000)
3858
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
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   207
  |    obsolete:    pruned
3858
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
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   213
  |    obsolete:    rewritten as 48acf2c0d9c8
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   214
  |    obsolete:    meta-changed as 073989a581cf
3858
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
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   242
  @  changeset:   4:25c8f5ab0c3b
3860
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
  rewinded to 1 changesets
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   265
  $ hg debugobsolete
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   266
  7e594302a05d3769b27be88fc3cdfd39d7498498 25c8f5ab0c3bb569ec672570f1a901be4c6f032b 0 (Thu Jan 01 00:00:01 1970 +0000) {'ef1': '9', 'user': 'test'}
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   267
  3d16cbe1aa2b2b1764e67b6b6938d296c676b203 0 {7e594302a05d3769b27be88fc3cdfd39d7498498} (Thu Jan 01 00:00:01 1970 +0000) {'ef1': '0', 'user': 'test'}
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   268
  7e594302a05d3769b27be88fc3cdfd39d7498498 48acf2c0d9c8961859ce9a913671eb2adc9b057b 4 (Thu Jan 01 00:00:01 1970 +0000) {'ef1': '34', 'user': 'test'}
3860
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")'
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   270
  o  48acf2c0d9c8 (5) c_B0
3860
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
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   273
       rewritten(description, content) as 25c8f5ab0c3b by test (Thu Jan 01 00:00:01 1970 +0000)
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   274
       rewritten(meta, date) as 48acf2c0d9c8 by test (Thu Jan 01 00:00:01 1970 +0000)
3860
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
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   277
  o  changeset:   5:48acf2c0d9c8
3860
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
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   282
  |  trouble:     divergent
3860
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
  |
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   285
  | @  changeset:   4:25c8f5ab0c3b
3860
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
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   289
  |    trouble:     divergent
3860
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
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   303
  o  changeset:   5:48acf2c0d9c8
3860
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
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   308
  |  trouble:     divergent
3860
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
  |
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   311
  | @  changeset:   4:25c8f5ab0c3b
3860
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
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   315
  |    trouble:     divergent
3860
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
  |
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   318
  | x  changeset:   3:3d16cbe1aa2b
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   319
  | |  user:        test
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   320
  | |  date:        Thu Jan 01 00:00:00 1970 +0000
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   321
  | |  obsolete:    pruned
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   322
  | |  summary:     temporary amend commit for 7e594302a05d
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   323
  | |
3860
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   324
  | x  changeset:   2:7e594302a05d
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   325
  |/   user:        test
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   326
  |    date:        Thu Jan 01 00:00:00 1970 +0000
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   327
  |    obsolete:    rewritten as 48acf2c0d9c8
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   328
  |    obsolete:    rewritten as 25c8f5ab0c3b
3860
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   329
  |    summary:     c_B0
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   330
  |
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   331
  o  changeset:   1:579f120ba918
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   332
  |  user:        test
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   333
  |  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
   334
  |  summary:     c_A0
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
  o  changeset:   0:eba9c2249fe7
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   337
     user:        test
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   338
     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
   339
     summary:     c_ROOT
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   340
  
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   341
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   342
Cleanup
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   343
```````
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   344
  $ 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
   345
  1 changesets pruned
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   346
  $ hg log -G
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   347
  @  changeset:   4:25c8f5ab0c3b
3860
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   348
  |  tag:         tip
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   349
  |  parent:      1:579f120ba918
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   350
  |  user:        test
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   351
  |  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
   352
  |  summary:     c_B1
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   353
  |
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   354
  o  changeset:   1:579f120ba918
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   355
  |  user:        test
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   356
  |  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
   357
  |  summary:     c_A0
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   358
  |
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   359
  o  changeset:   0:eba9c2249fe7
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   360
     user:        test
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   361
     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
   362
     summary:     c_ROOT
fa184c5edfe8 rewind: test rewinding an amended changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3859
diff changeset
   363
  
3861
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   364
  $ 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
   365
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   366
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
   367
----------------------------------------------------------------
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   368
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   369
  $ 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
   370
  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
   371
  (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
   372
  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
   373
  $ hg debugobsolete
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   374
  7e594302a05d3769b27be88fc3cdfd39d7498498 25c8f5ab0c3bb569ec672570f1a901be4c6f032b 0 (Thu Jan 01 00:00:01 1970 +0000) {'ef1': '9', 'user': 'test'}
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   375
  3d16cbe1aa2b2b1764e67b6b6938d296c676b203 0 {7e594302a05d3769b27be88fc3cdfd39d7498498} (Thu Jan 01 00:00:01 1970 +0000) {'ef1': '0', 'user': 'test'}
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   376
  7e594302a05d3769b27be88fc3cdfd39d7498498 48acf2c0d9c8961859ce9a913671eb2adc9b057b 4 (Thu Jan 01 00:00:01 1970 +0000) {'ef1': '34', 'user': 'test'}
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   377
  48acf2c0d9c8961859ce9a913671eb2adc9b057b 0 {579f120ba91885449adc92eedf48ef3569742cee} (Thu Jan 01 00:00:01 1970 +0000) {'ef1': '0', 'user': 'test'}
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   378
  7e594302a05d3769b27be88fc3cdfd39d7498498 d8b4471cfb3caa290e0a78ae6bc57d78656c9075 4 (Thu Jan 01 00:00:02 1970 +0000) {'ef1': '34', 'user': 'test'}
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   379
  25c8f5ab0c3bb569ec672570f1a901be4c6f032b d8b4471cfb3caa290e0a78ae6bc57d78656c9075 0 (Thu Jan 01 00:00:02 1970 +0000) {'ef1': '43', 'user': 'test'}
3861
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   380
  $ hg obslog --rev 'desc("c_B0")'
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   381
  @    d8b4471cfb3c (6) c_B0
3861
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   382
  |\
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   383
  x |  25c8f5ab0c3b (4) c_B1
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   384
  |/     rewritten(description, meta, date, content) as d8b4471cfb3c by test (Thu Jan 01 00:00:02 1970 +0000)
3861
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   385
  |
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   386
  x  7e594302a05d (2) c_B0
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   387
       rewritten(description, content) as 25c8f5ab0c3b by test (Thu Jan 01 00:00:01 1970 +0000)
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   388
       rewritten(meta, date) as 48acf2c0d9c8 by test (Thu Jan 01 00:00:01 1970 +0000)
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   389
       rewritten(meta, date) as d8b4471cfb3c by test (Thu Jan 01 00:00:02 1970 +0000)
3861
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   390
  
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   391
  $ hg log -G
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   392
  @  changeset:   6:d8b4471cfb3c
3861
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   393
  |  tag:         tip
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   394
  |  parent:      1:579f120ba918
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   395
  |  user:        test
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   396
  |  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
   397
  |  summary:     c_B0
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   398
  |
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   399
  o  changeset:   1:579f120ba918
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   400
  |  user:        test
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   401
  |  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
   402
  |  summary:     c_A0
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   403
  |
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   404
  o  changeset:   0:eba9c2249fe7
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   405
     user:        test
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   406
     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
   407
     summary:     c_ROOT
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   408
  
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   409
  $ hg log -G --hidden
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   410
  @  changeset:   6:d8b4471cfb3c
3861
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   411
  |  tag:         tip
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   412
  |  parent:      1:579f120ba918
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   413
  |  user:        test
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   414
  |  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
   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
  |
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   417
  | x  changeset:   5:48acf2c0d9c8
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:01 1970 +0000
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   421
  |    obsolete:    pruned
3861
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   422
  |    summary:     c_B0
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   423
  |
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   424
  | x  changeset:   4:25c8f5ab0c3b
3861
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   425
  |/   parent:      1:579f120ba918
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   426
  |    user:        test
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   427
  |    date:        Thu Jan 01 00:00:00 1970 +0000
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   428
  |    obsolete:    rewritten as d8b4471cfb3c
3861
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   429
  |    summary:     c_B1
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   430
  |
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   431
  | x  changeset:   3:3d16cbe1aa2b
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   432
  | |  user:        test
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   433
  | |  date:        Thu Jan 01 00:00:00 1970 +0000
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   434
  | |  obsolete:    pruned
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   435
  | |  summary:     temporary amend commit for 7e594302a05d
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   436
  | |
3861
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   437
  | x  changeset:   2:7e594302a05d
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
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   440
  |    obsolete:    rewritten as d8b4471cfb3c
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   441
  |    obsolete:    rewritten as 48acf2c0d9c8
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   442
  |    obsolete:    rewritten as 25c8f5ab0c3b
3861
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   443
  |    summary:     c_B0
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   444
  |
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   445
  o  changeset:   1:579f120ba918
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   446
  |  user:        test
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   447
  |  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
   448
  |  summary:     c_A0
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   449
  |
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   450
  o  changeset:   0:eba9c2249fe7
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   451
     user:        test
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   452
     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
   453
     summary:     c_ROOT
bbe635dfd75c rewind: obsolete latest successors unless instructed otherwise
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3860
diff changeset
   454
  
3864
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   455
  $ cd ..
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   456
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   457
rewind a simple split
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   458
---------------------
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   459
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   460
Setup
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   461
`````
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   462
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   463
  $ hg clone rewind-testing-base rewind-testing-split-fold
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   464
  updating to branch default
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   465
  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   466
  $ cd rewind-testing-split-fold
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   467
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   468
  $ echo C > C
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   469
  $ echo D > D
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   470
  $ hg add C D
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   471
  $ hg ci -m 'c_CD0'
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   472
  $ hg split << EOF
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   473
  > y
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   474
  > f
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   475
  > d
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   476
  > y
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   477
  > EOF
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   478
  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   479
  adding C
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   480
  adding D
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   481
  diff --git a/C b/C
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   482
  new file mode 100644
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   483
  examine changes to 'C'? [Ynesfdaq?] y
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   484
  
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   485
  @@ -0,0 +1,1 @@
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   486
  +C
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   487
  record change 1/2 to 'C'? [Ynesfdaq?] f
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   488
  
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   489
  diff --git a/D b/D
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   490
  new file mode 100644
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   491
  examine changes to 'D'? [Ynesfdaq?] d
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   492
  
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   493
  created new head
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   494
  Done splitting? [yN] y
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   495
  $ hg log -G
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   496
  @  changeset:   5:9576e80d6851
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   497
  |  tag:         tip
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   498
  |  user:        test
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   499
  |  date:        Thu Jan 01 00:00:02 1970 +0000
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   500
  |  summary:     c_CD0
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   501
  |
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   502
  o  changeset:   4:a0316c4c5417
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   503
  |  parent:      2:7e594302a05d
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   504
  |  user:        test
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   505
  |  date:        Thu Jan 01 00:00:02 1970 +0000
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   506
  |  summary:     c_CD0
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   507
  |
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   508
  o  changeset:   2:7e594302a05d
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   509
  |  user:        test
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   510
  |  date:        Thu Jan 01 00:00:00 1970 +0000
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   511
  |  summary:     c_B0
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   512
  |
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   513
  o  changeset:   1:579f120ba918
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   514
  |  user:        test
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   515
  |  date:        Thu Jan 01 00:00:00 1970 +0000
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   516
  |  summary:     c_A0
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   517
  |
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   518
  o  changeset:   0:eba9c2249fe7
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   519
     user:        test
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   520
     date:        Thu Jan 01 00:00:00 1970 +0000
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   521
     summary:     c_ROOT
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   522
  
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   523
  $ hg debugobsolete
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   524
  49fb7d900906b0a3d329e90da4dcb0a7582d3b6e a0316c4c54179357e71d068fb8884678ebc7c351 9576e80d6851ce79cd535e2dc5fa01b444d89a39 0 (Thu Jan 01 00:00:02 1970 +0000) {'ef1': '12', 'user': 'test'}
3864
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   525
  $ hg obslog --all
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   526
  @  9576e80d6851 (5) c_CD0
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   527
  |
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   528
  | o  a0316c4c5417 (4) c_CD0
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   529
  |/
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   530
  x  49fb7d900906 (3) c_CD0
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   531
       rewritten(parent, content) as 9576e80d6851, a0316c4c5417 by test (Thu Jan 01 00:00:02 1970 +0000)
3864
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   532
  
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   533
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   534
Actual rewind
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   535
`````````````
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   536
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   537
  $ hg rewind --hidden --to 'min(desc("c_CD0"))'
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   538
  rewinded to 1 changesets
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   539
  (2 changesets obsoleted)
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   540
  working directory is now at 4535d0af405c
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   541
  $ hg debugobsolete
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   542
  49fb7d900906b0a3d329e90da4dcb0a7582d3b6e a0316c4c54179357e71d068fb8884678ebc7c351 9576e80d6851ce79cd535e2dc5fa01b444d89a39 0 (Thu Jan 01 00:00:02 1970 +0000) {'ef1': '12', 'user': 'test'}
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   543
  49fb7d900906b0a3d329e90da4dcb0a7582d3b6e 4535d0af405c1bf35f37b35f26ec6f9acfa6fe0b 4 (Thu Jan 01 00:00:02 1970 +0000) {'ef1': '2', 'user': 'test'}
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   544
  9576e80d6851ce79cd535e2dc5fa01b444d89a39 4535d0af405c1bf35f37b35f26ec6f9acfa6fe0b 0 (Thu Jan 01 00:00:02 1970 +0000) {'ef1': '14', 'user': 'test'}
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   545
  a0316c4c54179357e71d068fb8884678ebc7c351 4535d0af405c1bf35f37b35f26ec6f9acfa6fe0b 0 (Thu Jan 01 00:00:02 1970 +0000) {'ef1': '10', 'user': 'test'}
3864
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   546
  $ hg obslog
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   547
  @    4535d0af405c (6) c_CD0
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   548
  |\
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   549
  | \
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   550
  | |\
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   551
  | x |  9576e80d6851 (5) c_CD0
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   552
  |/ /     rewritten(meta, parent, content) as 4535d0af405c by test (Thu Jan 01 00:00:02 1970 +0000)
3864
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   553
  | |
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   554
  | x  a0316c4c5417 (4) c_CD0
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   555
  |/     rewritten(meta, content) as 4535d0af405c by test (Thu Jan 01 00:00:02 1970 +0000)
3864
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   556
  |
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   557
  x  49fb7d900906 (3) c_CD0
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   558
       rewritten(meta) as 4535d0af405c by test (Thu Jan 01 00:00:02 1970 +0000)
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   559
       rewritten(parent, content) as 9576e80d6851, a0316c4c5417 by test (Thu Jan 01 00:00:02 1970 +0000)
3864
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   560
  
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   561
  $ hg log -G
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   562
  @  changeset:   6:4535d0af405c
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   563
  |  tag:         tip
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   564
  |  parent:      2:7e594302a05d
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   565
  |  user:        test
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   566
  |  date:        Thu Jan 01 00:00:02 1970 +0000
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   567
  |  summary:     c_CD0
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   568
  |
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   569
  o  changeset:   2:7e594302a05d
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   570
  |  user:        test
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   571
  |  date:        Thu Jan 01 00:00:00 1970 +0000
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   572
  |  summary:     c_B0
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   573
  |
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   574
  o  changeset:   1:579f120ba918
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   575
  |  user:        test
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   576
  |  date:        Thu Jan 01 00:00:00 1970 +0000
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   577
  |  summary:     c_A0
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   578
  |
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   579
  o  changeset:   0:eba9c2249fe7
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   580
     user:        test
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   581
     date:        Thu Jan 01 00:00:00 1970 +0000
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   582
     summary:     c_ROOT
0254c96ce108 rewind: add a test for rewinding a split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3863
diff changeset
   583
  
3865
b945f2dae587 rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3864
diff changeset
   584
b945f2dae587 rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3864
diff changeset
   585
rewind a fold
b945f2dae587 rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3864
diff changeset
   586
-------------
b945f2dae587 rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3864
diff changeset
   587
b945f2dae587 rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3864
diff changeset
   588
setup
b945f2dae587 rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3864
diff changeset
   589
`````
b945f2dae587 rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3864
diff changeset
   590
b945f2dae587 rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3864
diff changeset
   591
  $ echo 'default-date = 3 0' >> $HGRCPATH
b945f2dae587 rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3864
diff changeset
   592
b945f2dae587 rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3864
diff changeset
   593
Actual Rewind
b945f2dae587 rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3864
diff changeset
   594
`````````````
b945f2dae587 rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3864
diff changeset
   595
b945f2dae587 rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3864
diff changeset
   596
  $ hg rewind --to '9576e80d6851+a0316c4c5417' --hidden
b945f2dae587 rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3864
diff changeset
   597
  rewinded to 2 changesets
b945f2dae587 rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3864
diff changeset
   598
  (1 changesets obsoleted)
3866
de42d00d6ee2 rewind: use rewinded parent when creating multiple changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3865
diff changeset
   599
  working directory is now at 85be7b94f69e
3865
b945f2dae587 rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3864
diff changeset
   600
  $ hg debugobsolete
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   601
  49fb7d900906b0a3d329e90da4dcb0a7582d3b6e a0316c4c54179357e71d068fb8884678ebc7c351 9576e80d6851ce79cd535e2dc5fa01b444d89a39 0 (Thu Jan 01 00:00:02 1970 +0000) {'ef1': '12', 'user': 'test'}
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   602
  49fb7d900906b0a3d329e90da4dcb0a7582d3b6e 4535d0af405c1bf35f37b35f26ec6f9acfa6fe0b 4 (Thu Jan 01 00:00:02 1970 +0000) {'ef1': '2', 'user': 'test'}
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   603
  9576e80d6851ce79cd535e2dc5fa01b444d89a39 4535d0af405c1bf35f37b35f26ec6f9acfa6fe0b 0 (Thu Jan 01 00:00:02 1970 +0000) {'ef1': '14', 'user': 'test'}
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   604
  a0316c4c54179357e71d068fb8884678ebc7c351 4535d0af405c1bf35f37b35f26ec6f9acfa6fe0b 0 (Thu Jan 01 00:00:02 1970 +0000) {'ef1': '10', 'user': 'test'}
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   605
  a0316c4c54179357e71d068fb8884678ebc7c351 73a1ac2e570de1f33bbea7d8260b00d5af1d30a7 4 (Thu Jan 01 00:00:03 1970 +0000) {'ef1': '34', 'user': 'test'}
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   606
  9576e80d6851ce79cd535e2dc5fa01b444d89a39 85be7b94f69e936d6f0fc52118211da82fe4e838 4 (Thu Jan 01 00:00:03 1970 +0000) {'ef1': '38', 'user': 'test'}
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   607
  4535d0af405c1bf35f37b35f26ec6f9acfa6fe0b 73a1ac2e570de1f33bbea7d8260b00d5af1d30a7 85be7b94f69e936d6f0fc52118211da82fe4e838 0 (Thu Jan 01 00:00:03 1970 +0000) {'ef1': '46', 'user': 'test'}
3865
b945f2dae587 rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3864
diff changeset
   608
  $ hg obslog -r -2:
3866
de42d00d6ee2 rewind: use rewinded parent when creating multiple changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3865
diff changeset
   609
  o    73a1ac2e570d (7) c_CD0
3865
b945f2dae587 rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3864
diff changeset
   610
  |\
3866
de42d00d6ee2 rewind: use rewinded parent when creating multiple changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3865
diff changeset
   611
  +---@  85be7b94f69e (8) c_CD0
3865
b945f2dae587 rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3864
diff changeset
   612
  | | |
b945f2dae587 rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3864
diff changeset
   613
  x---+  4535d0af405c (6) c_CD0
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   614
  |\| |    rewritten(meta, date, parent, content) as 73a1ac2e570d, 85be7b94f69e by test (Thu Jan 01 00:00:03 1970 +0000)
3865
b945f2dae587 rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3864
diff changeset
   615
  | | |
b945f2dae587 rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3864
diff changeset
   616
  +---x  9576e80d6851 (5) c_CD0
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   617
  | |      rewritten(meta, parent, content) as 4535d0af405c by test (Thu Jan 01 00:00:02 1970 +0000)
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   618
  | |      rewritten(meta, date, parent) as 85be7b94f69e by test (Thu Jan 01 00:00:03 1970 +0000)
3865
b945f2dae587 rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3864
diff changeset
   619
  | |
b945f2dae587 rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3864
diff changeset
   620
  | x  a0316c4c5417 (4) c_CD0
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   621
  |/     rewritten(meta, content) as 4535d0af405c by test (Thu Jan 01 00:00:02 1970 +0000)
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   622
  |      rewritten(meta, date) as 73a1ac2e570d by test (Thu Jan 01 00:00:03 1970 +0000)
3865
b945f2dae587 rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3864
diff changeset
   623
  |
b945f2dae587 rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3864
diff changeset
   624
  x  49fb7d900906 (3) c_CD0
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   625
       rewritten(meta) as 4535d0af405c by test (Thu Jan 01 00:00:02 1970 +0000)
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   626
       rewritten(parent, content) as 9576e80d6851, a0316c4c5417 by test (Thu Jan 01 00:00:02 1970 +0000)
3865
b945f2dae587 rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3864
diff changeset
   627
  
b945f2dae587 rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3864
diff changeset
   628
  $ hg log -G
3866
de42d00d6ee2 rewind: use rewinded parent when creating multiple changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3865
diff changeset
   629
  @  changeset:   8:85be7b94f69e
3865
b945f2dae587 rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3864
diff changeset
   630
  |  tag:         tip
b945f2dae587 rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3864
diff changeset
   631
  |  user:        test
b945f2dae587 rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3864
diff changeset
   632
  |  date:        Thu Jan 01 00:00:03 1970 +0000
b945f2dae587 rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3864
diff changeset
   633
  |  summary:     c_CD0
b945f2dae587 rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3864
diff changeset
   634
  |
3866
de42d00d6ee2 rewind: use rewinded parent when creating multiple changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3865
diff changeset
   635
  o  changeset:   7:73a1ac2e570d
de42d00d6ee2 rewind: use rewinded parent when creating multiple changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3865
diff changeset
   636
  |  parent:      2:7e594302a05d
de42d00d6ee2 rewind: use rewinded parent when creating multiple changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3865
diff changeset
   637
  |  user:        test
de42d00d6ee2 rewind: use rewinded parent when creating multiple changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3865
diff changeset
   638
  |  date:        Thu Jan 01 00:00:03 1970 +0000
de42d00d6ee2 rewind: use rewinded parent when creating multiple changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3865
diff changeset
   639
  |  summary:     c_CD0
3865
b945f2dae587 rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3864
diff changeset
   640
  |
b945f2dae587 rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3864
diff changeset
   641
  o  changeset:   2:7e594302a05d
b945f2dae587 rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3864
diff changeset
   642
  |  user:        test
b945f2dae587 rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3864
diff changeset
   643
  |  date:        Thu Jan 01 00:00:00 1970 +0000
b945f2dae587 rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3864
diff changeset
   644
  |  summary:     c_B0
b945f2dae587 rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3864
diff changeset
   645
  |
b945f2dae587 rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3864
diff changeset
   646
  o  changeset:   1:579f120ba918
b945f2dae587 rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3864
diff changeset
   647
  |  user:        test
b945f2dae587 rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3864
diff changeset
   648
  |  date:        Thu Jan 01 00:00:00 1970 +0000
b945f2dae587 rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3864
diff changeset
   649
  |  summary:     c_A0
b945f2dae587 rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3864
diff changeset
   650
  |
b945f2dae587 rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3864
diff changeset
   651
  o  changeset:   0:eba9c2249fe7
b945f2dae587 rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3864
diff changeset
   652
     user:        test
b945f2dae587 rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3864
diff changeset
   653
     date:        Thu Jan 01 00:00:00 1970 +0000
b945f2dae587 rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3864
diff changeset
   654
     summary:     c_ROOT
b945f2dae587 rewind: add a test for rewinding a fold
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3864
diff changeset
   655
  
3867
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   656
  $ cd ..
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   657
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   658
Test rewinding stack
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   659
====================
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   660
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   661
  $ hg clone rewind-testing-base rewind-testing-stack
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   662
  updating to branch default
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   663
  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   664
  $ cd rewind-testing-stack
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   665
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   666
Rewinding the top of the stack only
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   667
-----------------------------------
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   668
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   669
setup
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   670
`````
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   671
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   672
  $ hg up 'desc("c_A0")'
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   673
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   674
  $ echo AA >> A
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   675
  $ hg amend -m 'c_A1'
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   676
  1 new unstable changesets
3867
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   677
  $ hg evolve --all
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   678
  move:[2] c_B0
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   679
  atop:[4] c_A1
3867
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   680
  working directory is now at a65fceb2324a
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   681
  $ hg debugobsolete
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   682
  579f120ba91885449adc92eedf48ef3569742cee d952d1794ff657f5c2a82225d2e6307ed930b32f 0 (Thu Jan 01 00:00:03 1970 +0000) {'ef1': '9', 'user': 'test'}
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   683
  ddb26d894c1c661052affbfb400159e34baae86e 0 {579f120ba91885449adc92eedf48ef3569742cee} (Thu Jan 01 00:00:03 1970 +0000) {'ef1': '0', 'user': 'test'}
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   684
  7e594302a05d3769b27be88fc3cdfd39d7498498 a65fceb2324ae1eb1231610193d24a5fa02c7c0e 0 (Thu Jan 01 00:00:03 1970 +0000) {'ef1': '4', 'user': 'test'}
3867
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   685
  $ hg obslog -r 'desc("c_A1")::'
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   686
  @  a65fceb2324a (5) c_B0
3867
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   687
  |
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   688
  | o  d952d1794ff6 (4) c_A1
3867
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   689
  | |
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   690
  | x  579f120ba918 (1) c_A0
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   691
  |      rewritten(description, content) as d952d1794ff6 by test (Thu Jan 01 00:00:03 1970 +0000)
3867
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   692
  |
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   693
  x  7e594302a05d (2) c_B0
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   694
       rewritten(parent) as a65fceb2324a by test (Thu Jan 01 00:00:03 1970 +0000)
3867
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   695
  
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   696
  $ hg log -G
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   697
  @  changeset:   5:a65fceb2324a
3867
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   698
  |  tag:         tip
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   699
  |  user:        test
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   700
  |  date:        Thu Jan 01 00:00:00 1970 +0000
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   701
  |  summary:     c_B0
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   702
  |
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   703
  o  changeset:   4:d952d1794ff6
3867
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   704
  |  parent:      0:eba9c2249fe7
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   705
  |  user:        test
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   706
  |  date:        Thu Jan 01 00:00:00 1970 +0000
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   707
  |  summary:     c_A1
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   708
  |
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   709
  o  changeset:   0:eba9c2249fe7
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   710
     user:        test
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   711
     date:        Thu Jan 01 00:00:00 1970 +0000
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   712
     summary:     c_ROOT
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   713
  
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   714
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   715
Actual rewind
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   716
`````````````
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   717
3868
1742254d1190 rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3867
diff changeset
   718
  $ hg rewind --hidden --to 'min(desc(c_B0))' --exact
3867
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   719
  rewinded to 1 changesets
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   720
  (1 changesets obsoleted)
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   721
  working directory is now at 96622b0702dd
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   722
  $ hg debugobsolete
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   723
  579f120ba91885449adc92eedf48ef3569742cee d952d1794ff657f5c2a82225d2e6307ed930b32f 0 (Thu Jan 01 00:00:03 1970 +0000) {'ef1': '9', 'user': 'test'}
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   724
  ddb26d894c1c661052affbfb400159e34baae86e 0 {579f120ba91885449adc92eedf48ef3569742cee} (Thu Jan 01 00:00:03 1970 +0000) {'ef1': '0', 'user': 'test'}
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   725
  7e594302a05d3769b27be88fc3cdfd39d7498498 a65fceb2324ae1eb1231610193d24a5fa02c7c0e 0 (Thu Jan 01 00:00:03 1970 +0000) {'ef1': '4', 'user': 'test'}
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   726
  7e594302a05d3769b27be88fc3cdfd39d7498498 96622b0702dd86e3a702b0235b420da41f072efe 4 (Thu Jan 01 00:00:03 1970 +0000) {'ef1': '34', 'user': 'test'}
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   727
  a65fceb2324ae1eb1231610193d24a5fa02c7c0e 96622b0702dd86e3a702b0235b420da41f072efe 0 (Thu Jan 01 00:00:03 1970 +0000) {'ef1': '38', 'user': 'test'}
3867
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   728
  $ hg obslog
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   729
  @    96622b0702dd (6) c_B0
3867
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   730
  |\
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   731
  | x  a65fceb2324a (5) c_B0
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   732
  |/     rewritten(meta, date, parent) as 96622b0702dd by test (Thu Jan 01 00:00:03 1970 +0000)
3867
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   733
  |
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   734
  x  7e594302a05d (2) c_B0
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   735
       rewritten(meta, date) as 96622b0702dd by test (Thu Jan 01 00:00:03 1970 +0000)
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   736
       rewritten(parent) as a65fceb2324a by test (Thu Jan 01 00:00:03 1970 +0000)
3867
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   737
  
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   738
  $ hg log -G
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   739
  @  changeset:   6:96622b0702dd
3867
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   740
  |  tag:         tip
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   741
  |  parent:      1:579f120ba918
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   742
  |  user:        test
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   743
  |  date:        Thu Jan 01 00:00:03 1970 +0000
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   744
  |  trouble:     unstable
3867
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   745
  |  summary:     c_B0
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   746
  |
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   747
  | o  changeset:   4:d952d1794ff6
3867
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   748
  | |  parent:      0:eba9c2249fe7
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   749
  | |  user:        test
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   750
  | |  date:        Thu Jan 01 00:00:00 1970 +0000
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   751
  | |  summary:     c_A1
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   752
  | |
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   753
  x |  changeset:   1:579f120ba918
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   754
  |/   user:        test
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   755
  |    date:        Thu Jan 01 00:00:00 1970 +0000
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   756
  |    obsolete:    rewritten as d952d1794ff6
3867
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   757
  |    summary:     c_A0
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   758
  |
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   759
  o  changeset:   0:eba9c2249fe7
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   760
     user:        test
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   761
     date:        Thu Jan 01 00:00:00 1970 +0000
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   762
     summary:     c_ROOT
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   763
  
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   764
3872
bbc3cfdfe42b rewind: default to rewinding the current stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3871
diff changeset
   765
Testing default argument (and cleanup)
bbc3cfdfe42b rewind: default to rewinding the current stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3871
diff changeset
   766
``````````````````````````````````````
bbc3cfdfe42b rewind: default to rewinding the current stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3871
diff changeset
   767
bbc3cfdfe42b rewind: default to rewinding the current stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3871
diff changeset
   768
rewind with no argument should be equivalent to `--from .`
3867
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   769
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   770
  $ echo 'default-date = 4 0' >> $HGRCPATH
3871
2e32a1ef0c60 rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3870
diff changeset
   771
  $ hg rewind --from '.'
3867
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   772
  rewinded to 1 changesets
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   773
  (1 changesets obsoleted)
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   774
  working directory is now at 7b1440274cc3
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   775
  $ echo 'default-date = 5 0' >> $HGRCPATH
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   776
  $ hg log -G
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   777
  @  changeset:   7:7b1440274cc3
3867
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   778
  |  tag:         tip
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   779
  |  parent:      4:d952d1794ff6
3867
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   780
  |  user:        test
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   781
  |  date:        Thu Jan 01 00:00:04 1970 +0000
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   782
  |  summary:     c_B0
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   783
  |
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   784
  o  changeset:   4:d952d1794ff6
3867
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   785
  |  parent:      0:eba9c2249fe7
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   786
  |  user:        test
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   787
  |  date:        Thu Jan 01 00:00:00 1970 +0000
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   788
  |  summary:     c_A1
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   789
  |
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   790
  o  changeset:   0:eba9c2249fe7
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   791
     user:        test
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   792
     date:        Thu Jan 01 00:00:00 1970 +0000
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   793
     summary:     c_ROOT
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   794
  
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   795
  $ hg debugobsolete
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   796
  579f120ba91885449adc92eedf48ef3569742cee d952d1794ff657f5c2a82225d2e6307ed930b32f 0 (Thu Jan 01 00:00:03 1970 +0000) {'ef1': '9', 'user': 'test'}
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   797
  ddb26d894c1c661052affbfb400159e34baae86e 0 {579f120ba91885449adc92eedf48ef3569742cee} (Thu Jan 01 00:00:03 1970 +0000) {'ef1': '0', 'user': 'test'}
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   798
  7e594302a05d3769b27be88fc3cdfd39d7498498 a65fceb2324ae1eb1231610193d24a5fa02c7c0e 0 (Thu Jan 01 00:00:03 1970 +0000) {'ef1': '4', 'user': 'test'}
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   799
  7e594302a05d3769b27be88fc3cdfd39d7498498 96622b0702dd86e3a702b0235b420da41f072efe 4 (Thu Jan 01 00:00:03 1970 +0000) {'ef1': '34', 'user': 'test'}
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   800
  a65fceb2324ae1eb1231610193d24a5fa02c7c0e 96622b0702dd86e3a702b0235b420da41f072efe 0 (Thu Jan 01 00:00:03 1970 +0000) {'ef1': '38', 'user': 'test'}
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   801
  a65fceb2324ae1eb1231610193d24a5fa02c7c0e 7b1440274cc3b3f8bfcffc891172a7d2d7e9140c 4 (Thu Jan 01 00:00:04 1970 +0000) {'ef1': '34', 'user': 'test'}
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   802
  96622b0702dd86e3a702b0235b420da41f072efe 7b1440274cc3b3f8bfcffc891172a7d2d7e9140c 0 (Thu Jan 01 00:00:04 1970 +0000) {'ef1': '38', 'user': 'test'}
3867
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   803
  $ hg obslog
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   804
  @    7b1440274cc3 (7) c_B0
3867
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   805
  |\
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   806
  x |  96622b0702dd (6) c_B0
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   807
  |\|    rewritten(meta, date, parent) as 7b1440274cc3 by test (Thu Jan 01 00:00:04 1970 +0000)
3867
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   808
  | |
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   809
  | x  a65fceb2324a (5) c_B0
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   810
  |/     rewritten(meta, date) as 7b1440274cc3 by test (Thu Jan 01 00:00:04 1970 +0000)
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   811
  |      rewritten(meta, date, parent) as 96622b0702dd by test (Thu Jan 01 00:00:03 1970 +0000)
3867
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   812
  |
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   813
  x  7e594302a05d (2) c_B0
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   814
       rewritten(meta, date) as 96622b0702dd by test (Thu Jan 01 00:00:03 1970 +0000)
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   815
       rewritten(parent) as a65fceb2324a by test (Thu Jan 01 00:00:03 1970 +0000)
3867
339b05c3e929 rewind: add a test about rewinding top of stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3866
diff changeset
   816
  
3871
2e32a1ef0c60 rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3870
diff changeset
   817
Automatically rewinding the full stack (with --to)
2e32a1ef0c60 rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3870
diff changeset
   818
--------------------------------------------------
3868
1742254d1190 rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3867
diff changeset
   819
3870
e0bf44befd6e evolve: exclude "identical" precursors from the precursors set
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3868
diff changeset
   820
  $ hg rewind --hidden --to 'precursors(.)'
3868
1742254d1190 rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3867
diff changeset
   821
  rewinded to 2 changesets
1742254d1190 rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3867
diff changeset
   822
  (2 changesets obsoleted)
1742254d1190 rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3867
diff changeset
   823
  working directory is now at 70892f498f29
1742254d1190 rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3867
diff changeset
   824
  $ hg debugobsolete
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   825
  579f120ba91885449adc92eedf48ef3569742cee d952d1794ff657f5c2a82225d2e6307ed930b32f 0 (Thu Jan 01 00:00:03 1970 +0000) {'ef1': '9', 'user': 'test'}
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   826
  ddb26d894c1c661052affbfb400159e34baae86e 0 {579f120ba91885449adc92eedf48ef3569742cee} (Thu Jan 01 00:00:03 1970 +0000) {'ef1': '0', 'user': 'test'}
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   827
  7e594302a05d3769b27be88fc3cdfd39d7498498 a65fceb2324ae1eb1231610193d24a5fa02c7c0e 0 (Thu Jan 01 00:00:03 1970 +0000) {'ef1': '4', 'user': 'test'}
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   828
  7e594302a05d3769b27be88fc3cdfd39d7498498 96622b0702dd86e3a702b0235b420da41f072efe 4 (Thu Jan 01 00:00:03 1970 +0000) {'ef1': '34', 'user': 'test'}
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   829
  a65fceb2324ae1eb1231610193d24a5fa02c7c0e 96622b0702dd86e3a702b0235b420da41f072efe 0 (Thu Jan 01 00:00:03 1970 +0000) {'ef1': '38', 'user': 'test'}
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   830
  a65fceb2324ae1eb1231610193d24a5fa02c7c0e 7b1440274cc3b3f8bfcffc891172a7d2d7e9140c 4 (Thu Jan 01 00:00:04 1970 +0000) {'ef1': '34', 'user': 'test'}
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   831
  96622b0702dd86e3a702b0235b420da41f072efe 7b1440274cc3b3f8bfcffc891172a7d2d7e9140c 0 (Thu Jan 01 00:00:04 1970 +0000) {'ef1': '38', 'user': 'test'}
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   832
  579f120ba91885449adc92eedf48ef3569742cee c0d232501dd8e52b8ca8a266f25db89f5120c17f 4 (Thu Jan 01 00:00:05 1970 +0000) {'ef1': '34', 'user': 'test'}
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   833
  96622b0702dd86e3a702b0235b420da41f072efe 70892f498f2993d626848bb312ff856168d0b9c4 4 (Thu Jan 01 00:00:05 1970 +0000) {'ef1': '38', 'user': 'test'}
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   834
  7b1440274cc3b3f8bfcffc891172a7d2d7e9140c 70892f498f2993d626848bb312ff856168d0b9c4 0 (Thu Jan 01 00:00:05 1970 +0000) {'ef1': '38', 'user': 'test'}
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   835
  d952d1794ff657f5c2a82225d2e6307ed930b32f c0d232501dd8e52b8ca8a266f25db89f5120c17f 0 (Thu Jan 01 00:00:05 1970 +0000) {'ef1': '43', 'user': 'test'}
3868
1742254d1190 rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3867
diff changeset
   836
  $ hg obslog
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   837
  @    70892f498f29 (9) c_B0
3868
1742254d1190 rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3867
diff changeset
   838
  |\
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   839
  x |  7b1440274cc3 (7) c_B0
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   840
  |\|    rewritten(meta, date, parent) as 70892f498f29 by test (Thu Jan 01 00:00:05 1970 +0000)
3868
1742254d1190 rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3867
diff changeset
   841
  | |
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   842
  | x  96622b0702dd (6) c_B0
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   843
  |/|    rewritten(meta, date, parent) as 70892f498f29 by test (Thu Jan 01 00:00:05 1970 +0000)
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   844
  | |    rewritten(meta, date, parent) as 7b1440274cc3 by test (Thu Jan 01 00:00:04 1970 +0000)
3868
1742254d1190 rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3867
diff changeset
   845
  | |
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   846
  x |  a65fceb2324a (5) c_B0
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   847
  |/     rewritten(meta, date) as 7b1440274cc3 by test (Thu Jan 01 00:00:04 1970 +0000)
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   848
  |      rewritten(meta, date, parent) as 96622b0702dd by test (Thu Jan 01 00:00:03 1970 +0000)
3868
1742254d1190 rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3867
diff changeset
   849
  |
1742254d1190 rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3867
diff changeset
   850
  x  7e594302a05d (2) c_B0
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   851
       rewritten(meta, date) as 96622b0702dd by test (Thu Jan 01 00:00:03 1970 +0000)
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   852
       rewritten(parent) as a65fceb2324a by test (Thu Jan 01 00:00:03 1970 +0000)
3868
1742254d1190 rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3867
diff changeset
   853
  
1742254d1190 rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3867
diff changeset
   854
  $ hg log -G
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   855
  @  changeset:   9:70892f498f29
3868
1742254d1190 rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3867
diff changeset
   856
  |  tag:         tip
1742254d1190 rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3867
diff changeset
   857
  |  user:        test
1742254d1190 rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3867
diff changeset
   858
  |  date:        Thu Jan 01 00:00:05 1970 +0000
1742254d1190 rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3867
diff changeset
   859
  |  summary:     c_B0
1742254d1190 rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3867
diff changeset
   860
  |
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   861
  o  changeset:   8:c0d232501dd8
3868
1742254d1190 rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3867
diff changeset
   862
  |  parent:      0:eba9c2249fe7
1742254d1190 rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3867
diff changeset
   863
  |  user:        test
1742254d1190 rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3867
diff changeset
   864
  |  date:        Thu Jan 01 00:00:05 1970 +0000
1742254d1190 rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3867
diff changeset
   865
  |  summary:     c_A0
1742254d1190 rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3867
diff changeset
   866
  |
1742254d1190 rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3867
diff changeset
   867
  o  changeset:   0:eba9c2249fe7
1742254d1190 rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3867
diff changeset
   868
     user:        test
1742254d1190 rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3867
diff changeset
   869
     date:        Thu Jan 01 00:00:00 1970 +0000
1742254d1190 rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3867
diff changeset
   870
     summary:     c_ROOT
1742254d1190 rewind: automatically rewind entire stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3867
diff changeset
   871
  
3871
2e32a1ef0c60 rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3870
diff changeset
   872
2e32a1ef0c60 rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3870
diff changeset
   873
Automatically rewinding the full stack (with --from)
2e32a1ef0c60 rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3870
diff changeset
   874
----------------------------------------------------
2e32a1ef0c60 rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3870
diff changeset
   875
2e32a1ef0c60 rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3870
diff changeset
   876
  $ echo 'default-date = 6 0' >> $HGRCPATH
2e32a1ef0c60 rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3870
diff changeset
   877
  $ hg rewind --hidden --from '.'
2e32a1ef0c60 rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3870
diff changeset
   878
  rewinded to 2 changesets
2e32a1ef0c60 rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3870
diff changeset
   879
  (2 changesets obsoleted)
2e32a1ef0c60 rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3870
diff changeset
   880
  working directory is now at 141aedbbde8f
2e32a1ef0c60 rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3870
diff changeset
   881
  $ hg debugobsolete
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   882
  579f120ba91885449adc92eedf48ef3569742cee d952d1794ff657f5c2a82225d2e6307ed930b32f 0 (Thu Jan 01 00:00:03 1970 +0000) {'ef1': '9', 'user': 'test'}
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   883
  ddb26d894c1c661052affbfb400159e34baae86e 0 {579f120ba91885449adc92eedf48ef3569742cee} (Thu Jan 01 00:00:03 1970 +0000) {'ef1': '0', 'user': 'test'}
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   884
  7e594302a05d3769b27be88fc3cdfd39d7498498 a65fceb2324ae1eb1231610193d24a5fa02c7c0e 0 (Thu Jan 01 00:00:03 1970 +0000) {'ef1': '4', 'user': 'test'}
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   885
  7e594302a05d3769b27be88fc3cdfd39d7498498 96622b0702dd86e3a702b0235b420da41f072efe 4 (Thu Jan 01 00:00:03 1970 +0000) {'ef1': '34', 'user': 'test'}
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   886
  a65fceb2324ae1eb1231610193d24a5fa02c7c0e 96622b0702dd86e3a702b0235b420da41f072efe 0 (Thu Jan 01 00:00:03 1970 +0000) {'ef1': '38', 'user': 'test'}
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   887
  a65fceb2324ae1eb1231610193d24a5fa02c7c0e 7b1440274cc3b3f8bfcffc891172a7d2d7e9140c 4 (Thu Jan 01 00:00:04 1970 +0000) {'ef1': '34', 'user': 'test'}
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   888
  96622b0702dd86e3a702b0235b420da41f072efe 7b1440274cc3b3f8bfcffc891172a7d2d7e9140c 0 (Thu Jan 01 00:00:04 1970 +0000) {'ef1': '38', 'user': 'test'}
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   889
  579f120ba91885449adc92eedf48ef3569742cee c0d232501dd8e52b8ca8a266f25db89f5120c17f 4 (Thu Jan 01 00:00:05 1970 +0000) {'ef1': '34', 'user': 'test'}
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   890
  96622b0702dd86e3a702b0235b420da41f072efe 70892f498f2993d626848bb312ff856168d0b9c4 4 (Thu Jan 01 00:00:05 1970 +0000) {'ef1': '38', 'user': 'test'}
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   891
  7b1440274cc3b3f8bfcffc891172a7d2d7e9140c 70892f498f2993d626848bb312ff856168d0b9c4 0 (Thu Jan 01 00:00:05 1970 +0000) {'ef1': '38', 'user': 'test'}
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   892
  d952d1794ff657f5c2a82225d2e6307ed930b32f c0d232501dd8e52b8ca8a266f25db89f5120c17f 0 (Thu Jan 01 00:00:05 1970 +0000) {'ef1': '43', 'user': 'test'}
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   893
  d952d1794ff657f5c2a82225d2e6307ed930b32f 7b4aed5e99d2734da6cc25f0095876c5cb6e8084 4 (Thu Jan 01 00:00:06 1970 +0000) {'ef1': '34', 'user': 'test'}
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   894
  7b1440274cc3b3f8bfcffc891172a7d2d7e9140c 141aedbbde8f407fc8a8a7355221733b0fc01ca5 4 (Thu Jan 01 00:00:06 1970 +0000) {'ef1': '38', 'user': 'test'}
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   895
  70892f498f2993d626848bb312ff856168d0b9c4 141aedbbde8f407fc8a8a7355221733b0fc01ca5 0 (Thu Jan 01 00:00:06 1970 +0000) {'ef1': '38', 'user': 'test'}
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   896
  c0d232501dd8e52b8ca8a266f25db89f5120c17f 7b4aed5e99d2734da6cc25f0095876c5cb6e8084 0 (Thu Jan 01 00:00:06 1970 +0000) {'ef1': '43', 'user': 'test'}
3871
2e32a1ef0c60 rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3870
diff changeset
   897
  $ hg obslog
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   898
  @    141aedbbde8f (11) c_B0
3871
2e32a1ef0c60 rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3870
diff changeset
   899
  |\
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   900
  x |  70892f498f29 (9) c_B0
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   901
  |\|    rewritten(meta, date, parent) as 141aedbbde8f by test (Thu Jan 01 00:00:06 1970 +0000)
3871
2e32a1ef0c60 rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3870
diff changeset
   902
  | |
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   903
  | x  7b1440274cc3 (7) c_B0
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   904
  |/|    rewritten(meta, date, parent) as 141aedbbde8f by test (Thu Jan 01 00:00:06 1970 +0000)
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   905
  | |    rewritten(meta, date, parent) as 70892f498f29 by test (Thu Jan 01 00:00:05 1970 +0000)
3871
2e32a1ef0c60 rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3870
diff changeset
   906
  | |
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   907
  x |  96622b0702dd (6) c_B0
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   908
  |\|    rewritten(meta, date, parent) as 70892f498f29 by test (Thu Jan 01 00:00:05 1970 +0000)
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   909
  | |    rewritten(meta, date, parent) as 7b1440274cc3 by test (Thu Jan 01 00:00:04 1970 +0000)
3871
2e32a1ef0c60 rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3870
diff changeset
   910
  | |
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   911
  | x  a65fceb2324a (5) c_B0
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   912
  |/     rewritten(meta, date) as 7b1440274cc3 by test (Thu Jan 01 00:00:04 1970 +0000)
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   913
  |      rewritten(meta, date, parent) as 96622b0702dd by test (Thu Jan 01 00:00:03 1970 +0000)
3871
2e32a1ef0c60 rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3870
diff changeset
   914
  |
2e32a1ef0c60 rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3870
diff changeset
   915
  x  7e594302a05d (2) c_B0
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   916
       rewritten(meta, date) as 96622b0702dd by test (Thu Jan 01 00:00:03 1970 +0000)
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   917
       rewritten(parent) as a65fceb2324a by test (Thu Jan 01 00:00:03 1970 +0000)
3871
2e32a1ef0c60 rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3870
diff changeset
   918
  
2e32a1ef0c60 rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3870
diff changeset
   919
  $ hg log -G
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   920
  @  changeset:   11:141aedbbde8f
3871
2e32a1ef0c60 rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3870
diff changeset
   921
  |  tag:         tip
2e32a1ef0c60 rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3870
diff changeset
   922
  |  user:        test
2e32a1ef0c60 rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3870
diff changeset
   923
  |  date:        Thu Jan 01 00:00:06 1970 +0000
2e32a1ef0c60 rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3870
diff changeset
   924
  |  summary:     c_B0
2e32a1ef0c60 rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3870
diff changeset
   925
  |
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   926
  o  changeset:   10:7b4aed5e99d2
3871
2e32a1ef0c60 rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3870
diff changeset
   927
  |  parent:      0:eba9c2249fe7
2e32a1ef0c60 rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3870
diff changeset
   928
  |  user:        test
2e32a1ef0c60 rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3870
diff changeset
   929
  |  date:        Thu Jan 01 00:00:06 1970 +0000
2e32a1ef0c60 rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3870
diff changeset
   930
  |  summary:     c_A1
2e32a1ef0c60 rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3870
diff changeset
   931
  |
2e32a1ef0c60 rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3870
diff changeset
   932
  o  changeset:   0:eba9c2249fe7
2e32a1ef0c60 rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3870
diff changeset
   933
     user:        test
2e32a1ef0c60 rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3870
diff changeset
   934
     date:        Thu Jan 01 00:00:00 1970 +0000
2e32a1ef0c60 rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3870
diff changeset
   935
     summary:     c_ROOT
2e32a1ef0c60 rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3870
diff changeset
   936
  
3873
b81fd1487e04 rewing: prevent rewind in case of uncommitted changes
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3872
diff changeset
   937
  $ cd ..
b81fd1487e04 rewing: prevent rewind in case of uncommitted changes
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3872
diff changeset
   938
b81fd1487e04 rewing: prevent rewind in case of uncommitted changes
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3872
diff changeset
   939
Check error cases
b81fd1487e04 rewing: prevent rewind in case of uncommitted changes
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3872
diff changeset
   940
=================
b81fd1487e04 rewing: prevent rewind in case of uncommitted changes
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3872
diff changeset
   941
b81fd1487e04 rewing: prevent rewind in case of uncommitted changes
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3872
diff changeset
   942
  $ hg clone rewind-testing-base rewind-testing-error
b81fd1487e04 rewing: prevent rewind in case of uncommitted changes
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3872
diff changeset
   943
  updating to branch default
b81fd1487e04 rewing: prevent rewind in case of uncommitted changes
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3872
diff changeset
   944
  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
b81fd1487e04 rewing: prevent rewind in case of uncommitted changes
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3872
diff changeset
   945
  $ cd rewind-testing-error
b81fd1487e04 rewing: prevent rewind in case of uncommitted changes
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3872
diff changeset
   946
b81fd1487e04 rewing: prevent rewind in case of uncommitted changes
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3872
diff changeset
   947
Uncommited changes
b81fd1487e04 rewing: prevent rewind in case of uncommitted changes
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3872
diff changeset
   948
------------------
b81fd1487e04 rewing: prevent rewind in case of uncommitted changes
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3872
diff changeset
   949
b81fd1487e04 rewing: prevent rewind in case of uncommitted changes
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3872
diff changeset
   950
  $ echo C > C
b81fd1487e04 rewing: prevent rewind in case of uncommitted changes
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3872
diff changeset
   951
  $ hg add C
b81fd1487e04 rewing: prevent rewind in case of uncommitted changes
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3872
diff changeset
   952
  $ hg rewind
b81fd1487e04 rewing: prevent rewind in case of uncommitted changes
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3872
diff changeset
   953
  abort: uncommitted changes
b81fd1487e04 rewing: prevent rewind in case of uncommitted changes
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3872
diff changeset
   954
  [255]