mercurial/mdiff.py
branchstable
changeset 10185 7637fe4f525d
parent 9827 4fe9ca519637
child 10189 e451e599fbcf
child 10263 25e572394f5c
equal deleted inserted replaced
10184:8a47347d298b 10185:7637fe4f525d
    52         try:
    52         try:
    53             self.context = int(self.context)
    53             self.context = int(self.context)
    54         except ValueError:
    54         except ValueError:
    55             raise util.Abort(_('diff context lines count must be '
    55             raise util.Abort(_('diff context lines count must be '
    56                                'an integer, not %r') % self.context)
    56                                'an integer, not %r') % self.context)
       
    57 
       
    58     def copy(self, **kwargs):
       
    59         opts = dict((k, getattr(self, k)) for k in self.defaults)
       
    60         opts.update(kwargs)
       
    61         return diffopts(**opts)
    57 
    62 
    58 defaultopts = diffopts()
    63 defaultopts = diffopts()
    59 
    64 
    60 def wsclean(opts, text, blank=True):
    65 def wsclean(opts, text, blank=True):
    61     if opts.ignorews:
    66     if opts.ignorews: