tests/test-divergent.t
author Pierre-Yves David <pierre-yves.david@octobus.net>
Mon, 19 Nov 2018 02:34:39 +0000
changeset 4264 9882fed37ea9
parent 3846 f9dad99a90d5
child 3930 d00f0c369bc7
permissions -rw-r--r--
compat: drop 4.3 related obsfate code All the necessary piece are supported starting 4.4.
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
3798
7c05ee4a8cc7 tests: don't use mkcommit shell function in test-divergent.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3787
diff changeset
    35
  $ echo a > a
7c05ee4a8cc7 tests: don't use mkcommit shell function in test-divergent.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3787
diff changeset
    36
  $ hg ci -Aqm "added a"
7c05ee4a8cc7 tests: don't use mkcommit shell function in test-divergent.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3787
diff changeset
    37
  $ echo b > b
7c05ee4a8cc7 tests: don't use mkcommit shell function in test-divergent.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3787
diff changeset
    38
  $ hg ci -Aqm "added b"
7c05ee4a8cc7 tests: don't use mkcommit shell function in test-divergent.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3787
diff changeset
    39
7c05ee4a8cc7 tests: don't use mkcommit shell function in test-divergent.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3787
diff changeset
    40
  $ hg up .^
1467
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
3798
7c05ee4a8cc7 tests: don't use mkcommit shell function in test-divergent.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3787
diff changeset
    42
  $ echo bdivergent > bdivergent1
3799
037ccbf41c6d tests: make sure we don't result in commit messages conflict
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3798
diff changeset
    43
  $ hg ci -Am "divergent"
3798
7c05ee4a8cc7 tests: don't use mkcommit shell function in test-divergent.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3787
diff changeset
    44
  adding bdivergent1
1467
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    45
  created new head
3798
7c05ee4a8cc7 tests: don't use mkcommit shell function in test-divergent.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3787
diff changeset
    46
7c05ee4a8cc7 tests: don't use mkcommit shell function in test-divergent.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3787
diff changeset
    47
  $ hg up .^
1467
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    48
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
3798
7c05ee4a8cc7 tests: don't use mkcommit shell function in test-divergent.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3787
diff changeset
    49
  $ echo bdivergent > bdivergent2
3799
037ccbf41c6d tests: make sure we don't result in commit messages conflict
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3798
diff changeset
    50
  $ hg ci -Am "divergent"
3798
7c05ee4a8cc7 tests: don't use mkcommit shell function in test-divergent.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3787
diff changeset
    51
  adding bdivergent2
1467
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    52
  created new head
3798
7c05ee4a8cc7 tests: don't use mkcommit shell function in test-divergent.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3787
diff changeset
    53
3799
037ccbf41c6d tests: make sure we don't result in commit messages conflict
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3798
diff changeset
    54
  $ hg prune -s 8374d2ddc3a4 "desc('added b')"
1467
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    55
  1 changesets pruned
3799
037ccbf41c6d tests: make sure we don't result in commit messages conflict
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3798
diff changeset
    56
  $ hg prune -s 593c57f2117e "desc('added b')" --hidden
1467
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    57
  1 changesets pruned
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
    58
  2 new content-divergent changesets
3798
7c05ee4a8cc7 tests: don't use mkcommit shell function in test-divergent.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3787
diff changeset
    59
1467
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    60
  $ hg log -G
3799
037ccbf41c6d tests: make sure we don't result in commit messages conflict
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3798
diff changeset
    61
  @  3:8374d2ddc3a4@default(draft) divergent [content-divergent]
1467
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    62
  |
3799
037ccbf41c6d tests: make sure we don't result in commit messages conflict
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3798
diff changeset
    63
  | *  2:593c57f2117e@default(draft) divergent [content-divergent]
1467
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    64
  |/
3798
7c05ee4a8cc7 tests: don't use mkcommit shell function in test-divergent.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3787
diff changeset
    65
  o  0:9092f1db7931@default(draft) added a []
1467
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    66
  
3798
7c05ee4a8cc7 tests: don't use mkcommit shell function in test-divergent.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3787
diff changeset
    67
3154
406992d0d611 evolve: rename --contentdivergent flag to --content-divergent
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3013
diff changeset
    68
  $ hg evolve --all --any --content-divergent
3799
037ccbf41c6d tests: make sure we don't result in commit messages conflict
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3798
diff changeset
    69
  merge:[2] divergent
037ccbf41c6d tests: make sure we don't result in commit messages conflict
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3798
diff changeset
    70
  with: [3] divergent
3798
7c05ee4a8cc7 tests: don't use mkcommit shell function in test-divergent.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3787
diff changeset
    71
  base: [1] added b
3799
037ccbf41c6d tests: make sure we don't result in commit messages conflict
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3798
diff changeset
    72
  updating to "local" side of the conflict: 593c57f2117e
037ccbf41c6d tests: make sure we don't result in commit messages conflict
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3798
diff changeset
    73
  merging "other" content-divergent changeset '8374d2ddc3a4'
1467
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    74
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
3846
f9dad99a90d5 evolve: create a new commit instead of amending one of the divergents
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3799
diff changeset
    75
  working directory is now at 45bf1312f454
1467
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    76
  $ hg log -G
3846
f9dad99a90d5 evolve: create a new commit instead of amending one of the divergents
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3799
diff changeset
    77
  @  4:45bf1312f454@default(draft) divergent []
1467
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    78
  |
3798
7c05ee4a8cc7 tests: don't use mkcommit shell function in test-divergent.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3787
diff changeset
    79
  o  0:9092f1db7931@default(draft) added a []
1467
5c385b812500 evolve: dedupe divergents when running evolve --all --any or evolve --rev
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    80
  
1536
9afe9e0191a1 evolve: evolve --divergent failed when merge had nothing to do (issue4950)
Laurent Charignon <lcharignon@fb.com>
parents: 1467
diff changeset
    81
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
    82
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
    83
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
    84
3798
7c05ee4a8cc7 tests: don't use mkcommit shell function in test-divergent.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3787
diff changeset
    85
  $ hg up .^
1536
9afe9e0191a1 evolve: evolve --divergent failed when merge had nothing to do (issue4950)
Laurent Charignon <lcharignon@fb.com>
parents: 1467
diff changeset
    86
  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
    87
  $ mkcommit _c
9afe9e0191a1 evolve: evolve --divergent failed when merge had nothing to do (issue4950)
Laurent Charignon <lcharignon@fb.com>
parents: 1467
diff changeset
    88
  created new head
3798
7c05ee4a8cc7 tests: don't use mkcommit shell function in test-divergent.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3787
diff changeset
    89
7c05ee4a8cc7 tests: don't use mkcommit shell function in test-divergent.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3787
diff changeset
    90
  $ hg up .^
1536
9afe9e0191a1 evolve: evolve --divergent failed when merge had nothing to do (issue4950)
Laurent Charignon <lcharignon@fb.com>
parents: 1467
diff changeset
    91
  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
    92
  $ mkcommit cdivergent1
9afe9e0191a1 evolve: evolve --divergent failed when merge had nothing to do (issue4950)
Laurent Charignon <lcharignon@fb.com>
parents: 1467
diff changeset
    93
  created new head
3798
7c05ee4a8cc7 tests: don't use mkcommit shell function in test-divergent.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3787
diff changeset
    94
7c05ee4a8cc7 tests: don't use mkcommit shell function in test-divergent.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3787
diff changeset
    95
  $ hg up .^
1536
9afe9e0191a1 evolve: evolve --divergent failed when merge had nothing to do (issue4950)
Laurent Charignon <lcharignon@fb.com>
parents: 1467
diff changeset
    96
  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
    97
  $ echo "cdivergent1" > cdivergent1
9afe9e0191a1 evolve: evolve --divergent failed when merge had nothing to do (issue4950)
Laurent Charignon <lcharignon@fb.com>
parents: 1467
diff changeset
    98
  $ hg add cdivergent1
3799
037ccbf41c6d tests: make sure we don't result in commit messages conflict
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3798
diff changeset
    99
  $ hg ci -m "add _c"
1536
9afe9e0191a1 evolve: evolve --divergent failed when merge had nothing to do (issue4950)
Laurent Charignon <lcharignon@fb.com>
parents: 1467
diff changeset
   100
  created new head
3798
7c05ee4a8cc7 tests: don't use mkcommit shell function in test-divergent.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3787
diff changeset
   101
3799
037ccbf41c6d tests: make sure we don't result in commit messages conflict
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3798
diff changeset
   102
  $ hg log -G
037ccbf41c6d tests: make sure we don't result in commit messages conflict
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3798
diff changeset
   103
  @  7:b2ae71172042@default(draft) add _c []
037ccbf41c6d tests: make sure we don't result in commit messages conflict
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3798
diff changeset
   104
  |
037ccbf41c6d tests: make sure we don't result in commit messages conflict
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3798
diff changeset
   105
  | o  6:e3ff64ce8d4c@default(draft) add cdivergent1 []
037ccbf41c6d tests: make sure we don't result in commit messages conflict
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3798
diff changeset
   106
  |/
037ccbf41c6d tests: make sure we don't result in commit messages conflict
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3798
diff changeset
   107
  | o  5:48819a835615@default(draft) add _c []
037ccbf41c6d tests: make sure we don't result in commit messages conflict
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3798
diff changeset
   108
  |/
3846
f9dad99a90d5 evolve: create a new commit instead of amending one of the divergents
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3799
diff changeset
   109
  | o  4:45bf1312f454@default(draft) divergent []
3799
037ccbf41c6d tests: make sure we don't result in commit messages conflict
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3798
diff changeset
   110
  |/
037ccbf41c6d tests: make sure we don't result in commit messages conflict
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3798
diff changeset
   111
  o  0:9092f1db7931@default(draft) added a []
037ccbf41c6d tests: make sure we don't result in commit messages conflict
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3798
diff changeset
   112
  
037ccbf41c6d tests: make sure we don't result in commit messages conflict
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3798
diff changeset
   113
037ccbf41c6d tests: make sure we don't result in commit messages conflict
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3798
diff changeset
   114
  $ hg prune -s b2ae71172042 48819a835615
1536
9afe9e0191a1 evolve: evolve --divergent failed when merge had nothing to do (issue4950)
Laurent Charignon <lcharignon@fb.com>
parents: 1467
diff changeset
   115
  1 changesets pruned
3799
037ccbf41c6d tests: make sure we don't result in commit messages conflict
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3798
diff changeset
   116
  $ hg prune -s e3ff64ce8d4c 48819a835615 --hidden
1536
9afe9e0191a1 evolve: evolve --divergent failed when merge had nothing to do (issue4950)
Laurent Charignon <lcharignon@fb.com>
parents: 1467
diff changeset
   117
  1 changesets pruned
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   118
  2 new content-divergent changesets
3798
7c05ee4a8cc7 tests: don't use mkcommit shell function in test-divergent.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3787
diff changeset
   119
1536
9afe9e0191a1 evolve: evolve --divergent failed when merge had nothing to do (issue4950)
Laurent Charignon <lcharignon@fb.com>
parents: 1467
diff changeset
   120
  $ hg log -G
3799
037ccbf41c6d tests: make sure we don't result in commit messages conflict
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3798
diff changeset
   121
  @  7:b2ae71172042@default(draft) add _c [content-divergent]
1536
9afe9e0191a1 evolve: evolve --divergent failed when merge had nothing to do (issue4950)
Laurent Charignon <lcharignon@fb.com>
parents: 1467
diff changeset
   122
  |
3798
7c05ee4a8cc7 tests: don't use mkcommit shell function in test-divergent.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3787
diff changeset
   123
  | *  6:e3ff64ce8d4c@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
   124
  |/
3846
f9dad99a90d5 evolve: create a new commit instead of amending one of the divergents
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3799
diff changeset
   125
  | o  4:45bf1312f454@default(draft) divergent []
1536
9afe9e0191a1 evolve: evolve --divergent failed when merge had nothing to do (issue4950)
Laurent Charignon <lcharignon@fb.com>
parents: 1467
diff changeset
   126
  |/
3798
7c05ee4a8cc7 tests: don't use mkcommit shell function in test-divergent.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3787
diff changeset
   127
  o  0:9092f1db7931@default(draft) added a []
1536
9afe9e0191a1 evolve: evolve --divergent failed when merge had nothing to do (issue4950)
Laurent Charignon <lcharignon@fb.com>
parents: 1467
diff changeset
   128
  
3154
406992d0d611 evolve: rename --contentdivergent flag to --content-divergent
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3013
diff changeset
   129
  $ hg evolve --all --any --content-divergent
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   130
  merge:[6] add cdivergent1
3799
037ccbf41c6d tests: make sure we don't result in commit messages conflict
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3798
diff changeset
   131
  with: [7] add _c
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   132
  base: [5] add _c
3798
7c05ee4a8cc7 tests: don't use mkcommit shell function in test-divergent.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3787
diff changeset
   133
  updating to "local" side of the conflict: e3ff64ce8d4c
3799
037ccbf41c6d tests: make sure we don't result in commit messages conflict
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3798
diff changeset
   134
  merging "other" content-divergent changeset 'b2ae71172042'
1536
9afe9e0191a1 evolve: evolve --divergent failed when merge had nothing to do (issue4950)
Laurent Charignon <lcharignon@fb.com>
parents: 1467
diff changeset
   135
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   136
  nothing changed
3798
7c05ee4a8cc7 tests: don't use mkcommit shell function in test-divergent.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3787
diff changeset
   137
  working directory is now at e3ff64ce8d4c
7c05ee4a8cc7 tests: don't use mkcommit shell function in test-divergent.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3787
diff changeset
   138
7c05ee4a8cc7 tests: don't use mkcommit shell function in test-divergent.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3787
diff changeset
   139
  $ cd ..
1630
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   140
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   141
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
   142
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   143
  $ hg init test2
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   144
  $ cd test2
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   145
  $ mkcommits _a _b
3798
7c05ee4a8cc7 tests: don't use mkcommit shell function in test-divergent.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3787
diff changeset
   146
7c05ee4a8cc7 tests: don't use mkcommit shell function in test-divergent.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3787
diff changeset
   147
  $ hg up .^
1630
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   148
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
3798
7c05ee4a8cc7 tests: don't use mkcommit shell function in test-divergent.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3787
diff changeset
   149
  $ echo bdivergent > bdivergent11
3799
037ccbf41c6d tests: make sure we don't result in commit messages conflict
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3798
diff changeset
   150
  $ hg ci -Am "bdivergent"
3798
7c05ee4a8cc7 tests: don't use mkcommit shell function in test-divergent.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3787
diff changeset
   151
  adding bdivergent11
1630
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   152
  created new head
3798
7c05ee4a8cc7 tests: don't use mkcommit shell function in test-divergent.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3787
diff changeset
   153
7c05ee4a8cc7 tests: don't use mkcommit shell function in test-divergent.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3787
diff changeset
   154
  $ hg up .^
7c05ee4a8cc7 tests: don't use mkcommit shell function in test-divergent.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3787
diff changeset
   155
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
7c05ee4a8cc7 tests: don't use mkcommit shell function in test-divergent.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3787
diff changeset
   156
  $ echo bdivergent > bdivergent22
3799
037ccbf41c6d tests: make sure we don't result in commit messages conflict
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3798
diff changeset
   157
  $ hg ci -Am "bdivergent"
3798
7c05ee4a8cc7 tests: don't use mkcommit shell function in test-divergent.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3787
diff changeset
   158
  adding bdivergent22
7c05ee4a8cc7 tests: don't use mkcommit shell function in test-divergent.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3787
diff changeset
   159
  created new head
7c05ee4a8cc7 tests: don't use mkcommit shell function in test-divergent.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3787
diff changeset
   160
3799
037ccbf41c6d tests: make sure we don't result in commit messages conflict
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3798
diff changeset
   161
  $ hg log -G
037ccbf41c6d tests: make sure we don't result in commit messages conflict
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3798
diff changeset
   162
  @  3:6b096fb45070@default(draft) bdivergent []
037ccbf41c6d tests: make sure we don't result in commit messages conflict
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3798
diff changeset
   163
  |
037ccbf41c6d tests: make sure we don't result in commit messages conflict
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3798
diff changeset
   164
  | o  2:05a6b6a9e633@default(draft) bdivergent []
037ccbf41c6d tests: make sure we don't result in commit messages conflict
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3798
diff changeset
   165
  |/
037ccbf41c6d tests: make sure we don't result in commit messages conflict
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3798
diff changeset
   166
  | o  1:37445b16603b@default(draft) add _b []
037ccbf41c6d tests: make sure we don't result in commit messages conflict
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3798
diff changeset
   167
  |/
037ccbf41c6d tests: make sure we don't result in commit messages conflict
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3798
diff changeset
   168
  o  0:135f39f4bd78@default(draft) add _a []
037ccbf41c6d tests: make sure we don't result in commit messages conflict
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3798
diff changeset
   169
  
037ccbf41c6d tests: make sure we don't result in commit messages conflict
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3798
diff changeset
   170
037ccbf41c6d tests: make sure we don't result in commit messages conflict
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3798
diff changeset
   171
  $ hg prune -s 6b096fb45070 37445b16603b
1630
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   172
  1 changesets pruned
3799
037ccbf41c6d tests: make sure we don't result in commit messages conflict
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3798
diff changeset
   173
  $ hg prune -s 05a6b6a9e633 37445b16603b --hidden
1630
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   174
  1 changesets pruned
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   175
  2 new content-divergent changesets
1630
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   176
  $ hg log -G
3799
037ccbf41c6d tests: make sure we don't result in commit messages conflict
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3798
diff changeset
   177
  @  3:6b096fb45070@default(draft) bdivergent [content-divergent]
1630
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   178
  |
3799
037ccbf41c6d tests: make sure we don't result in commit messages conflict
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3798
diff changeset
   179
  | *  2:05a6b6a9e633@default(draft) bdivergent [content-divergent]
1630
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   180
  |/
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   181
  o  0:135f39f4bd78@default(draft) add _a []
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   182
  
3798
7c05ee4a8cc7 tests: don't use mkcommit shell function in test-divergent.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3787
diff changeset
   183
1630
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   184
  $ cat >$TESTTMP/test_extension.py  << EOF
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   185
  > from mercurial import merge
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   186
  > origupdate = merge.update
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   187
  > def newupdate(*args, **kwargs):
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   188
  >   return origupdate(*args, **kwargs)
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   189
  > merge.update = newupdate
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   190
  > EOF
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   191
  $ cat >> $HGRCPATH << EOF
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   192
  > [extensions]
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   193
  > testextension=$TESTTMP/test_extension.py
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   194
  > EOF
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   195
  $ hg evolve --all
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   196
  nothing to evolve on current working copy parent
3154
406992d0d611 evolve: rename --contentdivergent flag to --content-divergent
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3013
diff changeset
   197
  (do you want to use --content-divergent)
1630
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   198
  [2]
3154
406992d0d611 evolve: rename --contentdivergent flag to --content-divergent
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3013
diff changeset
   199
  $ hg evolve --content-divergent
3799
037ccbf41c6d tests: make sure we don't result in commit messages conflict
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3798
diff changeset
   200
  merge:[3] bdivergent
037ccbf41c6d tests: make sure we don't result in commit messages conflict
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3798
diff changeset
   201
  with: [2] bdivergent
1630
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   202
  base: [1] add _b
3799
037ccbf41c6d tests: make sure we don't result in commit messages conflict
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3798
diff changeset
   203
  merging "other" content-divergent changeset '05a6b6a9e633'
1630
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   204
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
3846
f9dad99a90d5 evolve: create a new commit instead of amending one of the divergents
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3799
diff changeset
   205
  working directory is now at 73ff357d3975
1630
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   206
35c666ef724e evolve: Fix crush when reading docstring
Juntao Li <juntaoli@fb.com>
parents: 1536
diff changeset
   207
  $ cd ..