Patchwork [02,of,15] commitctx: create the new extra dict on its own line

login
register
mail settings
Submitter Pierre-Yves David
Date July 29, 2020, 4:57 p.m.
Message ID <a926f7ac92a402451138.1596041852@nodosa.octobus.net>
Download mbox | patch
Permalink /patch/46921/
State Accepted
Headers show

Comments

Pierre-Yves David - July 29, 2020, 4:57 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@octobus.net>
# Date 1595681995 -7200
#      Sat Jul 25 14:59:55 2020 +0200
# Node ID a926f7ac92a4024511389ea5c5d9a8e8eae065d4
# Parent  0ff421a458680435f7a39c770cfa5823961cd314
# EXP-Topic files-change
# Available At https://foss.heptapod.net/octobus/mercurial-devel/
#              hg pull https://foss.heptapod.net/octobus/mercurial-devel/ -r a926f7ac92a4
commitctx: create the new extra dict on its own line

A trivial move to make the next changeset easier to read.

Patch

diff --git a/mercurial/commit.py b/mercurial/commit.py
--- a/mercurial/commit.py
+++ b/mercurial/commit.py
@@ -67,6 +67,8 @@  def commitctx(repo, ctx, error=False, or
         r = _prepare_files(tr, ctx, error=error, origctx=origctx)
         mn, files, p1copies, p2copies, filesadded, filesremoved = r
 
+        extra = ctx.extra().copy()
+
         # update changelog
         repo.ui.note(_(b"committing changelog\n"))
         repo.changelog.delayupdate(tr)
@@ -79,7 +81,7 @@  def commitctx(repo, ctx, error=False, or
             p2.node(),
             user,
             ctx.date(),
-            ctx.extra().copy(),
+            extra,
             p1copies,
             p2copies,
             filesadded,