hgext/record.py
changeset 7308 b6f5490effbf
parent 7015 6651de7176a0
child 7718 6fa7b6fb90a9
equal deleted inserted replaced
7307:56380212d630 7308:b6f5490effbf
   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