Patchwork [4,of,6] configitems: register the 'histedit.singletransaction' config

login
register
mail settings
Submitter Boris Feld
Date Oct. 4, 2017, 1:54 p.m.
Message ID <c991c20c48c65adf35ee.1507125249@FB>
Download mbox | patch
Permalink /patch/24477/
State Accepted
Headers show

Comments

Boris Feld - Oct. 4, 2017, 1:54 p.m.
# HG changeset patch
# User Boris Feld <boris.feld@octobus.net>
# Date 1498786960 -7200
#      Fri Jun 30 03:42:40 2017 +0200
# Node ID c991c20c48c65adf35eea827c6f99a1bd92b8195
# Parent  09fb4c4519ebf7419740ec823b0141f4e26dae6a
# EXP-Topic config.register.histedit
configitems: register the 'histedit.singletransaction' config

Patch

diff -r 09fb4c4519eb -r c991c20c48c6 hgext/histedit.py
--- a/hgext/histedit.py	Fri Jun 30 03:42:39 2017 +0200
+++ b/hgext/histedit.py	Fri Jun 30 03:42:40 2017 +0200
@@ -224,6 +224,9 @@ 
 configitem('histedit', 'linelen',
     default=80,
 )
+configitem('histedit', 'singletransaction',
+    default=False,
+)
 
 # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for
 # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should
@@ -1130,7 +1133,7 @@ 
     # Don't use singletransaction by default since it rolls the entire
     # transaction back if an unexpected exception happens (like a
     # pretxncommit hook throws, or the user aborts the commit msg editor).
-    if ui.configbool("histedit", "singletransaction", False):
+    if ui.configbool("histedit", "singletransaction"):
         # Don't use a 'with' for the transaction, since actions may close
         # and reopen a transaction. For example, if the action executes an
         # external process it may choose to commit the transaction first.