##// END OF EJS Templates
commit: move dirstateguard creation out of try-block...
Martin von Zweigbergk -
r33822:5d286eb7 default
parent child Browse files
Show More
@@ -2998,9 +2998,10 b' def commit(ui, repo, commitfunc, pats, o'
2998 dsguard = None
2998 dsguard = None
2999 # extract addremove carefully -- this function can be called from a command
2999 # extract addremove carefully -- this function can be called from a command
3000 # that doesn't support addremove
3000 # that doesn't support addremove
3001 if opts.get('addremove'):
3002 dsguard = dirstateguard.dirstateguard(repo, 'commit')
3001 try:
3003 try:
3002 if opts.get('addremove'):
3004 if dsguard:
3003 dsguard = dirstateguard.dirstateguard(repo, 'commit')
3004 if scmutil.addremove(repo, matcher, "", opts) != 0:
3005 if scmutil.addremove(repo, matcher, "", opts) != 0:
3005 raise error.Abort(
3006 raise error.Abort(
3006 _("failed to mark all new/missing files as added/removed"))
3007 _("failed to mark all new/missing files as added/removed"))
General Comments 0
You need to be logged in to leave comments. Login now