tests/test-evolve-public-content-divergent.t
author Pierre-Yves David <pierre-yves.david@octobus.net>
Wed, 13 Feb 2019 12:46:57 +0100
changeset 4402 cdc095c32e01
parent 4385 34322fb3afca
child 4412 dcbe64c954dc
permissions -rw-r--r--
branching: overwrite broken merge with a correct one Thanks goes to Anton Shestakov for spotting and fixing this.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4383
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
     1
Test for handling of content divergence with public cset using `hg evolve`
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
     2
==========================================================================
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
     3
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
     4
Setup
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
     5
=====
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
     6
  $ cat >> $HGRCPATH <<EOF
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
     7
  > [alias]
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
     8
  > glog = log -GT "{rev}:{node|short} {desc|firstline}\n {phase} {troubles}\n\n"
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
     9
  > [phases]
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    10
  > publish = False
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    11
  > [extensions]
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    12
  > rebase =
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    13
  > EOF
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    14
  $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    15
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    16
Testing the case when both divergent cset are on the same parent and no-conflict in merging:
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    17
-------------------------------------------------------------------------------------
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    18
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    19
Prepare the repository:
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    20
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    21
  $ hg init pubdiv
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    22
  $ cd pubdiv
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    23
  $ for ch in a b; do
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    24
  >   echo $ch > $ch;
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    25
  >   hg ci -Aqm "added "$ch;
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    26
  > done;
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    27
  $ hg glog
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    28
  @  1:5f6d8a4bf34a added b
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    29
  |   draft
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    30
  |
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    31
  o  0:9092f1db7931 added a
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    32
      draft
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    33
  
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    34
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    35
Make an amend and change phase to public:
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    36
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    37
  $ sed -i "1 i I am first" b
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    38
  $ hg amend
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    39
  $ hg phase --public
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    40
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    41
Amend again to create a cset divergent to public one:
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    42
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    43
  $ hg up 1 --hidden -q
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    44
  updated to hidden changeset 5f6d8a4bf34a
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    45
  (hidden revision '5f6d8a4bf34a' was rewritten as: 44f360db368f)
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    46
  working directory parent is obsolete! (5f6d8a4bf34a)
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    47
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    48
  $ echo "I am second" >> b
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    49
  $ hg ci --amend -m "updated b"
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    50
  1 new content-divergent changesets
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    51
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    52
  $ hg glog
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    53
  @  3:dcdaf152280a updated b
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    54
  |   draft content-divergent
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    55
  |
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    56
  | o  2:44f360db368f added b
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    57
  |/    public
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    58
  |
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    59
  o  0:9092f1db7931 added a
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    60
      public
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    61
  
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    62
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    63
Lets resolve the public content-divergence:
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    64
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    65
  $ hg evolve --content-divergent
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    66
  merge:[3] updated b
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    67
  with: [2] added b
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    68
  base: [1] added b
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    69
  merging "other" content-divergent changeset '44f360db368f'
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    70
  merging b
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    71
  0 files updated, 1 files merged, 0 files removed, 0 files unresolved
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    72
  computing new diff
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    73
  committed as c1aa9cfb6cf8
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    74
  working directory is now at c1aa9cfb6cf8
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    75
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    76
Following graph log shows that it correctly merged the two divergent csets:
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    77
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    78
  $ hg glog -p
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    79
  @  5:c1aa9cfb6cf8 phase-divergent update to 44f360db368f:
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    80
  |   draft
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    81
  |
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    82
  |  diff -r 44f360db368f -r c1aa9cfb6cf8 b
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    83
  |  --- a/b	Thu Jan 01 00:00:00 1970 +0000
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    84
  |  +++ b/b	Thu Jan 01 00:00:00 1970 +0000
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    85
  |  @@ -1,2 +1,3 @@
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    86
  |   I am first
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    87
  |   b
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    88
  |  +I am second
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    89
  |
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    90
  o  2:44f360db368f added b
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    91
  |   public
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    92
  |
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    93
  |  diff -r 9092f1db7931 -r 44f360db368f b
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    94
  |  --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    95
  |  +++ b/b	Thu Jan 01 00:00:00 1970 +0000
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    96
  |  @@ -0,0 +1,2 @@
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    97
  |  +I am first
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    98
  |  +b
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
    99
  |
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
   100
  o  0:9092f1db7931 added a
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
   101
      public
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
   102
  
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
   103
     diff -r 000000000000 -r 9092f1db7931 a
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
   104
     --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
   105
     +++ b/a	Thu Jan 01 00:00:00 1970 +0000
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
   106
     @@ -0,0 +1,1 @@
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
   107
     +a
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
   108
  
3343eac099ec evolve: add logic to resolve content-divergence with a public cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
   109
  $ hg evolve -l
4384
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   110
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   111
  $ cd ..
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   112
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   113
Testing the case when both divergent cset has same parent and has conflict in merging:
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   114
------------------------------------------------------------------------------
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   115
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   116
Prepare the repository:
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   117
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   118
  $ hg init pubdiv1
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   119
  $ cd pubdiv1
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   120
  $ for ch in a b; do
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   121
  >   echo $ch > $ch;
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   122
  >   hg ci -Aqm "added "$ch;
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   123
  > done;
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   124
  $ hg glog
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   125
  @  1:5f6d8a4bf34a added b
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   126
  |   draft
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   127
  |
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   128
  o  0:9092f1db7931 added a
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   129
      draft
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   130
  
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   131
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   132
Make an amend and change phase to public:
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   133
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   134
  $ echo "I am foo" > b
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   135
  $ hg amend
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   136
  $ hg phase --public
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   137
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   138
Amend again to create a cset divergent to public one:
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   139
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   140
  $ hg up 1 --hidden -q
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   141
  updated to hidden changeset 5f6d8a4bf34a
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   142
  (hidden revision '5f6d8a4bf34a' was rewritten as: 580f2d01e52c)
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   143
  working directory parent is obsolete! (5f6d8a4bf34a)
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   144
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   145
  $ echo "I am bar" > b
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   146
  $ hg ci --amend -m "updated b"
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   147
  1 new content-divergent changesets
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   148
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   149
  $ hg glog
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   150
  @  3:0e805383168e updated b
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   151
  |   draft content-divergent
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   152
  |
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   153
  | o  2:580f2d01e52c added b
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   154
  |/    public
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   155
  |
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   156
  o  0:9092f1db7931 added a
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   157
      public
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   158
  
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   159
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   160
Lets resolve the divergence:
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   161
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   162
  $ hg evolve --content-divergent
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   163
  merge:[3] updated b
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   164
  with: [2] added b
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   165
  base: [1] added b
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   166
  merging "other" content-divergent changeset '580f2d01e52c'
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   167
  merging b
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   168
  warning: conflicts while merging b! (edit, then use 'hg resolve --mark')
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   169
  0 files updated, 0 files merged, 0 files removed, 1 files unresolved
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   170
  fix conflicts and see `hg help evolve.interrupted`
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   171
  [1]
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   172
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   173
  $ echo "I am foobar" > b
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   174
  $ hg resolve -m --tool union
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   175
  (no more unresolved files)
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   176
  continue: hg evolve --continue
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   177
  $ hg evolve --continue
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   178
  computing new diff
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   179
  committed as 1a739394e9d4
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   180
  working directory is now at 1a739394e9d4
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   181
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   182
  $ hg glog
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   183
  @  5:1a739394e9d4 phase-divergent update to 580f2d01e52c:
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   184
  |   draft
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   185
  |
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   186
  o  2:580f2d01e52c added b
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   187
  |   public
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   188
  |
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   189
  o  0:9092f1db7931 added a
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   190
      public
8993fd4805d0 evolve: update the public divergence resolution logic to cover --continue case
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4383
diff changeset
   191
  
4385
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   192
Testing the case when divergence is not created by actual diff change, but because of rebasing:
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   193
------------------------------------------------------------------------------------------------
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   194
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   195
Prepare the repo:
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   196
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   197
  $ cd ..
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   198
  $ hg init rebasediv
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   199
  $ cd rebasediv
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   200
  $ for ch in a b c; do
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   201
  >   echo $ch > $ch;
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   202
  >   hg ci -Am "added "$ch;
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   203
  > done;
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   204
  adding a
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   205
  adding b
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   206
  adding c
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   207
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   208
  $ hg glog
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   209
  @  2:155349b645be added c
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   210
  |   draft
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   211
  |
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   212
  o  1:5f6d8a4bf34a added b
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   213
  |   draft
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   214
  |
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   215
  o  0:9092f1db7931 added a
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   216
      draft
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   217
  
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   218
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   219
On server side: a new cset is added based on rev 1 and rev 2 is rebased on newly added cset:
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   220
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   221
  $ hg up .^ -q
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   222
  $ echo d > d
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   223
  $ hg ci -Am "added d"
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   224
  adding d
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   225
  created new head
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   226
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   227
  $ hg rebase -r 2 -d .
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   228
  rebasing 2:155349b645be "added c"
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   229
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   230
  $ hg glog
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   231
  o  4:c0d7ee6604ea added c
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   232
  |   draft
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   233
  |
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   234
  @  3:c9241b0f2d5b added d
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   235
  |   draft
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   236
  |
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   237
  o  1:5f6d8a4bf34a added b
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   238
  |   draft
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   239
  |
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   240
  o  0:9092f1db7931 added a
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   241
      draft
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   242
  
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   243
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   244
On user side: user has not pulled yet and amended the rev 2 which created the divergence after pull:
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   245
  $ hg up 2 --hidden -q
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   246
  updated to hidden changeset 155349b645be
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   247
  (hidden revision '155349b645be' was rewritten as: c0d7ee6604ea)
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   248
  working directory parent is obsolete! (155349b645be)
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   249
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   250
  $ echo cc >> c
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   251
  $ hg ci --amend -m "updated c"
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   252
  2 new content-divergent changesets
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   253
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   254
Lets change the phase to --public of branch which is pulled from server:
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   255
  $ hg phase --public -r 4
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   256
  $ hg glog -p
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   257
  @  5:f5f9b4fc8b77 updated c
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   258
  |   draft content-divergent
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   259
  |
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   260
  |  diff -r 5f6d8a4bf34a -r f5f9b4fc8b77 c
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   261
  |  --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   262
  |  +++ b/c	Thu Jan 01 00:00:00 1970 +0000
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   263
  |  @@ -0,0 +1,2 @@
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   264
  |  +c
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   265
  |  +cc
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   266
  |
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   267
  | o  4:c0d7ee6604ea added c
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   268
  | |   public
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   269
  | |
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   270
  | |  diff -r c9241b0f2d5b -r c0d7ee6604ea c
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   271
  | |  --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   272
  | |  +++ b/c	Thu Jan 01 00:00:00 1970 +0000
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   273
  | |  @@ -0,0 +1,1 @@
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   274
  | |  +c
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   275
  | |
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   276
  | o  3:c9241b0f2d5b added d
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   277
  |/    public
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   278
  |
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   279
  |    diff -r 5f6d8a4bf34a -r c9241b0f2d5b d
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   280
  |    --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   281
  |    +++ b/d	Thu Jan 01 00:00:00 1970 +0000
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   282
  |    @@ -0,0 +1,1 @@
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   283
  |    +d
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   284
  |
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   285
  o  1:5f6d8a4bf34a added b
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   286
  |   public
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   287
  |
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   288
  |  diff -r 9092f1db7931 -r 5f6d8a4bf34a b
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   289
  |  --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   290
  |  +++ b/b	Thu Jan 01 00:00:00 1970 +0000
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   291
  |  @@ -0,0 +1,1 @@
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   292
  |  +b
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   293
  |
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   294
  o  0:9092f1db7931 added a
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   295
      public
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   296
  
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   297
     diff -r 000000000000 -r 9092f1db7931 a
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   298
     --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   299
     +++ b/a	Thu Jan 01 00:00:00 1970 +0000
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   300
     @@ -0,0 +1,1 @@
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   301
     +a
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   302
  
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   303
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   304
Evolve:
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   305
  $ hg evolve --content-divergent
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   306
  merge:[4] added c
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   307
  with: [5] updated c
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   308
  base: [2] added c
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   309
  rebasing "other" content-divergent changeset f5f9b4fc8b77 on c9241b0f2d5b
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   310
  updating to "local" side of the conflict: c0d7ee6604ea
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   311
  merging "other" content-divergent changeset 'c3d442d80993'
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   312
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   313
  computing new diff
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   314
  committed as 3b336cbee992
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   315
  working directory is now at 3b336cbee992
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   316
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   317
  $ hg glog -p
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   318
  @  8:3b336cbee992 phase-divergent update to c0d7ee6604ea:
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   319
  |   draft
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   320
  |
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   321
  |  diff -r c0d7ee6604ea -r 3b336cbee992 c
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   322
  |  --- a/c	Thu Jan 01 00:00:00 1970 +0000
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   323
  |  +++ b/c	Thu Jan 01 00:00:00 1970 +0000
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   324
  |  @@ -1,1 +1,2 @@
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   325
  |   c
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   326
  |  +cc
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   327
  |
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   328
  o  4:c0d7ee6604ea added c
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   329
  |   public
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   330
  |
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   331
  |  diff -r c9241b0f2d5b -r c0d7ee6604ea c
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   332
  |  --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   333
  |  +++ b/c	Thu Jan 01 00:00:00 1970 +0000
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   334
  |  @@ -0,0 +1,1 @@
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   335
  |  +c
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   336
  |
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   337
  o  3:c9241b0f2d5b added d
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   338
  |   public
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   339
  |
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   340
  |  diff -r 5f6d8a4bf34a -r c9241b0f2d5b d
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   341
  |  --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   342
  |  +++ b/d	Thu Jan 01 00:00:00 1970 +0000
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   343
  |  @@ -0,0 +1,1 @@
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   344
  |  +d
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   345
  |
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   346
  o  1:5f6d8a4bf34a added b
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   347
  |   public
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   348
  |
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   349
  |  diff -r 9092f1db7931 -r 5f6d8a4bf34a b
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   350
  |  --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   351
  |  +++ b/b	Thu Jan 01 00:00:00 1970 +0000
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   352
  |  @@ -0,0 +1,1 @@
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   353
  |  +b
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   354
  |
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   355
  o  0:9092f1db7931 added a
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   356
      public
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   357
  
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   358
     diff -r 000000000000 -r 9092f1db7931 a
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   359
     --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   360
     +++ b/a	Thu Jan 01 00:00:00 1970 +0000
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   361
     @@ -0,0 +1,1 @@
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   362
     +a
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   363
  
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   364
Check that we don't have any troubled cset now:
34322fb3afca evolve: add test for the case where public divergence on difference parents
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4384
diff changeset
   365
  $ hg evolve -l