Show More
@@ -978,6 +978,12 b' def _dounshelve(ui, repo, *shelved, **op' | |||||
978 | return unshelvecontinue(ui, repo, state, opts) |
|
978 | return unshelvecontinue(ui, repo, state, opts) | |
979 | elif len(shelved) > 1: |
|
979 | elif len(shelved) > 1: | |
980 | raise error.Abort(_('can only unshelve one change at a time')) |
|
980 | raise error.Abort(_('can only unshelve one change at a time')) | |
|
981 | ||||
|
982 | # abort unshelve while merging (issue5123) | |||
|
983 | parents = repo[None].parents() | |||
|
984 | if len(parents) > 1: | |||
|
985 | raise error.Abort(_('cannot unshelve while merging')) | |||
|
986 | ||||
981 | elif not shelved: |
|
987 | elif not shelved: | |
982 | shelved = listshelves(repo) |
|
988 | shelved = listshelves(repo) | |
983 | if not shelved: |
|
989 | if not shelved: |
@@ -1111,3 +1111,49 b' Keep active bookmark while (un)shelving ' | |||||
1111 | test (4|13):33f7f61e6c5e (re) |
|
1111 | test (4|13):33f7f61e6c5e (re) | |
1112 |
|
1112 | |||
1113 | $ cd .. |
|
1113 | $ cd .. | |
|
1114 | ||||
|
1115 | Abort unshelve while merging (issue5123) | |||
|
1116 | ---------------------------------------- | |||
|
1117 | ||||
|
1118 | $ hg init issue5123 | |||
|
1119 | $ cd issue5123 | |||
|
1120 | $ echo > a | |||
|
1121 | $ hg ci -Am a | |||
|
1122 | adding a | |||
|
1123 | $ hg co null | |||
|
1124 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |||
|
1125 | $ echo > b | |||
|
1126 | $ hg ci -Am b | |||
|
1127 | adding b | |||
|
1128 | created new head | |||
|
1129 | $ echo > c | |||
|
1130 | $ hg add c | |||
|
1131 | $ hg shelve | |||
|
1132 | shelved as default | |||
|
1133 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |||
|
1134 | $ hg co 1 | |||
|
1135 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
1136 | $ hg merge 0 | |||
|
1137 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
1138 | (branch merge, don't forget to commit) | |||
|
1139 | -- successful merge with two parents | |||
|
1140 | $ hg log -G | |||
|
1141 | @ changeset: 1:406bf70c274f | |||
|
1142 | tag: tip | |||
|
1143 | parent: -1:000000000000 | |||
|
1144 | user: test | |||
|
1145 | date: Thu Jan 01 00:00:00 1970 +0000 | |||
|
1146 | summary: b | |||
|
1147 | ||||
|
1148 | @ changeset: 0:ada8c9eb8252 | |||
|
1149 | user: test | |||
|
1150 | date: Thu Jan 01 00:00:00 1970 +0000 | |||
|
1151 | summary: a | |||
|
1152 | ||||
|
1153 | -- trying to pull in the shelve bits | |||
|
1154 | -- unshelve should abort otherwise, it'll eat my second parent. | |||
|
1155 | $ hg unshelve | |||
|
1156 | abort: cannot unshelve while merging | |||
|
1157 | [255] | |||
|
1158 | ||||
|
1159 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now