equal
deleted
inserted
replaced
36 exchange, |
36 exchange, |
37 hg, |
37 hg, |
38 lock as lockmod, |
38 lock as lockmod, |
39 logcmdutil, |
39 logcmdutil, |
40 merge as mergemod, |
40 merge as mergemod, |
|
41 mergestate, |
41 phases, |
42 phases, |
42 pycompat, |
43 pycompat, |
43 util, |
44 util, |
44 ) |
45 ) |
45 from mercurial.utils import dateutil |
46 from mercurial.utils import dateutil |
239 # since it will be covered by the existing fileset. |
240 # since it will be covered by the existing fileset. |
240 continue |
241 continue |
241 |
242 |
242 # If the file requires actual merging, abort. We don't have enough |
243 # If the file requires actual merging, abort. We don't have enough |
243 # context to resolve merges correctly. |
244 # context to resolve merges correctly. |
244 if action in [b'm', b'dm', b'cd', b'dc']: |
245 if action in mergestate.CONVERT_MERGE_ACTIONS: |
245 raise error.Abort( |
246 raise error.Abort( |
246 _( |
247 _( |
247 b"unable to convert merge commit " |
248 b"unable to convert merge commit " |
248 b"since target parents do not merge cleanly (file " |
249 b"since target parents do not merge cleanly (file " |
249 b"%s, parents %s and %s)" |
250 b"%s, parents %s and %s)" |
250 ) |
251 ) |
251 % (file, p1ctx, p2ctx) |
252 % (file, p1ctx, p2ctx) |
252 ) |
253 ) |
253 elif action == b'k': |
254 elif action == mergestate.ACTION_KEEP: |
254 # 'keep' means nothing changed from p1 |
255 # 'keep' means nothing changed from p1 |
255 continue |
256 continue |
256 else: |
257 else: |
257 # Any other change means we want to take the p2 version |
258 # Any other change means we want to take the p2 version |
258 yield file |
259 yield file |