Denis Laxalde committed 2ecd845

Use patch.diffopts to account for user diffopts

This allows user defined diff options (e.g. showfunc) to be accounted for
when using hgshelve.

(grafted from Mercurial 09a2b6741695, eeadc76a7575)

Comments (0)

Files changed (1)

 '''interactive change selection to set aside that may be restored later'''
 from mercurial.i18n import gettext, _
-from mercurial import cmdutil, commands, hg, mdiff, patch, scmutil
+from mercurial import cmdutil, commands, hg, patch, scmutil
 from mercurial import util, fancyopts, extensions
 import copy, cStringIO, errno, os, re, shutil, tempfile, sys
         parents = repo.dirstate.parents()
         changes = repo.status(match=match)[:3]
         modified, added, removed = changes
-        diffopts = mdiff.diffopts(git=True, nodates=True)
+        diffopts = patch.diffopts(ui, opts={'git': True, 'nodates': True})
         chunks = patch.diff(repo, changes=changes, opts=diffopts)
         fp = cStringIO.StringIO(''.join(chunks))
         ac = parsepatch(fp)