411 else: |
411 else: |
412 changes = repo.status(match=match)[:3] |
412 changes = repo.status(match=match)[:3] |
413 modified, added, removed = changes |
413 modified, added, removed = changes |
414 match = cmdutil.matchfiles(repo, modified + added + removed) |
414 match = cmdutil.matchfiles(repo, modified + added + removed) |
415 diffopts = mdiff.diffopts(git=True, nodates=True) |
415 diffopts = mdiff.diffopts(git=True, nodates=True) |
|
416 chunks = patch.diff(repo, repo.dirstate.parents()[0], match=match, |
|
417 changes=changes, opts=diffopts) |
416 fp = cStringIO.StringIO() |
418 fp = cStringIO.StringIO() |
417 patch.diff(repo, repo.dirstate.parents()[0], match=match, |
419 fp.write(''.join(chunks)) |
418 changes=changes, opts=diffopts, fp=fp) |
|
419 fp.seek(0) |
420 fp.seek(0) |
420 |
421 |
421 # 1. filter patch, so we have intending-to apply subset of it |
422 # 1. filter patch, so we have intending-to apply subset of it |
422 chunks = filterpatch(ui, parsepatch(fp)) |
423 chunks = filterpatch(ui, parsepatch(fp)) |
423 del fp |
424 del fp |