Mercurial > public > mercurial-scm > hg
diff mercurial/mdiff.py @ 10185:7637fe4f525d stable
mq: preserve --git flag when merging patches
Without this, merging a patch queue without diff.git=1 downgrades all git
patches to regular patches, losing data in the process.
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Fri, 01 Jan 2010 19:53:05 +0100 |
parents | 4fe9ca519637 |
children | e451e599fbcf 25e572394f5c |
line wrap: on
line diff
--- 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):