diff -r 8189e03adb44 -r 65029a3aafc2 mercurial/mdiff.py --- a/mercurial/mdiff.py Thu Apr 03 13:14:43 2008 +0200 +++ b/mercurial/mdiff.py Fri Apr 04 22:15:14 2008 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms # of the GNU General Public License, incorporated herein by reference. +from i18n import _ import bdiff, mpatch, re, struct, util, md5 def splitnewlines(text): @@ -47,6 +48,12 @@ v = self.defaults[k] setattr(self, k, v) + try: + self.context = int(self.context) + except ValueError: + raise util.Abort(_('diff context lines count must be ' + 'an integer, not %r') % self.context) + defaultopts = diffopts() def wsclean(opts, text):