mercurial/mdiff.py
branchstable
changeset 10185 7637fe4f525d
parent 9827 4fe9ca519637
child 10189 e451e599fbcf
child 10263 25e572394f5c
--- a/mercurial/mdiff.py	Fri Jan 01 19:53:05 2010 +0100
+++ b/mercurial/mdiff.py	Fri Jan 01 19:53:05 2010 +0100
@@ -55,6 +55,11 @@
             raise util.Abort(_('diff context lines count must be '
                                'an integer, not %r') % self.context)
 
+    def copy(self, **kwargs):
+        opts = dict((k, getattr(self, k)) for k in self.defaults)
+        opts.update(kwargs)
+        return diffopts(**opts)
+
 defaultopts = diffopts()
 
 def wsclean(opts, text, blank=True):