[PATCH 0 of 2] mq: automatically upgrade to git patch when necessary (issue767)
Thomas Arendsen Hein
thomas at intevation.de
Tue Dec 29 10:58:09 CST 2009
* Patrick Mezard <pmezard at gmail.com> [20091229 17:41]:
> Make mq automatically upgrade to git patches if necessary and drop former partial fixes. This behaviour can be disabled with:
> upgradediff = False
> In worst case, generating diffs in upgrade mode can be two times more expensive than generating it in git mode directly: we may have to regenerate the whole diff again whenever a git feature is detected. Also, the first diff attempt is completely buffered instead of being streamed. This is why this change is currently enabled only for mq where avoiding data loss is clearly worth the price. That said, even without having profiled it yet, I am convinced we can fast-path the upgrade mode if necessary were it to be used in regular diff commands.
This sounds much safer than what I proposed in
| new option [diff] git = foo (with foo out of yes/no/warn/auto).
| Where 'warn' prints a warning when permissions/copies would be
| discarded and 'auto' uses git format if needed.
But I think the name "upgradediff" isn't good, maybe just use the
name "git" as in [diff], e.g. "git = auto" as default with other
values being "git = keep" for the current way and "git = yes" to
always use git diff in mq, but not in other parts of hg.
thomas at intevation.de - http://intevation.de/~thomas/ - OpenPGP key: 0x5816791A
Intevation GmbH, Neuer Graben 17, 49074 Osnabrueck - AG Osnabrueck, HR B 18998
Geschaeftsfuehrer: Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner
More information about the Mercurial-devel