I'm attaching a first cut at fixing this. The issue1574.c2ecaf63bade.diff
patch applies cleanly on crew:c2ecaf63bade and it refreshes patches in
git-style format when rebased.
The only tricky bit is that *all* patches are refreshed in git-style when
"[defaults] qrefresh = --git" or "[defaults] qimport = --git". This may
still be a bit surprising if there is a "mixed" patch queue with both
plain style and git-style patches.
I'm not sure I grok all the internals of MQ enough to parse the existing
patches before updatemq() runs repo.mq.finish() on them. Reading the
patches before unregistering them, and then using git=True only for those
that already had it would probably be a slightly better way of refreshing
rebased patches. |