changeset 19232:b592fd33233a stable

amend: complain more comprehensibly about subrepos
author Matt Mackall <mpm@selenic.com>
date Thu, 23 May 2013 17:39:33 -0500
parents 6d6f148cada9
children 7bbad79b9542 39ea540dc154
files mercurial/commands.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Wed May 22 17:38:24 2013 -0700
+++ b/mercurial/commands.py	Thu May 23 17:39:33 2013 -0500
@@ -1310,6 +1310,8 @@
     Returns 0 on success, 1 if nothing changed.
     """
     if opts.get('subrepos'):
+        if opts.get('amend'):
+            raise util.Abort(_('cannot amend with --subrepos'))
         # Let --subrepos on the command line override config setting.
         ui.setconfig('ui', 'commitsubrepos', True)
 
@@ -1322,7 +1324,7 @@
 
     if opts.get('amend'):
         if ui.configbool('ui', 'commitsubrepos'):
-            raise util.Abort(_('cannot amend recursively'))
+            raise util.Abort(_('cannot amend with ui.commitsubrepos enabled'))
 
         old = repo['.']
         if old.phase() == phases.public: