tests/test-evolve-phase.t
author Pulkit Goyal <7895pulkit@gmail.com>
Fri, 12 Jan 2018 19:23:29 +0530
changeset 3390 b3dbba6e34c9
parent 3388 be41e4740a25
child 3394 d1486760fb8d
permissions -rw-r--r--
evolve: start vendoring third party package cbor This patch adds a third party package named cbor. cbor is a data serialization format and this library provides API to convert Python Objects into cbor formatted data. To know more about cbor, hop onto cbor.io The files are copied from it's official bitbucket repository which is at https://bitbucket.org/bodhisnarkva/cbor/src/113f42203c941470c98f7174065ba9b384cff727/ cbor.py can be found at https://bitbucket.org/bodhisnarkva/cbor/src/113f42203c941470c98f7174065ba9b384cff727/py/cbor/cbor.py # no-check-commit as we are importing a third party package Modified test-check-flake8.t to not lint on thirdparty packages.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3387
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     1
Testing the handling of phases for `hg evolve` command
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     2
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     3
  $ cat >> $HGRCPATH <<EOF
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     4
  > [phases]
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     5
  > publish = False
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     6
  > [alias]
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     7
  > glog = log -G --template='{rev} - {node|short} {desc} ({phase})\n'
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     8
  > [extensions]
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     9
  > EOF
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    10
  $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    11
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    12
Testing when there are no conflicts during evolve
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    13
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    14
  $ hg init noconflict
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    15
  $ cd noconflict
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    16
  $ echo a>a
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    17
  $ hg ci -Aqm a
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    18
  $ echo b>b
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    19
  $ hg ci -Aqm b
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    20
  $ echo c>c
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    21
  $ hg ci -Aqsm c
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    22
  $ hg glog
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    23
  @  2 - 177f92b77385 c (secret)
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    24
  |
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    25
  o  1 - d2ae7f538514 b (draft)
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    26
  |
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    27
  o  0 - cb9a9f314b8b a (draft)
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    28
  
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    29
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    30
  $ hg prev
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    31
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    32
  [1] b
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    33
  $ echo b2>b
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    34
  $ hg amend
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    35
  1 new orphan changesets
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    36
  $ hg evolve
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    37
  move:[2] c
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    38
  atop:[3] b
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    39
  working directory is now at 813dde83a7f3
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    40
  $ hg glog
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    41
  @  4 - 813dde83a7f3 c (secret)
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    42
  |
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    43
  o  3 - fd89d0f19529 b (draft)
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    44
  |
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    45
  o  0 - cb9a9f314b8b a (draft)
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    46
  
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    47
  $ cd ..
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    48
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    49
Testing case when there are conflicts (bug 5720)
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    50
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    51
  $ hg init conflicts
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    52
  $ cd conflicts
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    53
  $ echo a > a
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    54
  $ hg ci -Am a
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    55
  adding a
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    56
  $ echo b > a
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    57
  $ hg ci -m b
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    58
  $ echo c > a
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    59
  $ hg ci -sm c
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    60
  $ hg glog
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    61
  @  2 - 13833940840c c (secret)
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    62
  |
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    63
  o  1 - 1e6c11564562 b (draft)
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    64
  |
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    65
  o  0 - cb9a9f314b8b a (draft)
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    66
  
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    67
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    68
  $ hg prev
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    69
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    70
  [1] b
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    71
  $ echo b2 > a
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    72
  $ hg amend
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    73
  1 new orphan changesets
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    74
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    75
  $ hg glog
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    76
  @  3 - 87495ea7c9ec b (draft)
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    77
  |
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    78
  | *  2 - 13833940840c c (secret)
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    79
  | |
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    80
  | x  1 - 1e6c11564562 b (draft)
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    81
  |/
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    82
  o  0 - cb9a9f314b8b a (draft)
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    83
  
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    84
  $ hg evolve
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    85
  move:[2] c
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    86
  atop:[3] b
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    87
  merging a
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    88
  warning: conflicts while merging a! (edit, then use 'hg resolve --mark')
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    89
  evolve failed!
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    90
  fix conflict and run 'hg evolve --continue' or use 'hg update -C .' to abort
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    91
  abort: unresolved merge conflicts (see hg help resolve)
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    92
  [255]
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    93
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    94
  $ hg glog
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    95
  @  3 - 87495ea7c9ec b (draft)
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    96
  |
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    97
  | *  2 - 13833940840c c (secret)
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    98
  | |
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    99
  | x  1 - 1e6c11564562 b (draft)
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   100
  |/
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   101
  o  0 - cb9a9f314b8b a (draft)
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   102
  
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   103
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   104
  $ echo c2 > a
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   105
  $ hg resolve -m
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   106
  (no more unresolved files)
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   107
  $ hg evolve -c
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   108
  evolving 2:13833940840c "c"
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   109
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   110
  $ hg glog
3388
be41e4740a25 evolve: use phases.new-commit config to retain phase information (issue5720)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3387
diff changeset
   111
  @  4 - 3d2080c198e5 c (secret)
3387
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   112
  |
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   113
  o  3 - 87495ea7c9ec b (draft)
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   114
  |
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   115
  o  0 - cb9a9f314b8b a (draft)
b3be4797d3c6 tests: add a test demonstarting lose of phase in `hg evolve`
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   116