[PATCH 0 of 2] mq: automatically upgrade to git patch when necessary (issue767)

Patrick Mezard pmezard at gmail.com
Tue Dec 29 10:40:44 CST 2009


Make mq automatically upgrade to git patches if necessary and drop former partial fixes. This behaviour can be disabled with:

  [mq]
  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.


More information about the Mercurial-devel mailing list