List of last changed files...

Christian Boos cboos at neuf.fr
Thu Oct 4 13:06:06 UTC 2007


Adam Salter wrote:
> ...
>
> We all know what "hg status" does.
>
> But I want a list in exactly the same format that tells me the files  
> changes in the last commit...
>   

To have the exact same format as status ... use status!

hg status --rev -2:tip

This is usually what you're looking for, as -2 will most of the time be 
the parent changeset of the tip. But tip can actually have any other 
parent changeset - or even two parent changesets, so you'd need to use 
"hg parent -rtip" to have a fool-proof way to do this, e.g.

tip-status() { hg status --rev $(hg parent -qrtip | head -1 | cut -d: 
-f1):tip; }

-- Christian




More information about the Mercurial-devel mailing list