equal
deleted
inserted
replaced
2501 m.bad = badfn |
2501 m.bad = badfn |
2502 for abs in ctx.walk(m): |
2502 for abs in ctx.walk(m): |
2503 if abs not in names: |
2503 if abs not in names: |
2504 names[abs] = m.rel(abs), m.exact(abs) |
2504 names[abs] = m.rel(abs), m.exact(abs) |
2505 |
2505 |
2506 # get the list of subrepos that must be reverted |
|
2507 targetsubs = sorted(s for s in ctx.substate if m(s)) |
|
2508 |
|
2509 # Find status of all file in `names`. |
2506 # Find status of all file in `names`. |
2510 m = scmutil.matchfiles(repo, names) |
2507 m = scmutil.matchfiles(repo, names) |
2511 |
2508 |
2512 changes = repo.status(node1=node, match=m, |
2509 changes = repo.status(node1=node, match=m, |
2513 unknown=True, ignored=True, clean=True) |
2510 unknown=True, ignored=True, clean=True) |
2690 |
2687 |
2691 |
2688 |
2692 if not opts.get('dry_run'): |
2689 if not opts.get('dry_run'): |
2693 _performrevert(repo, parents, ctx, actions) |
2690 _performrevert(repo, parents, ctx, actions) |
2694 |
2691 |
|
2692 # get the list of subrepos that must be reverted |
|
2693 subrepomatch = scmutil.match(ctx, pats, opts) |
|
2694 targetsubs = sorted(s for s in ctx.substate if subrepomatch(s)) |
|
2695 |
2695 if targetsubs: |
2696 if targetsubs: |
2696 # Revert the subrepos on the revert list |
2697 # Revert the subrepos on the revert list |
2697 for sub in targetsubs: |
2698 for sub in targetsubs: |
2698 ctx.sub(sub).revert(ui, ctx.substate[sub], *pats, **opts) |
2699 ctx.sub(sub).revert(ui, ctx.substate[sub], *pats, **opts) |
2699 finally: |
2700 finally: |