equal
deleted
inserted
replaced
2674 else: |
2674 else: |
2675 repo.ui.warn(_(b'warning: %s\n') % m) |
2675 repo.ui.warn(_(b'warning: %s\n') % m) |
2676 |
2676 |
2677 # There's no API to copy a matcher. So mutate the passed matcher and |
2677 # There's no API to copy a matcher. So mutate the passed matcher and |
2678 # restore it when we're done. |
2678 # restore it when we're done. |
2679 oldexplicitdir = matcher.explicitdir |
|
2680 oldtraversedir = matcher.traversedir |
2679 oldtraversedir = matcher.traversedir |
2681 |
2680 |
2682 res = [] |
2681 res = [] |
2683 |
2682 |
2684 try: |
2683 try: |
2685 if removeemptydirs: |
2684 if removeemptydirs: |
2686 directories = [] |
2685 directories = [] |
2687 matcher.explicitdir = matcher.traversedir = directories.append |
2686 matcher.traversedir = directories.append |
2688 |
2687 |
2689 status = repo.status(match=matcher, ignored=ignored, unknown=True) |
2688 status = repo.status(match=matcher, ignored=ignored, unknown=True) |
2690 |
2689 |
2691 if removefiles: |
2690 if removefiles: |
2692 for f in sorted(status.unknown + status.ignored): |
2691 for f in sorted(status.unknown + status.ignored): |
2704 res.append(f) |
2703 res.append(f) |
2705 |
2704 |
2706 return res |
2705 return res |
2707 |
2706 |
2708 finally: |
2707 finally: |
2709 matcher.explicitdir = oldexplicitdir |
|
2710 matcher.traversedir = oldtraversedir |
2708 matcher.traversedir = oldtraversedir |