changeset 24463 | 06d199e66bbc |
parent 24455 | 16961d43dc89 |
child 24464 | 30ddc3cf76df |
--- a/mercurial/cmdutil.py Wed Mar 25 16:21:58 2015 -0700 +++ b/mercurial/cmdutil.py Wed Mar 25 21:54:47 2015 -0400 @@ -3055,7 +3055,11 @@ if targetsubs: # Revert the subrepos on the revert list for sub in targetsubs: - ctx.sub(sub).revert(ctx.substate[sub], *pats, **opts) + try: + ctx.sub(sub).revert(ctx.substate[sub], *pats, **opts) + except KeyError: + raise util.Abort("subrepository '%s' does not exist in %s!" + % (sub, short(ctx.node()))) finally: wlock.release()