MQ usability

Peter Williams pwil3058 at
Sat Aug 15 22:06:59 CDT 2009

On 16/08/09 11:42, TK Soh wrote:
> On Sat, Aug 15, 2009 at 10:06 PM, Stuart W. Marks<smarks at>  wrote:
>> Peter Williams wrote:
>>> On 15/08/09 13:13, Stuart W. Marks wrote:
>>>> But for MQ, the patch is mainly an internal storage format.
>>> No, it's not.  In a lot of cases, MQ is being used to generate patch
>>> sets for distribution to users who aren't necessarily using MQ to manage
>>> them at there end.
>> As Isaac Jurado pointed out, "hg export" will generate a patch, as will "hg
>> diff" and "hg qdiff". I should also add that even if MQ stores a patch file in
>> git format, these commands will produce output in conventional diff format if
>> their options and defaults indicate that they should. (Of course, they may also
>> lose information in the process.)
>> Anyway, the point is that even if MQ were to change its patch storage format,
>> you could still share conventional patches with non-MQ users by using these
>> commands instead of accessing the patch files directly.
> Please correct me if I am wrong, but the need to use git format is
> primarily to fix what conventional patch cannot support, namely the
> binary delta and permission change, etc. So on this kind of changes,
> we already can't share changes by exporting in conventional patch format.

Many patches don't contain binary or permission changes.

Also there's no suggestion that exported patch series should only be in 
patch(1) format.  The ability to export --git formatted patch series 
should also be possible.  The key point I'm trying to make is that there 
should be an MQ command for exporting PATCH SERIES tar/zip files (rather 
than tarring/zipping .hg/patches).  Whether to use --git format or 
patch(1) format should be a selectable option for this command.

> No offence, but how anyone would think maintaining conventional patch
> format outweigh the risk of losing changes is really beyond me.

It's the traditional way :-).  The rest of the world hasn't caught up 
with git and hg yet and that fact can't be ignored if you want to 
interact with that part of the world.

> Perhaps I am just one of the less significant few that have to deal
> with binary files.

Probably.  The only time that I version binary files is when storing 
graphic files.

PS The main reason I use --git myself is to retain copy/rename information.
Peter Williams                                   pwil3058 at

"Learning, n. The kind of ignorance distinguishing the studious."
  -- Ambrose Bierce

More information about the Mercurial-devel mailing list