Patchwork [2,of,3] cmdutil: make commitforceeditor() to pass revision extras to ui.edit()

login
register
mail settings
Submitter Alexander Drozdov
Date Feb. 6, 2014, 9:54 a.m.
Message ID <52F35BE1.7090405@gmail.com>
Download mbox | patch
Permalink /patch/3491/
State Superseded
Headers show

Comments

Alexander Drozdov - Feb. 6, 2014, 9:54 a.m.
# HG changeset patch
# User Alexander Drozdov <al.drozdov@gmail.com>
# Date 1391667320 -14400
#      Thu Feb 06 10:15:20 2014 +0400
# Node ID 504f89e587a9861e7da2e757557c6129946a13d1
# Parent  0946be793f356c54ef3a8f4f0de2819d8625c51a
cmdutil: make commitforceeditor() to pass revision extras to ui.edit()
Matt Mackall - Feb. 6, 2014, 5:56 p.m.
On Thu, 2014-02-06 at 13:54 +0400, Alexander Drozdov wrote:
> # HG changeset patch
> # User Alexander Drozdov <al.drozdov@gmail.com>
> # Date 1391667320 -14400
> #      Thu Feb 06 10:15:20 2014 +0400
> # Node ID 504f89e587a9861e7da2e757557c6129946a13d1
> # Parent  0946be793f356c54ef3a8f4f0de2819d8625c51a
> cmdutil: make commitforceeditor() to pass revision extras to ui.edit()
> 
> diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
> --- a/mercurial/cmdutil.py
> +++ b/mercurial/cmdutil.py
> @@ -1872,7 +1872,7 @@
>       # run editor in the repository root
>       olddir = os.getcwd()
>       os.chdir(repo.root)
> -    text = repo.ui.edit("\n".join(edittext), ctx.user())
> +    text = repo.ui.edit("\n".join(edittext), ctx.user(), ctx.extra())
>       text = re.sub("(?m)^HG:.*(\n|$)", "", text)

These patches look fine except your mailer is damaging your whitespace.
Please try using patchbomb.

Patch

diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -1872,7 +1872,7 @@ 
      # run editor in the repository root
      olddir = os.getcwd()
      os.chdir(repo.root)
-    text = repo.ui.edit("\n".join(edittext), ctx.user())
+    text = repo.ui.edit("\n".join(edittext), ctx.user(), ctx.extra())
      text = re.sub("(?m)^HG:.*(\n|$)", "", text)
      os.chdir(olddir)