tests/test-fold.t
author Pierre-Yves David <pierre-yves.david@octobus.net>
Mon, 24 Jul 2017 03:04:20 +0200
changeset 2780 58e4b51ee902
parent 2779 f51efb2bb8c9
child 2783 3e9c3119410a
permissions -rw-r--r--
prefetc: point at the offending changeset when aborting We do our best to display comptact but usable information.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2767
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     1
  $ . $TESTDIR/testlib/common.sh
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     2
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     3
setup
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     4
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     5
  $ cat >> $HGRCPATH <<EOF
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     6
  > [defaults]
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     7
  > fold=-d "0 0"
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     8
  > [extensions]
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     9
  > evolve=
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    10
  > [ui]
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    11
  > logtemplate = '{rev} - {node|short} {desc|firstline} [{author}] ({phase})\n'
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    12
  > EOF
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    13
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    14
  $ hg init fold-tests
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    15
  $ cd fold-tests/
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    16
  $ hg debugbuilddag .+3:branchpoint+4*branchpoint+2
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    17
  $ hg up 'desc("r7")'
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    18
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    19
  $ hg log -G
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    20
  o  10 - a8407f9a3dc1 r10 [debugbuilddag] (draft)
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    21
  |
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    22
  o  9 - 529dfc5bb875 r9 [debugbuilddag] (draft)
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    23
  |
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    24
  o  8 - abf57d94268b r8 [debugbuilddag] (draft)
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    25
  |
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    26
  | @  7 - 4de32a90b66c r7 [debugbuilddag] (draft)
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    27
  | |
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    28
  | o  6 - f69452c5b1af r6 [debugbuilddag] (draft)
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    29
  | |
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    30
  | o  5 - c8d03c1b5e94 r5 [debugbuilddag] (draft)
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    31
  | |
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    32
  | o  4 - bebd167eb94d r4 [debugbuilddag] (draft)
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    33
  |/
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    34
  o  3 - 2dc09a01254d r3 [debugbuilddag] (draft)
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    35
  |
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    36
  o  2 - 01241442b3c2 r2 [debugbuilddag] (draft)
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    37
  |
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    38
  o  1 - 66f7d451a68b r1 [debugbuilddag] (draft)
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    39
  |
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    40
  o  0 - 1ea73414a91b r0 [debugbuilddag] (draft)
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    41
  
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    42
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    43
Test various error case
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    44
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    45
  $ hg fold
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    46
  abort: no revisions specified
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    47
  [255]
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    48
  $ hg fold --from
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    49
  abort: no revisions specified
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    50
  [255]
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    51
  $ hg fold .
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    52
  abort: must specify either --from or --exact
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    53
  [255]
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    54
  $ hg fold --from . --exact
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    55
  abort: cannot use both --from and --exact
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    56
  [255]
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    57
  $ hg fold --from .
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    58
  single revision specified, nothing to fold
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    59
  [1]
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    60
  $ hg fold '0::(7+10)' --exact
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    61
  abort: cannot fold non-linear revisions (multiple heads given)
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    62
  [255]
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    63
  $ hg fold -r 4 -r 6 --exact
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    64
  abort: cannot fold non-linear revisions (multiple roots given)
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    65
  [255]
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    66
  $ hg fold --from 10 1
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    67
  abort: cannot fold non-linear revisions
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    68
  (given revisions are unrelated to parent of working directory)
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    69
  [255]
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    70
  $ hg fold --exact -r "4 and not 4"
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    71
  abort: specified revisions evaluate to an empty set
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    72
  (use different revision arguments)
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    73
  [255]
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    74
  $ hg phase --public 0
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    75
  $ hg fold --from -r 0
2780
58e4b51ee902 prefetc: point at the offending changeset when aborting
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2779
diff changeset
    76
  abort: cannot fold public changesets: 1ea73414a91b
2779
f51efb2bb8c9 precheck: point to 'phase' help when aborting
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2778
diff changeset
    77
  (see 'hg help phases' for details)
2767
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    78
  [255]
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    79
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    80
Test actual folding
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    81
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    82
  $ hg fold --from -r 'desc("r5")'
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    83
  3 changesets folded
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    84
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    85
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    86
(test inherited from test-evolve.t)
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    87
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    88
  $ hg fold --from 6 # want to run hg fold 6
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    89
  abort: hidden revision '6'!
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    90
  (use --hidden to access hidden revisions; successor: 198b5c405d01)
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    91
  [255]
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    92
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    93
  $ hg log -G
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    94
  @  11 - 198b5c405d01 r5 [debugbuilddag] (draft)
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    95
  |
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    96
  | o  10 - a8407f9a3dc1 r10 [debugbuilddag] (draft)
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    97
  | |
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    98
  | o  9 - 529dfc5bb875 r9 [debugbuilddag] (draft)
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    99
  | |
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   100
  | o  8 - abf57d94268b r8 [debugbuilddag] (draft)
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   101
  | |
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   102
  o |  4 - bebd167eb94d r4 [debugbuilddag] (draft)
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   103
  |/
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   104
  o  3 - 2dc09a01254d r3 [debugbuilddag] (draft)
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   105
  |
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   106
  o  2 - 01241442b3c2 r2 [debugbuilddag] (draft)
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   107
  |
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   108
  o  1 - 66f7d451a68b r1 [debugbuilddag] (draft)
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   109
  |
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   110
  o  0 - 1ea73414a91b r0 [debugbuilddag] (public)
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   111
  
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   112
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   113
test fold --exact
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   114
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   115
  $ hg fold --exact 'desc("r8") + desc("r10")'
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   116
  abort: cannot fold non-linear revisions (multiple roots given)
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   117
  [255]
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   118
  $ hg fold --exact 'desc("r8")::desc("r10")'
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   119
  3 changesets folded
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   120
  $ hg log -G
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   121
  o  12 - b568edbee6e0 r8 [debugbuilddag] (draft)
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   122
  |
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   123
  | @  11 - 198b5c405d01 r5 [debugbuilddag] (draft)
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   124
  | |
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   125
  | o  4 - bebd167eb94d r4 [debugbuilddag] (draft)
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   126
  |/
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   127
  o  3 - 2dc09a01254d r3 [debugbuilddag] (draft)
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   128
  |
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   129
  o  2 - 01241442b3c2 r2 [debugbuilddag] (draft)
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   130
  |
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   131
  o  1 - 66f7d451a68b r1 [debugbuilddag] (draft)
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   132
  |
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   133
  o  0 - 1ea73414a91b r0 [debugbuilddag] (public)
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   134
  
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   135
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   136
Test allow unstable
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   137
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   138
  $ echo a > a
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   139
  $ hg add a
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   140
  $ hg commit '-m r11'
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   141
  $ hg up '.^'
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   142
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   143
  $ hg log -G
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   144
  o  13 - 14d0e0da8e91 r11 [test] (draft)
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   145
  |
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   146
  | o  12 - b568edbee6e0 r8 [debugbuilddag] (draft)
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   147
  | |
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   148
  @ |  11 - 198b5c405d01 r5 [debugbuilddag] (draft)
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   149
  | |
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   150
  o |  4 - bebd167eb94d r4 [debugbuilddag] (draft)
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   151
  |/
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   152
  o  3 - 2dc09a01254d r3 [debugbuilddag] (draft)
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   153
  |
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   154
  o  2 - 01241442b3c2 r2 [debugbuilddag] (draft)
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   155
  |
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   156
  o  1 - 66f7d451a68b r1 [debugbuilddag] (draft)
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   157
  |
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   158
  o  0 - 1ea73414a91b r0 [debugbuilddag] (public)
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   159
  
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   160
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   161
  $ cat << EOF >> .hg/hgrc
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   162
  > [experimental]
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   163
  > evolution = createmarkers, allnewcommands
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   164
  > EOF
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   165
  $ hg fold --from 'desc("r4")'
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   166
  abort: cannot fold chain not ending with a head or with branching
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   167
  (new unstable changesets are not allowed)
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   168
  [255]
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   169
  $ hg fold --from 'desc("r3")::desc("r11")'
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   170
  abort: cannot fold chain not ending with a head or with branching
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   171
  (new unstable changesets are not allowed)
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   172
  [255]
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   173
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   174
test --user variant
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   175
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   176
  $ cat << EOF >> .hg/hgrc
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   177
  > [experimental]
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   178
  > evolution = createmarkers, allnewcommands
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   179
  > EOF
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   180
  $ cat << EOF >> .hg/hgrc
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   181
  > [experimental]
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   182
  > evolution = all
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   183
  > EOF
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   184
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   185
  $ hg fold --exact 'desc("r5") + desc("r11")' --user 'Victor Rataxes <victor@rhino.savannah>'
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   186
  2 changesets folded
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   187
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   188
  $ hg log -G
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   189
  @  14 - 29b470a33594 r5 [Victor Rataxes <victor@rhino.savannah>] (draft)
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   190
  |
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   191
  | o  12 - b568edbee6e0 r8 [debugbuilddag] (draft)
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   192
  | |
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   193
  o |  4 - bebd167eb94d r4 [debugbuilddag] (draft)
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   194
  |/
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   195
  o  3 - 2dc09a01254d r3 [debugbuilddag] (draft)
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   196
  |
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   197
  o  2 - 01241442b3c2 r2 [debugbuilddag] (draft)
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   198
  |
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   199
  o  1 - 66f7d451a68b r1 [debugbuilddag] (draft)
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   200
  |
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   201
  o  0 - 1ea73414a91b r0 [debugbuilddag] (public)
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   202
  
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   203
2768
85e5a56db776 fold: add support for the -D and -U options
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2767
diff changeset
   204
  $ hg fold --from 'desc("r4")' -U
85e5a56db776 fold: add support for the -D and -U options
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2767
diff changeset
   205
  2 changesets folded
85e5a56db776 fold: add support for the -D and -U options
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2767
diff changeset
   206
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
85e5a56db776 fold: add support for the -D and -U options
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2767
diff changeset
   207
  $ hg log -G
85e5a56db776 fold: add support for the -D and -U options
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2767
diff changeset
   208
  @  15 - 91880abed0f2 r4 [test] (draft)
85e5a56db776 fold: add support for the -D and -U options
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2767
diff changeset
   209
  |
85e5a56db776 fold: add support for the -D and -U options
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2767
diff changeset
   210
  | o  12 - b568edbee6e0 r8 [debugbuilddag] (draft)
85e5a56db776 fold: add support for the -D and -U options
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2767
diff changeset
   211
  |/
85e5a56db776 fold: add support for the -D and -U options
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2767
diff changeset
   212
  o  3 - 2dc09a01254d r3 [debugbuilddag] (draft)
85e5a56db776 fold: add support for the -D and -U options
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2767
diff changeset
   213
  |
85e5a56db776 fold: add support for the -D and -U options
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2767
diff changeset
   214
  o  2 - 01241442b3c2 r2 [debugbuilddag] (draft)
85e5a56db776 fold: add support for the -D and -U options
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2767
diff changeset
   215
  |
85e5a56db776 fold: add support for the -D and -U options
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2767
diff changeset
   216
  o  1 - 66f7d451a68b r1 [debugbuilddag] (draft)
85e5a56db776 fold: add support for the -D and -U options
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2767
diff changeset
   217
  |
85e5a56db776 fold: add support for the -D and -U options
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2767
diff changeset
   218
  o  0 - 1ea73414a91b r0 [debugbuilddag] (public)
85e5a56db776 fold: add support for the -D and -U options
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2767
diff changeset
   219
  
2767
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   220
  $ cd ..
ab80ef8d0cfa test: extract most fold testing into a test-fold module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   221