# HG changeset patch # User Boris Feld # Date 2017-06-30 01:42:40 # Node ID a746472c3d09ec361edfccc44f0bdcfda7dc73d8 # Parent 12c0683772730b95e9dd7c8040716f1feec12d89 configitems: register the 'histedit.singletransaction' config diff --git a/hgext/histedit.py b/hgext/histedit.py --- a/hgext/histedit.py +++ b/hgext/histedit.py @@ -224,6 +224,9 @@ configitem('histedit', 'dropmissing', 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 @@ def _continuehistedit(ui, repo, state): # 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.