tests/test-evolve-orphan-merge.t
author Pulkit Goyal <7895pulkit@gmail.com>
Tue, 12 Jun 2018 19:00:12 +0530
changeset 3843 f0096db2a7b1
parent 3821 f67ac33c07d2
child 3852 629558d09898
permissions -rw-r--r--
evolve: improve error messages when conflicts occur This patch improves the error messages when conflicts occur. First, we drop the line 'evolution failed', that is not the best line we can show and evolution didn't failed, it's just interrupted by the conflicts and when user will run `hg evolve --continue`, things will be fine. I still remember when I first saw 'evolution failed', I got a bit scare as am I in a recoverable position or not. So let's drop this scary line. Second, we replace the error messages to say `resolve conflicts and see help-topic`. The help topic was added recently and documents all the three flags very well. Addition of tests also showed that all the three flags works fine with all the three instability type. So we should advertise them more. Third, we now raise the error with our error message rather than raising MergeFailure and having evolution related text in hint or stderr above. This increase the focus on the error message we want to show. After this patch, I think error messages by evolve in case of conflicts will be same in every case.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3528
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     1
** Testing resolution of orphans by `hg evolve` when merges are involved **
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     2
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     3
  $ cat >> $HGRCPATH <<EOF
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     4
  > [ui]
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     5
  > interactive = True
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     6
  > [alias]
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     7
  > glog = log -GT "{rev}:{node|short} {desc}\n ({bookmarks}) {phase}"
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     8
  > [extensions]
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     9
  > rebase =
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    10
  > EOF
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    11
  $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    12
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    13
Repo Setup
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    14
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    15
  $ hg init repo
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    16
  $ cd repo
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    17
  $ echo ".*\.orig" > .hgignore
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    18
  $ hg add .hgignore
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    19
  $ hg ci -m "added hgignore"
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    20
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    21
An orphan merge changeset with one of the parent obsoleted
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    22
==========================================================
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    23
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    24
1) When merging both the parents does not result in conflicts
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    25
-------------------------------------------------------------
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    26
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    27
  $ echo foo > a
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    28
  $ hg ci -Aqm "added a"
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    29
  $ hg up .^
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    30
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    31
  $ echo foo > b
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    32
  $ hg ci -Aqm "added b"
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    33
  $ hg merge
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    34
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    35
  (branch merge, don't forget to commit)
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    36
  $ hg ci -m "merging a and b"
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    37
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    38
  $ hg glog
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    39
  @    3:3b2b6f4652ee merging a and b
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    40
  |\    () draft
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    41
  | o  2:d76850646258 added b
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    42
  | |   () draft
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    43
  o |  1:c7586e2a9264 added a
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    44
  |/    () draft
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    45
  o  0:8fa14d15e168 added hgignore
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    46
      () draft
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    47
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    48
Testing with obsoleting the second parent
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    49
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    50
  $ hg up d76850646258
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    51
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    52
  $ echo bar > b
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    53
  $ hg amend
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    54
  1 new orphan changesets
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    55
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    56
  $ hg glog
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    57
  @  4:64370c9805e7 added b
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    58
  |   () draft
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    59
  | *    3:3b2b6f4652ee merging a and b
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    60
  | |\    () draft
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    61
  +---x  2:d76850646258 added b
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    62
  | |     () draft
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    63
  | o  1:c7586e2a9264 added a
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    64
  |/    () draft
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    65
  o  0:8fa14d15e168 added hgignore
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    66
      () draft
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    67
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    68
  $ hg evolve --all
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    69
  move:[3] merging a and b
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    70
  atop:[4] added b
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    71
  working directory is now at 91fd62122a4b
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    72
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    73
  $ hg glog
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    74
  @    5:91fd62122a4b merging a and b
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    75
  |\    () draft
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    76
  | o  4:64370c9805e7 added b
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    77
  | |   () draft
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    78
  o |  1:c7586e2a9264 added a
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    79
  |/    () draft
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    80
  o  0:8fa14d15e168 added hgignore
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    81
      () draft
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    82
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    83
  $ hg parents
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    84
  changeset:   5:91fd62122a4b
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    85
  tag:         tip
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    86
  parent:      4:64370c9805e7
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    87
  parent:      1:c7586e2a9264
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    88
  user:        test
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    89
  date:        Thu Jan 01 00:00:00 1970 +0000
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    90
  summary:     merging a and b
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    91
  
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    92
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    93
Testing with obsoleting the first parent
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    94
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    95
  $ hg up c7586e2a9264
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    96
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    97
  $ echo bar > a
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    98
  $ hg amend
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    99
  1 new orphan changesets
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   100
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   101
  $ hg glog
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   102
  @  6:3d41537b44ca added a
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   103
  |   () draft
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   104
  | *    5:91fd62122a4b merging a and b
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   105
  | |\    () draft
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   106
  +---o  4:64370c9805e7 added b
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   107
  | |     () draft
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   108
  | x  1:c7586e2a9264 added a
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   109
  |/    () draft
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   110
  o  0:8fa14d15e168 added hgignore
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   111
      () draft
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   112
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   113
  $ hg evolve --all
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   114
  move:[5] merging a and b
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   115
  atop:[6] added a
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   116
  working directory is now at 968d205ba4d8
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   117
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   118
  $ hg glog
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   119
  @    7:968d205ba4d8 merging a and b
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   120
  |\    () draft
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   121
  | o  6:3d41537b44ca added a
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   122
  | |   () draft
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   123
  o |  4:64370c9805e7 added b
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   124
  |/    () draft
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   125
  o  0:8fa14d15e168 added hgignore
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   126
      () draft
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   127
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   128
  $ hg parents
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   129
  changeset:   7:968d205ba4d8
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   130
  tag:         tip
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   131
  parent:      6:3d41537b44ca
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   132
  parent:      4:64370c9805e7
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   133
  user:        test
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   134
  date:        Thu Jan 01 00:00:00 1970 +0000
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   135
  summary:     merging a and b
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   136
  
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   137
2) When merging both the parents resulted in conflicts
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   138
------------------------------------------------------
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   139
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   140
  $ hg up 8fa14d15e168
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   141
  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   142
  $ echo foo > c
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   143
  $ hg ci -Aqm "foo to c"
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   144
  $ hg prev
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   145
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   146
  [0] added hgignore
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   147
  $ echo bar > c
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   148
  $ hg ci -Aqm "bar to c"
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   149
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   150
  $ hg glog
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   151
  @  9:d0f84b25d4e3 bar to c
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   152
  |   () draft
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   153
  | o  8:1c165c673853 foo to c
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   154
  |/    () draft
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   155
  | o    7:968d205ba4d8 merging a and b
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   156
  | |\    () draft
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   157
  +---o  6:3d41537b44ca added a
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   158
  | |     () draft
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   159
  | o  4:64370c9805e7 added b
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   160
  |/    () draft
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   161
  o  0:8fa14d15e168 added hgignore
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   162
      () draft
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   163
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   164
Prune old test changesets to have clear graph view
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   165
  $ hg prune -r 64370c9805e7 -r 3d41537b44ca -r 968d205ba4d8
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   166
  3 changesets pruned
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   167
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   168
  $ hg glog
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   169
  @  9:d0f84b25d4e3 bar to c
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   170
  |   () draft
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   171
  | o  8:1c165c673853 foo to c
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   172
  |/    () draft
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   173
  o  0:8fa14d15e168 added hgignore
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   174
      () draft
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   175
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   176
  $ hg merge
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   177
  merging c
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   178
  warning: conflicts while merging c! (edit, then use 'hg resolve --mark')
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   179
  0 files updated, 0 files merged, 0 files removed, 1 files unresolved
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   180
  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   181
  [1]
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   182
  $ echo foobar > c
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   183
  $ hg resolve -m
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   184
  (no more unresolved files)
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   185
  $ hg ci -m "foobar to c"
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   186
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   187
  $ hg glog
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   188
  @    10:fd41d25a3e90 foobar to c
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   189
  |\    () draft
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   190
  | o  9:d0f84b25d4e3 bar to c
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   191
  | |   () draft
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   192
  o |  8:1c165c673853 foo to c
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   193
  |/    () draft
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   194
  o  0:8fa14d15e168 added hgignore
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   195
      () draft
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   196
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   197
Testing with first parent obsoleted
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   198
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   199
  $ hg up 1c165c673853
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   200
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   201
  $ echo FOO > c
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   202
  $ hg amend
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   203
  1 new orphan changesets
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   204
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   205
  $ hg glog
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   206
  @  11:31c317b7bdb1 foo to c
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   207
  |   () draft
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   208
  | *    10:fd41d25a3e90 foobar to c
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   209
  | |\    () draft
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   210
  +---o  9:d0f84b25d4e3 bar to c
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   211
  | |     () draft
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   212
  | x  8:1c165c673853 foo to c
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   213
  |/    () draft
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   214
  o  0:8fa14d15e168 added hgignore
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   215
      () draft
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   216
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   217
  $ hg evolve --all
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   218
  move:[10] foobar to c
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   219
  atop:[11] foo to c
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   220
  merging c
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   221
  warning: conflicts while merging c! (edit, then use 'hg resolve --mark')
3843
f0096db2a7b1 evolve: improve error messages when conflicts occur
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3821
diff changeset
   222
  abort: fix conflicts and see `hg help evolve.interrupted`
3528
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   223
  [255]
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   224
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   225
  $ echo FOObar > c
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   226
  $ hg resolve -m
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   227
  (no more unresolved files)
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   228
  continue: hg evolve --continue
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   229
  $ hg evolve --continue
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   230
  evolving 10:fd41d25a3e90 "foobar to c"
3529
d90e0faaec80 evolve: fix stabilization of orphan merge changesets in case of conflicts
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3528
diff changeset
   231
  working directory is now at c5405d2da7a1
3528
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   232
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   233
  $ hg glog
3529
d90e0faaec80 evolve: fix stabilization of orphan merge changesets in case of conflicts
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3528
diff changeset
   234
  @    12:c5405d2da7a1 foobar to c
3528
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   235
  |\    () draft
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   236
  | o  11:31c317b7bdb1 foo to c
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   237
  | |   () draft
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   238
  o |  9:d0f84b25d4e3 bar to c
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   239
  |/    () draft
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   240
  o  0:8fa14d15e168 added hgignore
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   241
      () draft
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   242
3529
d90e0faaec80 evolve: fix stabilization of orphan merge changesets in case of conflicts
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3528
diff changeset
   243
  $ hg parents
d90e0faaec80 evolve: fix stabilization of orphan merge changesets in case of conflicts
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3528
diff changeset
   244
  changeset:   12:c5405d2da7a1
d90e0faaec80 evolve: fix stabilization of orphan merge changesets in case of conflicts
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3528
diff changeset
   245
  tag:         tip
3571
34330381b76b evolve: preserve the order of merge parents in `hg evolve --continue`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3544
diff changeset
   246
  parent:      9:d0f84b25d4e3
3529
d90e0faaec80 evolve: fix stabilization of orphan merge changesets in case of conflicts
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3528
diff changeset
   247
  parent:      11:31c317b7bdb1
d90e0faaec80 evolve: fix stabilization of orphan merge changesets in case of conflicts
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3528
diff changeset
   248
  user:        test
d90e0faaec80 evolve: fix stabilization of orphan merge changesets in case of conflicts
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3528
diff changeset
   249
  date:        Thu Jan 01 00:00:00 1970 +0000
d90e0faaec80 evolve: fix stabilization of orphan merge changesets in case of conflicts
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3528
diff changeset
   250
  summary:     foobar to c
d90e0faaec80 evolve: fix stabilization of orphan merge changesets in case of conflicts
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3528
diff changeset
   251
  
3528
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   252
Testing a conlficting merge with second parent obsoleted
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   253
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   254
  $ hg up 31c317b7bdb1
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   255
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   256
  $ echo foo > c
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   257
  $ hg amend
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   258
  1 new orphan changesets
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   259
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   260
  $ hg glog
3529
d90e0faaec80 evolve: fix stabilization of orphan merge changesets in case of conflicts
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3528
diff changeset
   261
  @  13:928097d0b5b5 foo to c
3528
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   262
  |   () draft
3529
d90e0faaec80 evolve: fix stabilization of orphan merge changesets in case of conflicts
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3528
diff changeset
   263
  | *    12:c5405d2da7a1 foobar to c
3528
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   264
  | |\    () draft
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   265
  +---x  11:31c317b7bdb1 foo to c
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   266
  | |     () draft
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   267
  | o  9:d0f84b25d4e3 bar to c
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   268
  |/    () draft
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   269
  o  0:8fa14d15e168 added hgignore
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   270
      () draft
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   271
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   272
  $ hg evolve --all
3529
d90e0faaec80 evolve: fix stabilization of orphan merge changesets in case of conflicts
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3528
diff changeset
   273
  move:[12] foobar to c
d90e0faaec80 evolve: fix stabilization of orphan merge changesets in case of conflicts
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3528
diff changeset
   274
  atop:[13] foo to c
3528
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   275
  merging c
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   276
  warning: conflicts while merging c! (edit, then use 'hg resolve --mark')
3843
f0096db2a7b1 evolve: improve error messages when conflicts occur
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3821
diff changeset
   277
  abort: fix conflicts and see `hg help evolve.interrupted`
3528
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   278
  [255]
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   279
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   280
  $ echo foobar > c
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   281
  $ hg resolve -m
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   282
  (no more unresolved files)
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   283
  continue: hg evolve --continue
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   284
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   285
  $ hg evolve --continue
3529
d90e0faaec80 evolve: fix stabilization of orphan merge changesets in case of conflicts
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3528
diff changeset
   286
  evolving 12:c5405d2da7a1 "foobar to c"
d90e0faaec80 evolve: fix stabilization of orphan merge changesets in case of conflicts
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3528
diff changeset
   287
  working directory is now at dc1948a6eeab
3528
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   288
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   289
  $ hg glog
3529
d90e0faaec80 evolve: fix stabilization of orphan merge changesets in case of conflicts
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3528
diff changeset
   290
  @    14:dc1948a6eeab foobar to c
d90e0faaec80 evolve: fix stabilization of orphan merge changesets in case of conflicts
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3528
diff changeset
   291
  |\    () draft
d90e0faaec80 evolve: fix stabilization of orphan merge changesets in case of conflicts
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3528
diff changeset
   292
  | o  13:928097d0b5b5 foo to c
d90e0faaec80 evolve: fix stabilization of orphan merge changesets in case of conflicts
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3528
diff changeset
   293
  | |   () draft
d90e0faaec80 evolve: fix stabilization of orphan merge changesets in case of conflicts
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3528
diff changeset
   294
  o |  9:d0f84b25d4e3 bar to c
3528
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   295
  |/    () draft
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   296
  o  0:8fa14d15e168 added hgignore
92f1e2408fd0 tests: add a test file of resolving orphaness of merge changesets
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   297
      () draft
3530
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   298
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   299
3) When stabilizing other changesets resulted in orphan merge changeset
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   300
-----------------------------------------------------------------------
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   301
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   302
  $ hg prune -r d0f84b25d4e3 -r 928097d0b5b5 -r dc1948a6eeab
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   303
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   304
  working directory now at 8fa14d15e168
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   305
  3 changesets pruned
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   306
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   307
  $ for ch in l m; do echo foo > $ch; hg ci -Aqm "added "$ch; done;
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   308
  $ hg up 8fa14d15e168
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   309
  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   310
  $ for ch in x y; do echo foo > $ch; hg ci -Aqm "added "$ch; done;
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   311
  $ hg glog
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   312
  @  18:863d11043c67 added y
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   313
  |   () draft
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   314
  o  17:3f2247835c1d added x
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   315
  |   () draft
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   316
  | o  16:e44dc179e7f5 added m
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   317
  | |   () draft
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   318
  | o  15:8634bee7bf1e added l
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   319
  |/    () draft
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   320
  o  0:8fa14d15e168 added hgignore
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   321
      () draft
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   322
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   323
  $ hg merge
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   324
  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   325
  (branch merge, don't forget to commit)
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   326
  $ hg ci -m "merge commit"
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   327
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   328
  $ hg up 8634bee7bf1e
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   329
  0 files updated, 0 files merged, 3 files removed, 0 files unresolved
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   330
  $ echo bar > l
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   331
  $ hg amend
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   332
  2 new orphan changesets
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   333
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   334
  $ hg glog
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   335
  @  20:fccc9de66799 added l
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   336
  |   () draft
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   337
  | *    19:190763373d8b merge commit
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   338
  | |\    () draft
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   339
  | | o  18:863d11043c67 added y
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   340
  | | |   () draft
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   341
  +---o  17:3f2247835c1d added x
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   342
  | |     () draft
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   343
  | *  16:e44dc179e7f5 added m
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   344
  | |   () draft
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   345
  | x  15:8634bee7bf1e added l
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   346
  |/    () draft
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   347
  o  0:8fa14d15e168 added hgignore
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   348
      () draft
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   349
  $ hg evolve --all
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   350
  move:[16] added m
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   351
  atop:[20] added l
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   352
  move:[19] merge commit
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   353
  atop:[21] added m
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   354
  working directory is now at a446ad3e6700
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   355
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   356
  $ hg glog
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   357
  @    22:a446ad3e6700 merge commit
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   358
  |\    () draft
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   359
  | o  21:495d2039f8f1 added m
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   360
  | |   () draft
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   361
  | o  20:fccc9de66799 added l
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   362
  | |   () draft
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   363
  o |  18:863d11043c67 added y
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   364
  | |   () draft
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   365
  o |  17:3f2247835c1d added x
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   366
  |/    () draft
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   367
  o  0:8fa14d15e168 added hgignore
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   368
      () draft
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   369
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   370
4) When both the parents of the merge changeset are obsolete with a succ
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   371
------------------------------------------------------------------------
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   372
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   373
  $ hg prune -r a446ad3e6700 -r 495d2039f8f1 -r 863d11043c67
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   374
  0 files updated, 0 files merged, 3 files removed, 0 files unresolved
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   375
  working directory now at fccc9de66799
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   376
  3 changesets pruned
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   377
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   378
  $ hg glog
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   379
  @  20:fccc9de66799 added l
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   380
  |   () draft
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   381
  | o  17:3f2247835c1d added x
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   382
  |/    () draft
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   383
  o  0:8fa14d15e168 added hgignore
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   384
      () draft
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   385
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   386
  $ hg merge
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   387
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   388
  (branch merge, don't forget to commit)
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   389
  $ hg ci -m "merged l and x"
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   390
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   391
  $ hg up fccc9de66799
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   392
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   393
  $ echo foobar > l
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   394
  $ hg amend
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   395
  1 new orphan changesets
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   396
  $ hg up 3f2247835c1d
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   397
  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   398
  $ echo bar > x
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   399
  $ hg amend
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   400
  $ hg glog
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   401
  @  25:cdf6547da25f added x
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   402
  |   () draft
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   403
  | o  24:3f371171d767 added l
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   404
  |/    () draft
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   405
  | *    23:7b78a9784f3e merged l and x
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   406
  | |\    () draft
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   407
  +---x  20:fccc9de66799 added l
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   408
  | |     () draft
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   409
  | x  17:3f2247835c1d added x
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   410
  |/    () draft
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   411
  o  0:8fa14d15e168 added hgignore
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   412
      () draft
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   413
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   414
XXX: We should handle this case too
3f056d3a1f70 tests: add more tests related to stabilization of orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3529
diff changeset
   415
  $ hg evolve --all
3573
d53277cdc1e7 evolve: handle stabilization of merge changeset with both parents obsoleted
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3571
diff changeset
   416
  move:[23] merged l and x
d53277cdc1e7 evolve: handle stabilization of merge changeset with both parents obsoleted
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3571
diff changeset
   417
  atop:[25] added x
d53277cdc1e7 evolve: handle stabilization of merge changeset with both parents obsoleted
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3571
diff changeset
   418
  move:[26] merged l and x
d53277cdc1e7 evolve: handle stabilization of merge changeset with both parents obsoleted
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3571
diff changeset
   419
  atop:[24] added l
d53277cdc1e7 evolve: handle stabilization of merge changeset with both parents obsoleted
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3571
diff changeset
   420
  working directory is now at adb665a78e08
3544
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   421
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   422
  $ hg glog
3573
d53277cdc1e7 evolve: handle stabilization of merge changeset with both parents obsoleted
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3571
diff changeset
   423
  @    27:adb665a78e08 merged l and x
3544
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   424
  |\    () draft
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   425
  | o  25:cdf6547da25f added x
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   426
  | |   () draft
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   427
  o |  24:3f371171d767 added l
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   428
  |/    () draft
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   429
  o  0:8fa14d15e168 added hgignore
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   430
      () draft
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   431
3573
d53277cdc1e7 evolve: handle stabilization of merge changeset with both parents obsoleted
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3571
diff changeset
   432
  $ hg exp
d53277cdc1e7 evolve: handle stabilization of merge changeset with both parents obsoleted
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3571
diff changeset
   433
  # HG changeset patch
d53277cdc1e7 evolve: handle stabilization of merge changeset with both parents obsoleted
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3571
diff changeset
   434
  # User test
d53277cdc1e7 evolve: handle stabilization of merge changeset with both parents obsoleted
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3571
diff changeset
   435
  # Date 0 0
d53277cdc1e7 evolve: handle stabilization of merge changeset with both parents obsoleted
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3571
diff changeset
   436
  #      Thu Jan 01 00:00:00 1970 +0000
d53277cdc1e7 evolve: handle stabilization of merge changeset with both parents obsoleted
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3571
diff changeset
   437
  # Node ID adb665a78e08b962cff415301058d782086c0f33
d53277cdc1e7 evolve: handle stabilization of merge changeset with both parents obsoleted
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3571
diff changeset
   438
  # Parent  3f371171d767ef79cf85d156cf46d4035960fcf0
d53277cdc1e7 evolve: handle stabilization of merge changeset with both parents obsoleted
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3571
diff changeset
   439
  # Parent  cdf6547da25f1ca5d01102302ad713f444547b48
d53277cdc1e7 evolve: handle stabilization of merge changeset with both parents obsoleted
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3571
diff changeset
   440
  merged l and x
d53277cdc1e7 evolve: handle stabilization of merge changeset with both parents obsoleted
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3571
diff changeset
   441
  
d53277cdc1e7 evolve: handle stabilization of merge changeset with both parents obsoleted
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3571
diff changeset
   442
  diff -r 3f371171d767 -r adb665a78e08 x
d53277cdc1e7 evolve: handle stabilization of merge changeset with both parents obsoleted
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3571
diff changeset
   443
  --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
d53277cdc1e7 evolve: handle stabilization of merge changeset with both parents obsoleted
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3571
diff changeset
   444
  +++ b/x	Thu Jan 01 00:00:00 1970 +0000
d53277cdc1e7 evolve: handle stabilization of merge changeset with both parents obsoleted
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3571
diff changeset
   445
  @@ -0,0 +1,1 @@
d53277cdc1e7 evolve: handle stabilization of merge changeset with both parents obsoleted
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3571
diff changeset
   446
  +bar
d53277cdc1e7 evolve: handle stabilization of merge changeset with both parents obsoleted
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3571
diff changeset
   447
d53277cdc1e7 evolve: handle stabilization of merge changeset with both parents obsoleted
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3571
diff changeset
   448
  $ hg parents
d53277cdc1e7 evolve: handle stabilization of merge changeset with both parents obsoleted
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3571
diff changeset
   449
  changeset:   27:adb665a78e08
d53277cdc1e7 evolve: handle stabilization of merge changeset with both parents obsoleted
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3571
diff changeset
   450
  tag:         tip
d53277cdc1e7 evolve: handle stabilization of merge changeset with both parents obsoleted
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3571
diff changeset
   451
  parent:      24:3f371171d767
d53277cdc1e7 evolve: handle stabilization of merge changeset with both parents obsoleted
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3571
diff changeset
   452
  parent:      25:cdf6547da25f
d53277cdc1e7 evolve: handle stabilization of merge changeset with both parents obsoleted
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3571
diff changeset
   453
  user:        test
d53277cdc1e7 evolve: handle stabilization of merge changeset with both parents obsoleted
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3571
diff changeset
   454
  date:        Thu Jan 01 00:00:00 1970 +0000
d53277cdc1e7 evolve: handle stabilization of merge changeset with both parents obsoleted
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3571
diff changeset
   455
  summary:     merged l and x
d53277cdc1e7 evolve: handle stabilization of merge changeset with both parents obsoleted
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3571
diff changeset
   456
  
d53277cdc1e7 evolve: handle stabilization of merge changeset with both parents obsoleted
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3571
diff changeset
   457
d53277cdc1e7 evolve: handle stabilization of merge changeset with both parents obsoleted
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3571
diff changeset
   458
5) When one of the merge parent is pruned without a successor
d53277cdc1e7 evolve: handle stabilization of merge changeset with both parents obsoleted
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3571
diff changeset
   459
-------------------------------------------------------------
d53277cdc1e7 evolve: handle stabilization of merge changeset with both parents obsoleted
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3571
diff changeset
   460
3544
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   461
  $ hg prune -r cdf6547da25f
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   462
  1 changesets pruned
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   463
  1 new orphan changesets
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   464
  $ hg glog
3573
d53277cdc1e7 evolve: handle stabilization of merge changeset with both parents obsoleted
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3571
diff changeset
   465
  @    27:adb665a78e08 merged l and x
3544
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   466
  |\    () draft
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   467
  | x  25:cdf6547da25f added x
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   468
  | |   () draft
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   469
  o |  24:3f371171d767 added l
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   470
  |/    () draft
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   471
  o  0:8fa14d15e168 added hgignore
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   472
      () draft
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   473
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   474
  $ hg evolve --rev .
3573
d53277cdc1e7 evolve: handle stabilization of merge changeset with both parents obsoleted
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3571
diff changeset
   475
  move:[27] merged l and x
3544
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   476
  atop:[0] added hgignore
3573
d53277cdc1e7 evolve: handle stabilization of merge changeset with both parents obsoleted
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3571
diff changeset
   477
  working directory is now at fb8fe870ae7d
3544
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   478
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   479
  $ hg glog
3573
d53277cdc1e7 evolve: handle stabilization of merge changeset with both parents obsoleted
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3571
diff changeset
   480
  @    28:fb8fe870ae7d merged l and x
3544
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   481
  |\    () draft
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   482
  | o  24:3f371171d767 added l
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   483
  |/    () draft
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   484
  o  0:8fa14d15e168 added hgignore
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   485
      () draft
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   486
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   487
6) When one parent is pruned without successor and the other parent of merge is
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   488
the parent of the pruned commit
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   489
--------------------------------------------------------------------------------
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   490
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   491
  $ hg glog
3573
d53277cdc1e7 evolve: handle stabilization of merge changeset with both parents obsoleted
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3571
diff changeset
   492
  @    28:fb8fe870ae7d merged l and x
3544
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   493
  |\    () draft
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   494
  | o  24:3f371171d767 added l
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   495
  |/    () draft
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   496
  o  0:8fa14d15e168 added hgignore
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   497
      () draft
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   498
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   499
  $ hg prune -r 3f371171d767
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   500
  1 changesets pruned
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   501
  1 new orphan changesets
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   502
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   503
  $ hg glog
3573
d53277cdc1e7 evolve: handle stabilization of merge changeset with both parents obsoleted
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3571
diff changeset
   504
  @    28:fb8fe870ae7d merged l and x
3544
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   505
  |\    () draft
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   506
  | x  24:3f371171d767 added l
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   507
  |/    () draft
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   508
  o  0:8fa14d15e168 added hgignore
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   509
      () draft
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   510
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   511
This is the right thing to do here. When you have a merge changeset, and one
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   512
parent is pruned and parent of that pruned parent is same as another parent of
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   513
the merge changeset, that should lead to merge changeset being a non-merge
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   514
changeset and non-pruned changeset as its only parent
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   515
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   516
If you look at the above graph, the side part:
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   517
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   518
\
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   519
 x
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   520
/
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   521
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   522
is redundant now as the changeset is pruned and we should remove this chain
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   523
while evolving.
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   524
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   525
This case can occur a lot of times in workflows where people make branches and
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   526
merge them again. After getting their work done, they may want to get rid of
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   527
that branch and they prune all their changeset, which will result in this
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   528
case where merge commit becomes orphan with its ancestors pruned up until a
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   529
point where the other parent of merge is the first non-pruned ancestor.
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   530
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   531
  $ hg evolve -r .
3573
d53277cdc1e7 evolve: handle stabilization of merge changeset with both parents obsoleted
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3571
diff changeset
   532
  move:[28] merged l and x
3544
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   533
  atop:[0] added hgignore
3573
d53277cdc1e7 evolve: handle stabilization of merge changeset with both parents obsoleted
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3571
diff changeset
   534
  working directory is now at b61ba77b924a
3544
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   535
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   536
  $ hg glog
3573
d53277cdc1e7 evolve: handle stabilization of merge changeset with both parents obsoleted
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3571
diff changeset
   537
  @  29:b61ba77b924a merged l and x
3544
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   538
  |   () draft
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   539
  o  0:8fa14d15e168 added hgignore
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   540
      () draft
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   541
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   542
7) When one parent is pruned without successor and has no parent
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   543
----------------------------------------------------------------
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   544
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   545
  $ hg prune -r .
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   546
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   547
  working directory now at 8fa14d15e168
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   548
  1 changesets pruned
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   549
  $ hg up null
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   550
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   551
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   552
  $ echo foo > foo
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   553
  $ hg add foo
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   554
  $ hg ci -m "added foo"
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   555
  created new head
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   556
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   557
  $ hg merge
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   558
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   559
  (branch merge, don't forget to commit)
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   560
  $ hg ci -m "merge commit"
3573
d53277cdc1e7 evolve: handle stabilization of merge changeset with both parents obsoleted
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3571
diff changeset
   561
  $ hg glog
d53277cdc1e7 evolve: handle stabilization of merge changeset with both parents obsoleted
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3571
diff changeset
   562
  @    31:32beb84b9dbc merge commit
d53277cdc1e7 evolve: handle stabilization of merge changeset with both parents obsoleted
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3571
diff changeset
   563
  |\    () draft
d53277cdc1e7 evolve: handle stabilization of merge changeset with both parents obsoleted
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3571
diff changeset
   564
  | o  30:f3ba8b99bb6f added foo
d53277cdc1e7 evolve: handle stabilization of merge changeset with both parents obsoleted
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3571
diff changeset
   565
  |     () draft
d53277cdc1e7 evolve: handle stabilization of merge changeset with both parents obsoleted
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3571
diff changeset
   566
  o  0:8fa14d15e168 added hgignore
d53277cdc1e7 evolve: handle stabilization of merge changeset with both parents obsoleted
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3571
diff changeset
   567
      () draft
3544
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   568
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   569
  $ hg prune -r f3ba8b99bb6f
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   570
  1 changesets pruned
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   571
  1 new orphan changesets
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   572
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   573
  $ hg glog
3573
d53277cdc1e7 evolve: handle stabilization of merge changeset with both parents obsoleted
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3571
diff changeset
   574
  @    31:32beb84b9dbc merge commit
3544
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   575
  |\    () draft
3573
d53277cdc1e7 evolve: handle stabilization of merge changeset with both parents obsoleted
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3571
diff changeset
   576
  | x  30:f3ba8b99bb6f added foo
3544
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   577
  |     () draft
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   578
  o  0:8fa14d15e168 added hgignore
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   579
      () draft
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   580
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   581
The current behavior seems to be the correct behavior in the above case. This is
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   582
also another case which can arise flow merge workflow where people start a
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   583
branch from null changeset and merge it and then prune it or get rid of it.
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   584
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   585
Also if you look at the above graph, the side part:
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   586
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   587
\
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   588
 x
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   589
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   590
becomes redundant as the changeset is pruned without successor and we should
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   591
just remove that chain.
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   592
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   593
  $ hg evolve -r .
3573
d53277cdc1e7 evolve: handle stabilization of merge changeset with both parents obsoleted
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3571
diff changeset
   594
  move:[31] merge commit
3544
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   595
  atop:[-1] 
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   596
  working directory is now at d2a03dd8c951
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   597
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   598
  $ hg glog
3573
d53277cdc1e7 evolve: handle stabilization of merge changeset with both parents obsoleted
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3571
diff changeset
   599
  @  32:d2a03dd8c951 merge commit
3544
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   600
  |   () draft
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   601
  o  0:8fa14d15e168 added hgignore
329056287ef5 tests: add more cases about stabilization of an orphaned merge commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3530
diff changeset
   602
      () draft