115 status = repo.status(match=match) |
115 status = repo.status(match=match) |
116 diffopts = patch.difffeatureopts(ui, opts=opts, whitespace=True) |
116 diffopts = patch.difffeatureopts(ui, opts=opts, whitespace=True) |
117 diffopts.nodates = True |
117 diffopts.nodates = True |
118 diffopts.git = True |
118 diffopts.git = True |
119 diffopts.showfunc = True |
119 diffopts.showfunc = True |
120 originaldiff = patch.diff(repo, changes=status, opts=diffopts) |
120 originaldiff = patch.diff(repo, changes=status, opts=diffopts) |
121 originalchunks = patch.parsepatch(originaldiff) |
121 originalchunks = patch.parsepatch(originaldiff) |
122 |
122 |
123 # 1. filter patch, so we have intending-to apply subset of it |
123 # 1. filter patch, so we have intending-to apply subset of it |
124 try: |
124 try: |
125 chunks, newopts = filterfn(ui, originalchunks) |
125 chunks, newopts = filterfn(ui, originalchunks) |
3198 torevert = [repo.wjoin(f) for f in actions['revert'][0]] |
3198 torevert = [repo.wjoin(f) for f in actions['revert'][0]] |
3199 m = scmutil.match(ctx, torevert, {}) |
3199 m = scmutil.match(ctx, torevert, {}) |
3200 diffopts = patch.difffeatureopts(repo.ui, whitespace=True) |
3200 diffopts = patch.difffeatureopts(repo.ui, whitespace=True) |
3201 diffopts.nodates = True |
3201 diffopts.nodates = True |
3202 diffopts.git = True |
3202 diffopts.git = True |
3203 reversehunks = repo.ui.configbool('experimental', |
3203 reversehunks = repo.ui.configbool('experimental', |
3204 'revertalternateinteractivemode', |
3204 'revertalternateinteractivemode', |
3205 True) |
3205 True) |
3206 if reversehunks: |
3206 if reversehunks: |
3207 diff = patch.diff(repo, ctx.node(), None, m, opts=diffopts) |
3207 diff = patch.diff(repo, ctx.node(), None, m, opts=diffopts) |
3208 else: |
3208 else: |
3209 diff = patch.diff(repo, None, ctx.node(), m, opts=diffopts) |
3209 diff = patch.diff(repo, None, ctx.node(), m, opts=diffopts) |
3210 originalchunks = patch.parsepatch(diff) |
3210 originalchunks = patch.parsepatch(diff) |