mercurial/cmdutil.py
changeset 20604 4991cfc90f59
parent 20571 d4893e64f300
child 20666 e3eb480a9391
equal deleted inserted replaced
20603:cc76c619bed6 20604:4991cfc90f59
  2006         edittext.append(_("HG: no files changed"))
  2006         edittext.append(_("HG: no files changed"))
  2007     edittext.append("")
  2007     edittext.append("")
  2008     # run editor in the repository root
  2008     # run editor in the repository root
  2009     olddir = os.getcwd()
  2009     olddir = os.getcwd()
  2010     os.chdir(repo.root)
  2010     os.chdir(repo.root)
  2011     text = repo.ui.edit("\n".join(edittext), ctx.user())
  2011     text = repo.ui.edit("\n".join(edittext), ctx.user(), ctx.extra())
  2012     text = re.sub("(?m)^HG:.*(\n|$)", "", text)
  2012     text = re.sub("(?m)^HG:.*(\n|$)", "", text)
  2013     os.chdir(olddir)
  2013     os.chdir(olddir)
  2014 
  2014 
  2015     if not text.strip():
  2015     if not text.strip():
  2016         raise util.Abort(_("empty commit message"))
  2016         raise util.Abort(_("empty commit message"))