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