add support for some hg options

--HG--
branch : pmacs2
This commit is contained in:
Erik Osheim 2009-10-01 19:38:20 -04:00
parent ad565fa064
commit d95566952b
1 changed files with 8 additions and 1 deletions

View File

@ -76,7 +76,14 @@ class HgDiff(Method, HgBase):
ui_imp, repo = self._hg_init()
revs = self._get_revs(w, **vargs)
try:
hgc.diff(ui_imp, repo, w.buffer.path, rev=revs)
c = w.application.config
opts = {
'ignore_all_space': c.get('hg.diff.ignore_app_space'),
'ignore_space_change': c.get('hg.diff.ignore_space_change'),
'ignore-blank-lines': c.get('hg.diff.ignore_blank_lines'),
'unified': c.get('hg.diff.unified'),
}
hgc.diff(ui_imp, repo, w.buffer.path, rev=revs, **opts)
except Exception, e:
w.set_error(str(e))
return