hg status on current dir

Robin Farine robin.farine at terminus.org
Thu May 3 04:40:48 CDT 2007


On Thursday May 3 2007 03:55, TK Soh wrote:
> On 5/2/07, Matt Mackall <mpm at selenic.com> wrote:
> > On Wed, May 02, 2007 at 03:59:50PM -0500, TK Soh wrote:
> > > On 5/2/07, Robin Farine <robin.farine at terminus.org> wrote:

[...]

> > > >   hg status --exclude 'glob:*/*' .
> > >
> > > Thanks for all the suggestions, but this one seems to be most
> > > generic one, since I don't need to know the list of folders
> > > or files up-front. Thanks.
> >
> > Unfortunately exclude doesn't seem to be very effective at
> > keeping the subdirectories from actually being statted.
>
> Do you mean status will still travel into the subdirs, so the
> execution will be the same?

It will traverse direct subdirectories, no deeper. Granted, bad 
cases will cause a lot of unneeded stats. The advantage is that you 
get all the information you need about the current directory, i.e. 
including added or deleted files.

Unless I am missing something, if you want to pass 'status' an 
explicit list of names you need to build this list by statting all 
entries in the current directory and add the relevant entries from 
the manifest.

Robin


More information about the Mercurial mailing list