mercurial/localrepo.py
changeset 18660 7e6946ed5756
parent 18659 b946470efed9
child 18661 4fb92f14a97a
equal deleted inserted replaced
18659:b946470efed9 18660:7e6946ed5756
  1231                         fail(f, _("file not tracked!"))
  1231                         fail(f, _("file not tracked!"))
  1232 
  1232 
  1233             cctx = context.workingctx(self, text, user, date, extra, changes)
  1233             cctx = context.workingctx(self, text, user, date, extra, changes)
  1234 
  1234 
  1235             if (not force and not extra.get("close") and not merge
  1235             if (not force and not extra.get("close") and not merge
  1236                 and not (changes[0] or changes[1] or changes[2])
  1236                 and not cctx.files()
  1237                 and wctx.branch() == wctx.p1().branch()):
  1237                 and wctx.branch() == wctx.p1().branch()):
  1238                 return None
  1238                 return None
  1239 
  1239 
  1240             if merge and changes[3]:
  1240             if merge and cctx.deleted():
  1241                 raise util.Abort(_("cannot commit merge with missing files"))
  1241                 raise util.Abort(_("cannot commit merge with missing files"))
  1242 
  1242 
  1243             ms = mergemod.mergestate(self)
  1243             ms = mergemod.mergestate(self)
  1244             for f in changes[0]:
  1244             for f in changes[0]:
  1245                 if f in ms and ms[f] == 'u':
  1245                 if f in ms and ms[f] == 'u':