##// END OF EJS Templates
revert: move calculation of targetsubs earlier
Matt Mackall -
r24479:871485bd default
parent child Browse files
Show More
@@ -2811,6 +2811,10 b' def revert(ui, repo, ctx, parents, *pats'
2811 2811 interactive = opts.get('interactive', False)
2812 2812 wctx = repo[None]
2813 2813 m = scmutil.match(wctx, pats, opts)
2814
2815 # we'll need this later
2816 targetsubs = sorted(s for s in wctx.substate if m(s))
2817
2814 2818 if not m.always():
2815 2819 m.bad = lambda x, y: False
2816 2820 for abs in repo.walk(m):
@@ -3048,10 +3052,6 b' def revert(ui, repo, ctx, parents, *pats'
3048 3052 _revertprefetch(repo, ctx, *[actions[name][0] for name in needdata])
3049 3053 _performrevert(repo, parents, ctx, actions, interactive)
3050 3054
3051 # get the list of subrepos that must be reverted
3052 subrepomatch = scmutil.match(wctx, pats, opts)
3053 targetsubs = sorted(s for s in wctx.substate if subrepomatch(s))
3054
3055 3055 if targetsubs:
3056 3056 # Revert the subrepos on the revert list
3057 3057 for sub in targetsubs:
@@ -34,6 +34,7 b' delete .hgsub and revert it'
34 34 $ hg revert .hgsub
35 35 warning: subrepo spec file .hgsub not found
36 36 warning: subrepo spec file .hgsub not found
37 warning: subrepo spec file .hgsub not found
37 38
38 39 delete .hgsubstate and revert it
39 40
General Comments 0
You need to be logged in to leave comments. Login now