comparison mercurial/cmdutil.py @ 23535:72c23fa4f52f

commit: abort if --addremove is specified, but fails This will be required when subrepo support is added, in order to ensure consistent commits when a subrepo flavor doesn't support addremove.
author Matt Harbison <matt_harbison@yahoo.com>
date Wed, 26 Nov 2014 15:16:22 -0500
parents 891aaa7c0c70
children f1b06a8aad42
comparison
equal deleted inserted replaced
23534:83bbedc16b3f 23535:72c23fa4f52f
2200 matcher = scmutil.match(repo[None], pats, opts) 2200 matcher = scmutil.match(repo[None], pats, opts)
2201 2201
2202 # extract addremove carefully -- this function can be called from a command 2202 # extract addremove carefully -- this function can be called from a command
2203 # that doesn't support addremove 2203 # that doesn't support addremove
2204 if opts.get('addremove'): 2204 if opts.get('addremove'):
2205 scmutil.addremove(repo, matcher, opts) 2205 if scmutil.addremove(repo, matcher, opts) != 0:
2206 raise util.Abort(
2207 _("failed to mark all new/missing files as added/removed"))
2206 2208
2207 return commitfunc(ui, repo, message, matcher, opts) 2209 return commitfunc(ui, repo, message, matcher, opts)
2208 2210
2209 def amend(ui, repo, commitfunc, old, extra, pats, opts): 2211 def amend(ui, repo, commitfunc, old, extra, pats, opts):
2210 # amend will reuse the existing user if not specified, but the obsolete 2212 # amend will reuse the existing user if not specified, but the obsolete