tests/test-evolve-public-content-divergent.t
author Sushil khanchi <sushilkhanchi97@gmail.com>
Mon, 21 Jan 2019 23:06:10 +0530
changeset 4384 8993fd4805d0
parent 4383 3343eac099ec
child 4385 34322fb3afca
permissions -rw-r--r--
evolve: update the public divergence resolution logic to cover --continue case To continue the interrupted evolve in case of public divergence: we will have to store the node of that public cset which was in content divergence with the other cset, so that we can perform the phase divergence resolution between that public cset and a newnode which is the result of content-divergence resolution. Added tests reflect the behaviour this patch adds.
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