mercurial/merge.py
changeset 48716 f1eb77dceb36
parent 48714 c5f05c0d1c8c
child 48746 18e69f224e4b
equal deleted inserted replaced
48715:7d073df49a54 48716:f1eb77dceb36
   516             pass
   516             pass
   517         elif not branchmerge:
   517         elif not branchmerge:
   518             mresult.removefile(f)  # just updating, ignore changes outside clone
   518             mresult.removefile(f)  # just updating, ignore changes outside clone
   519         elif action[0].no_op:
   519         elif action[0].no_op:
   520             mresult.removefile(f)  # merge does not affect file
   520             mresult.removefile(f)  # merge does not affect file
   521         elif action[0].narrow_safe:  # TODO: handle these cases
   521         elif action[0].narrow_safe:
   522             msg = _(
   522             if (
   523                 b'merge affects file \'%s\' outside narrow, '
   523                 not f.endswith(b'/')
   524                 b'which is not yet supported'
   524                 and action[0].changes == mergestatemod.CHANGE_MODIFIED
   525             )
   525             ):
   526             hint = _(b'merging in the other direction may work')
   526                 mresult.removefile(f)  # merge won't affect on-disk files
   527             raise error.Abort(msg % f, hint=hint)
   527 
       
   528                 mresult.addcommitinfo(
       
   529                     f, b'outside-narrow-merge-action', action[0].changes
       
   530                 )
       
   531             else:  # TODO: handle the tree case
       
   532                 msg = _(
       
   533                     b'merge affects file \'%s\' outside narrow, '
       
   534                     b'which is not yet supported'
       
   535                 )
       
   536                 hint = _(b'merging in the other direction may work')
       
   537                 raise error.Abort(msg % f, hint=hint)
   528         else:
   538         else:
   529             msg = _(b'conflict in file \'%s\' is outside narrow clone')
   539             msg = _(b'conflict in file \'%s\' is outside narrow clone')
   530             raise error.StateError(msg % f)
   540             raise error.StateError(msg % f)
   531 
   541 
   532 
   542