mercurial/localrepo.py
changeset 44409 f935b680860d
parent 44382 f0027a3dd7cb
child 44437 6a34e438461b
equal deleted inserted replaced
44408:6cf92d6c0ad5 44409:f935b680860d
  2942 
  2942 
  2943             cctx = context.workingcommitctx(
  2943             cctx = context.workingcommitctx(
  2944                 self, status, text, user, date, extra
  2944                 self, status, text, user, date, extra
  2945             )
  2945             )
  2946 
  2946 
       
  2947             ms = mergemod.mergestate.read(self)
       
  2948             mergeutil.checkunresolved(ms)
       
  2949 
  2947             # internal config: ui.allowemptycommit
  2950             # internal config: ui.allowemptycommit
  2948             allowemptycommit = (
  2951             allowemptycommit = (
  2949                 wctx.branch() != wctx.p1().branch()
  2952                 wctx.branch() != wctx.p1().branch()
  2950                 or extra.get(b'close')
  2953                 or extra.get(b'close')
  2951                 or merge
  2954                 or merge
  2955             if not allowemptycommit:
  2958             if not allowemptycommit:
  2956                 return None
  2959                 return None
  2957 
  2960 
  2958             if merge and cctx.deleted():
  2961             if merge and cctx.deleted():
  2959                 raise error.Abort(_(b"cannot commit merge with missing files"))
  2962                 raise error.Abort(_(b"cannot commit merge with missing files"))
  2960 
       
  2961             ms = mergemod.mergestate.read(self)
       
  2962             mergeutil.checkunresolved(ms)
       
  2963 
  2963 
  2964             if editor:
  2964             if editor:
  2965                 cctx._text = editor(self, cctx, subs)
  2965                 cctx._text = editor(self, cctx, subs)
  2966             edited = text != cctx._text
  2966             edited = text != cctx._text
  2967 
  2967