Mercurial > hg
comparison hgext/hgk.py @ 7308:b6f5490effbf
patch: turn patch.diff() into a generator
This should even be a little faster than passing in an fp argument.
author | Dirkjan Ochtman <dirkjan@ochtman.nl> |
---|---|
date | Mon, 03 Nov 2008 16:48:23 +0100 |
parents | af694c6a888c |
children | 26adfaccdf73 |
comparison
equal
deleted
inserted
replaced
7307:56380212d630 | 7308:b6f5490effbf |
---|---|
90 node1 = repo.changelog.parents(node1)[0] | 90 node1 = repo.changelog.parents(node1)[0] |
91 if opts['patch']: | 91 if opts['patch']: |
92 if opts['pretty']: | 92 if opts['pretty']: |
93 catcommit(ui, repo, node2, "") | 93 catcommit(ui, repo, node2, "") |
94 m = cmdutil.match(repo, files) | 94 m = cmdutil.match(repo, files) |
95 patch.diff(repo, node1, node2, match=m, | 95 chunks = patch.diff(repo, node1, node2, match=m, |
96 opts=patch.diffopts(ui, {'git': True})) | 96 opts=patch.diffopts(ui, {'git': True})) |
97 for chunk in chunks: | |
98 repo.ui.write(chunk) | |
97 else: | 99 else: |
98 __difftree(repo, node1, node2, files=files) | 100 __difftree(repo, node1, node2, files=files) |
99 if not opts['stdin']: | 101 if not opts['stdin']: |
100 break | 102 break |
101 | 103 |