mercurial/localrepo.py
changeset 18659 b946470efed9
parent 18644 3e92772d5383
child 18660 7e6946ed5756
equal deleted inserted replaced
18656:8eb3408bf005 18659:b946470efed9
  1228                         else:
  1228                         else:
  1229                             fail(f, _("no match under directory!"))
  1229                             fail(f, _("no match under directory!"))
  1230                     elif f not in self.dirstate:
  1230                     elif f not in self.dirstate:
  1231                         fail(f, _("file not tracked!"))
  1231                         fail(f, _("file not tracked!"))
  1232 
  1232 
       
  1233             cctx = context.workingctx(self, text, user, date, extra, changes)
       
  1234 
  1233             if (not force and not extra.get("close") and not merge
  1235             if (not force and not extra.get("close") and not merge
  1234                 and not (changes[0] or changes[1] or changes[2])
  1236                 and not (changes[0] or changes[1] or changes[2])
  1235                 and wctx.branch() == wctx.p1().branch()):
  1237                 and wctx.branch() == wctx.p1().branch()):
  1236                 return None
  1238                 return None
  1237 
  1239 
  1242             for f in changes[0]:
  1244             for f in changes[0]:
  1243                 if f in ms and ms[f] == 'u':
  1245                 if f in ms and ms[f] == 'u':
  1244                     raise util.Abort(_("unresolved merge conflicts "
  1246                     raise util.Abort(_("unresolved merge conflicts "
  1245                                        "(see hg help resolve)"))
  1247                                        "(see hg help resolve)"))
  1246 
  1248 
  1247             cctx = context.workingctx(self, text, user, date, extra, changes)
       
  1248             if editor:
  1249             if editor:
  1249                 cctx._text = editor(self, cctx, subs)
  1250                 cctx._text = editor(self, cctx, subs)
  1250             edited = (text != cctx._text)
  1251             edited = (text != cctx._text)
  1251 
  1252 
  1252             # commit subs and write new state
  1253             # commit subs and write new state