tests/test-divergent.t
author Boris Feld <boris.feld@octobus.net>
Fri, 15 Sep 2017 15:48:18 +0200
changeset 2929 06844693bb21
parent 2858 4b934144ed11
child 3000 bd7e8be29542
permissions -rw-r--r--
tests: update after removing of redundant amend commit Following e8a7c1a0565a, temporary amend commits has been removed impacting all revision numbers in tests including amend operations. Update tests case to use description or hashes when possible and update revisions number when not.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1467
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
     1
Tests the resolution of divergence
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
     2
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
     3
  $ cat >> $HGRCPATH <<EOF
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
     4
  > [defaults]
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
     5
  > amend=-d "0 0"
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
     6
  > fold=-d "0 0"
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
     7
  > [web]
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
     8
  > push_ssl = false
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
     9
  > allow_push = *
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    10
  > [phases]
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    11
  > publish = False
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    12
  > [diff]
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    13
  > git = 1
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    14
  > unified = 0
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    15
  > [ui]
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    16
  > logtemplate = {rev}:{node|short}@{branch}({phase}) {desc|firstline} [{troubles}]\n
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    17
  > [extensions]
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    18
  > EOF
1806
9f42f819267b evolve: move the extensions to 'hgext3rd'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1630
diff changeset
    19
  $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH
1467
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    20
  $ mkcommit() {
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    21
  >    echo "$1" > "$1"
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    22
  >    hg add "$1"
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    23
  >    hg ci -m "add $1"
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    24
  > }
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    25
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    26
  $ mkcommits() {
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    27
  >   for i in $@; do mkcommit $i ; done
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    28
  > }
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    29
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    30
Basic test of divergence: two divergent changesets with the same parents
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    31
With --all --any we dedupe the divergent and solve the divergence once
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    32
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    33
  $ hg init test1
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    34
  $ cd test1
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    35
  $ mkcommits _a _b
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    36
  $ hg up "desc(_a)"
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    37
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    38
  $ mkcommit bdivergent1
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    39
  created new head
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    40
  $ hg up "desc(_a)"
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    41
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    42
  $ mkcommit bdivergent2
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    43
  created new head
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    44
  $ hg prune -s "desc(bdivergent1)" "desc(_b)"
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    45
  1 changesets pruned
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    46
  $ hg prune -s "desc(bdivergent2)" "desc(_b)" --hidden
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    47
  1 changesets pruned
2858
4b934144ed11 messages: use hyphenated '{phase,content}-divergent' in user messages
Martin von Zweigbergk <martinvonz@google.com>
parents: 2856
diff changeset
    48
  2 new content-divergent changesets
1467
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    49
  $ hg log -G
2835
20c2499ce8bc log: divergent was renamed into contentdivergent
Boris Feld <boris.feld@octobus.net>
parents: 2776
diff changeset
    50
  @  3:e708fd28d5cf@default(draft) add bdivergent2 [content-divergent]
1467
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    51
  |
2835
20c2499ce8bc log: divergent was renamed into contentdivergent
Boris Feld <boris.feld@octobus.net>
parents: 2776
diff changeset
    52
  | o  2:c2f698071cba@default(draft) add bdivergent1 [content-divergent]
1467
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    53
  |/
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    54
  o  0:135f39f4bd78@default(draft) add _a []
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    55
  
2835
20c2499ce8bc log: divergent was renamed into contentdivergent
Boris Feld <boris.feld@octobus.net>
parents: 2776
diff changeset
    56
  $ hg evolve --all --any --contentdivergent
1467
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    57
  merge:[2] add bdivergent1
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    58
  with: [3] add bdivergent2
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    59
  base: [1] add _b
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    60
  updating to "local" conflict
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    61
  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    62
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    63
  working directory is now at c26f1d3baed2
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    64
  $ hg log -G
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2858
diff changeset
    65
  @  4:c26f1d3baed2@default(draft) add bdivergent1 []
1467
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    66
  |
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    67
  o  0:135f39f4bd78@default(draft) add _a []
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    68
  
1536
9afe9e0191a1 evolve: evolve --divergent failed when merge had nothing to do (issue4950)
Laurent Charignon <lcharignon@fb.com>
parents: 1467
diff changeset
    69
Test divergence resolution when it yields to an empty commit (issue4950)
9afe9e0191a1 evolve: evolve --divergent failed when merge had nothing to do (issue4950)
Laurent Charignon <lcharignon@fb.com>
parents: 1467
diff changeset
    70
cdivergent2 contains the same content than cdivergent1 and they are divergent
9afe9e0191a1 evolve: evolve --divergent failed when merge had nothing to do (issue4950)
Laurent Charignon <lcharignon@fb.com>
parents: 1467
diff changeset
    71
versions of the revision _c
9afe9e0191a1 evolve: evolve --divergent failed when merge had nothing to do (issue4950)
Laurent Charignon <lcharignon@fb.com>
parents: 1467
diff changeset
    72
9afe9e0191a1 evolve: evolve --divergent failed when merge had nothing to do (issue4950)
Laurent Charignon <lcharignon@fb.com>
parents: 1467
diff changeset
    73
  $ hg up "desc(_a)"
9afe9e0191a1 evolve: evolve --divergent failed when merge had nothing to do (issue4950)
Laurent Charignon <lcharignon@fb.com>
parents: 1467
diff changeset
    74
  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
9afe9e0191a1 evolve: evolve --divergent failed when merge had nothing to do (issue4950)
Laurent Charignon <lcharignon@fb.com>
parents: 1467
diff changeset
    75
  $ mkcommit _c
9afe9e0191a1 evolve: evolve --divergent failed when merge had nothing to do (issue4950)
Laurent Charignon <lcharignon@fb.com>
parents: 1467
diff changeset
    76
  created new head
9afe9e0191a1 evolve: evolve --divergent failed when merge had nothing to do (issue4950)
Laurent Charignon <lcharignon@fb.com>
parents: 1467
diff changeset
    77
  $ hg up "desc(_a)"
9afe9e0191a1 evolve: evolve --divergent failed when merge had nothing to do (issue4950)
Laurent Charignon <lcharignon@fb.com>
parents: 1467
diff changeset
    78
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
9afe9e0191a1 evolve: evolve --divergent failed when merge had nothing to do (issue4950)
Laurent Charignon <lcharignon@fb.com>
parents: 1467
diff changeset
    79
  $ mkcommit cdivergent1
9afe9e0191a1 evolve: evolve --divergent failed when merge had nothing to do (issue4950)
Laurent Charignon <lcharignon@fb.com>
parents: 1467
diff changeset
    80
  created new head
9afe9e0191a1 evolve: evolve --divergent failed when merge had nothing to do (issue4950)
Laurent Charignon <lcharignon@fb.com>
parents: 1467
diff changeset
    81
  $ hg up "desc(_a)"
9afe9e0191a1 evolve: evolve --divergent failed when merge had nothing to do (issue4950)
Laurent Charignon <lcharignon@fb.com>
parents: 1467
diff changeset
    82
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
9afe9e0191a1 evolve: evolve --divergent failed when merge had nothing to do (issue4950)
Laurent Charignon <lcharignon@fb.com>
parents: 1467
diff changeset
    83
  $ echo "cdivergent1" > cdivergent1
9afe9e0191a1 evolve: evolve --divergent failed when merge had nothing to do (issue4950)
Laurent Charignon <lcharignon@fb.com>
parents: 1467
diff changeset
    84
  $ hg add cdivergent1
9afe9e0191a1 evolve: evolve --divergent failed when merge had nothing to do (issue4950)
Laurent Charignon <lcharignon@fb.com>
parents: 1467
diff changeset
    85
  $ hg ci -m "cdivergent2"
9afe9e0191a1 evolve: evolve --divergent failed when merge had nothing to do (issue4950)
Laurent Charignon <lcharignon@fb.com>
parents: 1467
diff changeset
    86
  created new head
9afe9e0191a1 evolve: evolve --divergent failed when merge had nothing to do (issue4950)
Laurent Charignon <lcharignon@fb.com>
parents: 1467
diff changeset
    87
  $ hg prune -s "desc(cdivergent1)" "desc(_c)"
9afe9e0191a1 evolve: evolve --divergent failed when merge had nothing to do (issue4950)
Laurent Charignon <lcharignon@fb.com>
parents: 1467
diff changeset
    88
  1 changesets pruned
9afe9e0191a1 evolve: evolve --divergent failed when merge had nothing to do (issue4950)
Laurent Charignon <lcharignon@fb.com>
parents: 1467
diff changeset
    89
  $ hg prune -s "desc(cdivergent2)" "desc(_c)" --hidden
9afe9e0191a1 evolve: evolve --divergent failed when merge had nothing to do (issue4950)
Laurent Charignon <lcharignon@fb.com>
parents: 1467
diff changeset
    90
  1 changesets pruned
2858
4b934144ed11 messages: use hyphenated '{phase,content}-divergent' in user messages
Martin von Zweigbergk <martinvonz@google.com>
parents: 2856
diff changeset
    91
  2 new content-divergent changesets
1536
9afe9e0191a1 evolve: evolve --divergent failed when merge had nothing to do (issue4950)
Laurent Charignon <lcharignon@fb.com>
parents: 1467
diff changeset
    92
  $ hg log -G
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2858
diff changeset
    93
  @  7:0a768ef678d9@default(draft) cdivergent2 [content-divergent]
1536
9afe9e0191a1 evolve: evolve --divergent failed when merge had nothing to do (issue4950)
Laurent Charignon <lcharignon@fb.com>
parents: 1467
diff changeset
    94
  |
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2858
diff changeset
    95
  | o  6:26c7705fee96@default(draft) add cdivergent1 [content-divergent]
1536
9afe9e0191a1 evolve: evolve --divergent failed when merge had nothing to do (issue4950)
Laurent Charignon <lcharignon@fb.com>
parents: 1467
diff changeset
    96
  |/
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2858
diff changeset
    97
  | o  4:c26f1d3baed2@default(draft) add bdivergent1 []
1536
9afe9e0191a1 evolve: evolve --divergent failed when merge had nothing to do (issue4950)
Laurent Charignon <lcharignon@fb.com>
parents: 1467
diff changeset
    98
  |/
9afe9e0191a1 evolve: evolve --divergent failed when merge had nothing to do (issue4950)
Laurent Charignon <lcharignon@fb.com>
parents: 1467
diff changeset
    99
  o  0:135f39f4bd78@default(draft) add _a []
9afe9e0191a1 evolve: evolve --divergent failed when merge had nothing to do (issue4950)
Laurent Charignon <lcharignon@fb.com>
parents: 1467
diff changeset
   100
  
2835
20c2499ce8bc log: divergent was renamed into contentdivergent
Boris Feld <boris.feld@octobus.net>
parents: 2776
diff changeset
   101
  $ hg evolve --all --any --contentdivergent
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2858
diff changeset
   102
  merge:[6] add cdivergent1
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2858
diff changeset
   103
  with: [7] cdivergent2
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2858
diff changeset
   104
  base: [5] add _c
1536
9afe9e0191a1 evolve: evolve --divergent failed when merge had nothing to do (issue4950)
Laurent Charignon <lcharignon@fb.com>
parents: 1467
diff changeset
   105
  updating to "local" conflict
9afe9e0191a1 evolve: evolve --divergent failed when merge had nothing to do (issue4950)
Laurent Charignon <lcharignon@fb.com>
parents: 1467
diff changeset
   106
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
9afe9e0191a1 evolve: evolve --divergent failed when merge had nothing to do (issue4950)
Laurent Charignon <lcharignon@fb.com>
parents: 1467
diff changeset
   107
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2858
diff changeset
   108
  nothing changed
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2858
diff changeset
   109
  working directory is now at 26c7705fee96
1630
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   110
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   111
Test None docstring issue of evolve divergent, which caused hg crush
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   112
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   113
  $ hg init test2
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   114
  $ cd test2
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   115
  $ mkcommits _a _b
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   116
  $ hg up "desc(_a)"
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   117
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   118
  $ mkcommit bdivergent1
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   119
  created new head
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   120
  $ hg up "desc(_a)"
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   121
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   122
  $ mkcommit bdivergent2
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   123
  created new head
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   124
  $ hg prune -s "desc(bdivergent1)" "desc(_b)"
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   125
  1 changesets pruned
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   126
  $ hg prune -s "desc(bdivergent2)" "desc(_b)" --hidden
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   127
  1 changesets pruned
2858
4b934144ed11 messages: use hyphenated '{phase,content}-divergent' in user messages
Martin von Zweigbergk <martinvonz@google.com>
parents: 2856
diff changeset
   128
  2 new content-divergent changesets
1630
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   129
  $ hg log -G
2835
20c2499ce8bc log: divergent was renamed into contentdivergent
Boris Feld <boris.feld@octobus.net>
parents: 2776
diff changeset
   130
  @  3:e708fd28d5cf@default(draft) add bdivergent2 [content-divergent]
1630
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   131
  |
2835
20c2499ce8bc log: divergent was renamed into contentdivergent
Boris Feld <boris.feld@octobus.net>
parents: 2776
diff changeset
   132
  | o  2:c2f698071cba@default(draft) add bdivergent1 [content-divergent]
1630
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   133
  |/
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   134
  o  0:135f39f4bd78@default(draft) add _a []
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   135
  
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   136
  $ cat >$TESTTMP/test_extension.py  << EOF
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   137
  > from mercurial import merge
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   138
  > origupdate = merge.update
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   139
  > def newupdate(*args, **kwargs):
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   140
  >   return origupdate(*args, **kwargs)
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   141
  > merge.update = newupdate
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   142
  > EOF
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   143
  $ cat >> $HGRCPATH << EOF
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   144
  > [extensions]
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   145
  > testextension=$TESTTMP/test_extension.py
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   146
  > EOF
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   147
  $ hg evolve --all
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   148
  nothing to evolve on current working copy parent
2835
20c2499ce8bc log: divergent was renamed into contentdivergent
Boris Feld <boris.feld@octobus.net>
parents: 2776
diff changeset
   149
  (do you want to use --contentdivergent)
1630
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   150
  [2]
2835
20c2499ce8bc log: divergent was renamed into contentdivergent
Boris Feld <boris.feld@octobus.net>
parents: 2776
diff changeset
   151
  $ hg evolve --contentdivergent
1630
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   152
  merge:[3] add bdivergent2
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   153
  with: [2] add bdivergent1
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   154
  base: [1] add _b
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   155
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   156
  working directory is now at aa26817f6fbe
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   157
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   158
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   159
  $ cd ..