1217 continue |
1217 continue |
1218 # If keep new is an option, let's just do that |
1218 # If keep new is an option, let's just do that |
1219 if mergestatemod.ACTION_KEEP_NEW in bids: |
1219 if mergestatemod.ACTION_KEEP_NEW in bids: |
1220 repo.ui.note(_(b" %s: picking 'keep new' action\n") % f) |
1220 repo.ui.note(_(b" %s: picking 'keep new' action\n") % f) |
1221 mresult.addfile(f, *bids[mergestatemod.ACTION_KEEP_NEW][0]) |
1221 mresult.addfile(f, *bids[mergestatemod.ACTION_KEEP_NEW][0]) |
|
1222 continue |
|
1223 # ACTION_GET and ACTION_DELETE_CHANGED are conflicting actions as |
|
1224 # one action states the file is newer/created on remote side and |
|
1225 # other states that file is deleted locally and changed on remote |
|
1226 # side. Let's fallback and rely on a conflicting action to let user |
|
1227 # do the right thing |
|
1228 if ( |
|
1229 mergestatemod.ACTION_DELETED_CHANGED in bids |
|
1230 and mergestatemod.ACTION_GET in bids |
|
1231 and len(bids) == 2 |
|
1232 ): |
|
1233 repo.ui.note(_(b" %s: picking 'delete/changed' action\n") % f) |
|
1234 mresult.addfile( |
|
1235 f, *bids[mergestatemod.ACTION_DELETED_CHANGED][0] |
|
1236 ) |
1222 continue |
1237 continue |
1223 # If there are gets and they all agree [how could they not?], do it. |
1238 # If there are gets and they all agree [how could they not?], do it. |
1224 if mergestatemod.ACTION_GET in bids: |
1239 if mergestatemod.ACTION_GET in bids: |
1225 ga0 = bids[mergestatemod.ACTION_GET][0] |
1240 ga0 = bids[mergestatemod.ACTION_GET][0] |
1226 if all(a == ga0 for a in bids[mergestatemod.ACTION_GET][1:]): |
1241 if all(a == ga0 for a in bids[mergestatemod.ACTION_GET][1:]): |