Mercurial > hg > mercurial-crew-with-dirclash
comparison hgext/extdiff.py @ 2887:2fe4d99ae726
Update extdiff for recent refactoring
author | Brendan Cully <brendan@kublai.com> |
---|---|
date | Mon, 14 Aug 2006 11:07:15 -0700 |
parents | 3d6efcbbd1c9 |
children | ce967d96a1c1 |
comparison
equal
deleted
inserted
replaced
2886:9826af4841ef | 2887:2fe4d99ae726 |
---|---|
31 # compare program will be fast. | 31 # compare program will be fast. |
32 | 32 |
33 from mercurial.demandload import demandload | 33 from mercurial.demandload import demandload |
34 from mercurial.i18n import gettext as _ | 34 from mercurial.i18n import gettext as _ |
35 from mercurial.node import * | 35 from mercurial.node import * |
36 demandload(globals(), 'mercurial:commands,util os shutil tempfile') | 36 demandload(globals(), 'mercurial:commands,cmdutil,util os shutil tempfile') |
37 | 37 |
38 def dodiff(ui, repo, diffcmd, pats, opts): | 38 def dodiff(ui, repo, diffcmd, pats, opts): |
39 def snapshot_node(files, node): | 39 def snapshot_node(files, node): |
40 '''snapshot files as of some revision''' | 40 '''snapshot files as of some revision''' |
41 changes = repo.changelog.read(node) | 41 changes = repo.changelog.read(node) |
77 for chunk in util.filechunkiter(repo.wopener(wfn)): | 77 for chunk in util.filechunkiter(repo.wopener(wfn)): |
78 fp.write(chunk) | 78 fp.write(chunk) |
79 return dirname | 79 return dirname |
80 | 80 |
81 node1, node2 = commands.revpair(ui, repo, opts['rev']) | 81 node1, node2 = commands.revpair(ui, repo, opts['rev']) |
82 files, matchfn, anypats = commands.matchpats(repo, pats, opts) | 82 files, matchfn, anypats = cmdutil.matchpats(repo, pats, opts) |
83 modified, added, removed, deleted, unknown = repo.status( | 83 modified, added, removed, deleted, unknown = repo.status( |
84 node1, node2, files, match=matchfn)[:5] | 84 node1, node2, files, match=matchfn)[:5] |
85 if not (modified or added or removed): | 85 if not (modified or added or removed): |
86 return 0 | 86 return 0 |
87 | 87 |