Mercurial > public > mercurial-scm > hg
comparison mercurial/cmdutil.py @ 20604:4991cfc90f59
cmdutil: make commitforceeditor() to pass revision extras to ui.edit()
author | Alexander Drozdov <al.drozdov@gmail.com> |
---|---|
date | Thu, 06 Feb 2014 10:15:20 +0400 |
parents | d4893e64f300 |
children | e3eb480a9391 |
comparison
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")) |