##// END OF EJS Templates
revert: define 'wctx' a little earlier and use it more
Martin von Zweigbergk -
r24449:bab983bb default
parent child Browse files
Show More
@@ -2809,7 +2809,8 b' def revert(ui, repo, ctx, parents, *pats'
2809 ## filling of the `names` mapping
2809 ## filling of the `names` mapping
2810 # walk dirstate to fill `names`
2810 # walk dirstate to fill `names`
2811
2811
2812 m = scmutil.match(repo[None], pats, opts)
2812 wctx = repo[None]
2813 m = scmutil.match(wctx, pats, opts)
2813 if not m.always() or node != parent:
2814 if not m.always() or node != parent:
2814 m.bad = lambda x, y: False
2815 m.bad = lambda x, y: False
2815 for abs in repo.walk(m):
2816 for abs in repo.walk(m):
@@ -3012,7 +3013,6 b' def revert(ui, repo, ctx, parents, *pats'
3012 (unknown, actions['unknown'], discard),
3013 (unknown, actions['unknown'], discard),
3013 )
3014 )
3014
3015
3015 wctx = repo[None]
3016 for abs, (rel, exact) in sorted(names.items()):
3016 for abs, (rel, exact) in sorted(names.items()):
3017 # target file to be touch on disk (relative to cwd)
3017 # target file to be touch on disk (relative to cwd)
3018 target = repo.wjoin(abs)
3018 target = repo.wjoin(abs)
General Comments 0
You need to be logged in to leave comments. Login now