tests/test-evolve-list.t
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
Wed, 22 Mar 2017 04:27:42 +0100
changeset 2135 8f63f4b1c33e
parent 1806 9f42f819267b
child 2479 df9233aa4bac
permissions -rw-r--r--
stablerange: add an official warmup function The function is responsible for making sure we have the necessary data for a sets of heads. For now this only warm the depth cache. More will follow soon. Such explicite warmup will be usefull for on disck caching as an early point of writing will be easier.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1634
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
     1
Set up some configs
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
     2
  $ cat >> $HGRCPATH <<EOF
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
     3
  > [extensions]
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
     4
  > rebase=
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
     5
  > EOF
1806
9f42f819267b evolve: move the extensions to 'hgext3rd'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1646
diff changeset
     6
  $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH
1634
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
     7
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
     8
Test the instability listing
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
     9
  $ hg init r2
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
    10
  $ cd r2
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
    11
  $ echo a > a && hg ci -Am a
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
    12
  adding a
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
    13
  $ echo b > b && hg ci -Am b
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
    14
  adding b
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
    15
  $ echo c > c && hg ci -Am c
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
    16
  adding c
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
    17
  $ hg up 0
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
    18
  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
    19
  $ echo a >> a && hg ci --amend -m a
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
    20
  2 new unstable changesets
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
    21
  $ hg evolve --list
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
    22
  d2ae7f538514: b
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
    23
    unstable: cb9a9f314b8b (obsolete parent)
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
    24
  
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
    25
  177f92b77385: c
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
    26
    unstable: d2ae7f538514 (unstable parent)
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
    27
  
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
    28
  $ cd ..
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
    29
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
    30
Test the bumpedness listing
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
    31
  $ hg init r3
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
    32
  $ cd r3
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
    33
  $ echo a > a && hg ci -Am a
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
    34
  adding a
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
    35
  $ echo b > b && hg ci --amend -m ab
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
    36
  $ hg phase --public --rev 0 --hidden
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
    37
  1 new bumped changesets
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
    38
  $ hg evolve --list
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
    39
  88cc282e27fc: ab
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
    40
    bumped: cb9a9f314b8b (immutable precursor)
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
    41
  
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
    42
  $ cd ..
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
    43
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
    44
Test the divergence listing
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
    45
  $ hg init r1
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
    46
  $ cd r1
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
    47
  $ echo a > a && hg ci -Am a
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
    48
  adding a
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
    49
  $ hg up 0
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
    50
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
    51
  $ echo b > b && hg ci -Am b
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
    52
  adding b
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
    53
  $ hg up 0
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
    54
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
    55
  $ echo c > c && hg ci -Am c
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
    56
  adding c
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
    57
  created new head
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
    58
  $ hg up 0
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
    59
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
    60
  $ echo d > d && hg ci -Am d
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
    61
  adding d
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
    62
  created new head
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
    63
  $ hg rebase -s 1 -d 2
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
    64
  rebasing 1:d2ae7f538514 "b"
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
    65
  $ hg rebase -s 1 -d 3 --hidden --config experimental.allowdivergence=True
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
    66
  rebasing 1:d2ae7f538514 "b"
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
    67
  2 new divergent changesets
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
    68
  $ hg evolve --list
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
    69
  c882616e9d84: b
1646
7e1b49cda66c list: report the phase for divergent commits
timeless@gmail.com
parents: 1634
diff changeset
    70
    divergent: a922b3733e98 (draft) (precursor d2ae7f538514)
1634
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
    71
  
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
    72
  a922b3733e98: b
1646
7e1b49cda66c list: report the phase for divergent commits
timeless@gmail.com
parents: 1634
diff changeset
    73
    divergent: c882616e9d84 (draft) (precursor d2ae7f538514)
7e1b49cda66c list: report the phase for divergent commits
timeless@gmail.com
parents: 1634
diff changeset
    74
  
7e1b49cda66c list: report the phase for divergent commits
timeless@gmail.com
parents: 1634
diff changeset
    75
  $ hg phase -p a922b3733e98
7e1b49cda66c list: report the phase for divergent commits
timeless@gmail.com
parents: 1634
diff changeset
    76
  $ hg evolve --list
7e1b49cda66c list: report the phase for divergent commits
timeless@gmail.com
parents: 1634
diff changeset
    77
  c882616e9d84: b
7e1b49cda66c list: report the phase for divergent commits
timeless@gmail.com
parents: 1634
diff changeset
    78
    divergent: a922b3733e98 (public) (precursor d2ae7f538514)
1634
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
    79
  
9ae4e79a28f3 evolve--list: initial implementation
Kostia Balytskyi <ikostia@fb.com>
parents:
diff changeset
    80
  $ cd ..