May 12, 2011

How to show the related files to a Mercurial MQ patch

The distributed version control system mercurial allows to use
MQ ( Mercurial queues ) to have patcsets  collected, which can be
applied over a repository.

When using tortoisehg or the mercurial delivered tool hgtk ( hg view )  you
can see the related files belonging to a patchset.

The command qrefresh of mercurial allows to update a patchset.
But when you have different modified files, you don't want to have all
modifications in the patchset.
qrefresh offers to list the files on th run, but the problem is, that only those
listed files are in the patchset. You also have to add the files already in the

The GUI-Tools list the files belonging to a changeset, but how to do it on the
command line?

The command status is for help here. Without any option, the command
list the statue of the working directory, but when you call it with the
option --change , you get the files for the changeset:

hg status --change qtip 
This command lists the files belonging to the last patch applied, but instead
of qtip you can also take the Patchname.