tests/test-inhibit.t
author Pierre-Yves David <pierre-yves.david@fb.com>
Fri, 06 Mar 2015 21:25:44 -0800
changeset 1224 859a854cedc3
child 1225 577f5340be6f
permissions -rw-r--r--
add a 'inhibit' extension This extension will be used to reduce the scope of evolve in order to make some of its features available to the mass earlier. See extension documentation for details.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1224
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     1
  $ cat >> $HGRCPATH <<EOF
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     2
  > [ui]
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     3
  > logtemplate = {rev}:{node|short} {desc}\n
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     4
  > [extensions]
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     5
  > EOF
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     6
  $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext/evolve.py" >> $HGRCPATH
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     7
  $ echo "inhibit=$(echo $(dirname $TESTDIR))/hgext/inhibit.py" >> $HGRCPATH
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     8
  $ mkcommit() {
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     9
  >    echo "$1" > "$1"
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    10
  >    hg add "$1"
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    11
  >    hg ci -m "add $1"
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    12
  > }
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    13
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    14
  $ hg init inhibit
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    15
  $ cd inhibit
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    16
  $ mkcommit cA
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    17
  $ mkcommit cB
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    18
  $ mkcommit cC
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    19
  $ mkcommit cD
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    20
  $ hg up 'desc(cA)'
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    21
  0 files updated, 0 files merged, 3 files removed, 0 files unresolved
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    22
  $ mkcommit cE
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    23
  created new head
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    24
  $ mkcommit cG
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    25
  $ mkcommit cH
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    26
  $ mkcommit cJ
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    27
  $ hg log -G 
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    28
  @  7:18214586bf78 add cJ
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    29
  |
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    30
  o  6:cf5c4f4554ce add cH
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    31
  |
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    32
  o  5:5419eb264a33 add cG
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    33
  |
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    34
  o  4:98065434e5c6 add cE
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    35
  |
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    36
  | o  3:2db36d8066ff add cD
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    37
  | |
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    38
  | o  2:7df62a38b9bf add cC
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    39
  | |
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    40
  | o  1:02bcbc3f6e56 add cB
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    41
  |/
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    42
  o  0:54ccbc537fc2 add cA
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    43
  
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    44
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    45
plain prune
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    46
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    47
  $ hg prune 1::
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    48
  3 changesets pruned
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    49
  $ hg log -G
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    50
  @  7:18214586bf78 add cJ
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    51
  |
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    52
  o  6:cf5c4f4554ce add cH
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    53
  |
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    54
  o  5:5419eb264a33 add cG
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    55
  |
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    56
  o  4:98065434e5c6 add cE
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    57
  |
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    58
  o  0:54ccbc537fc2 add cA
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    59
  
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    60
  $ hg debugobsinhibit --hidden 1::
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    61
  $ hg log -G
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    62
  @  7:18214586bf78 add cJ
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    63
  |
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    64
  o  6:cf5c4f4554ce add cH
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    65
  |
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    66
  o  5:5419eb264a33 add cG
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    67
  |
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    68
  o  4:98065434e5c6 add cE
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    69
  |
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    70
  | o  3:2db36d8066ff add cD
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    71
  | |
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    72
  | o  2:7df62a38b9bf add cC
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    73
  | |
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    74
  | o  1:02bcbc3f6e56 add cB
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    75
  |/
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    76
  o  0:54ccbc537fc2 add cA
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    77
  
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    78
  $ hg prune --hidden 1::
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    79
  3 changesets pruned
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    80
  $ hg log -G
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    81
  @  7:18214586bf78 add cJ
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    82
  |
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    83
  o  6:cf5c4f4554ce add cH
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    84
  |
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    85
  o  5:5419eb264a33 add cG
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    86
  |
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    87
  o  4:98065434e5c6 add cE
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    88
  |
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    89
  o  0:54ccbc537fc2 add cA
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    90
  
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    91
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    92
after amend
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    93
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    94
  $ echo babar > cJ
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    95
  $ hg amend
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    96
  $ hg log -G
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    97
  @  9:55c73a90e4b4 add cJ
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    98
  |
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    99
  o  6:cf5c4f4554ce add cH
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   100
  |
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   101
  o  5:5419eb264a33 add cG
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   102
  |
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   103
  o  4:98065434e5c6 add cE
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   104
  |
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   105
  o  0:54ccbc537fc2 add cA
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   106
  
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   107
  $ hg debugobsinhibit --hidden 18214586bf78
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   108
  $ hg log -G
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   109
  @  9:55c73a90e4b4 add cJ
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   110
  |
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   111
  | o  7:18214586bf78 add cJ
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   112
  |/
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   113
  o  6:cf5c4f4554ce add cH
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   114
  |
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   115
  o  5:5419eb264a33 add cG
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   116
  |
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   117
  o  4:98065434e5c6 add cE
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   118
  |
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   119
  o  0:54ccbc537fc2 add cA
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   120
  
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   121
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   122
and no divergence
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   123
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   124
  $ hg summary
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   125
  parent: 9:55c73a90e4b4 tip
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   126
   add cJ
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   127
  branch: default
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   128
  commit: (clean)
859a854cedc3 add a 'inhibit' extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   129
  update: 1 new changesets, 2 branch heads (merge)