# HG changeset patch
# User Adrian Buehlmann <adrian@cadifra.com>
# Date 1334996627 -7200
#      Sat Apr 21 10:23:47 2012 +0200
# Branch stable
# Node ID db85c24dcdea7f74477c0a1e6be3e7756d21db4e
# Parent  e3c7ca15cde24f7e1ef5018fcfd902f4d6c95adc
commit: use ui.configbool when checking 'commitsubrepos' setting on --amend

Before this fix, having

   [ui]
   commitsubrepos = False

in the config file lead to

   $ hg ci --amend -mx
   abort: cannot amend recursively

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -1228,7 +1228,7 @@
     bheads = repo.branchheads(branch)
 
     if opts.get('amend'):
-        if ui.config('ui', 'commitsubrepos'):
+        if ui.configbool('ui', 'commitsubrepos'):
             raise util.Abort(_('cannot amend recursively'))
 
         old = repo['.']