Proposal: hg commands should operate on pwd, not on entire repo

Bryan O'Sullivan bos at serpentine.com
Fri Jun 16 10:59:34 CDT 2006


On Fri, 2006-06-16 at 09:43 -0600, Ed Santiago wrote:
> If I'm cd'ed to a subdirectory, it's intentional.  That's
> where I want to be.

For better or worse, we've gone over this before, and arrived at the
current behaviour.  I don't like some aspects of it, though.

Specifically, the behaviour of "hg status" is not terribly useful.  If
I'm in a subdirectory, it prints filenames relative to the root of the
repo, so I can't cut and paste those filenames into any other hg command
(they expect names relative to the current directory).

I can get relative pathnames by running "hg status ../../..", but that
means I have to know how far from the repo root I am, and have to do a
lot of not-very-helpful typing.

If that one problem were fixed, I'd be much happier.

> Currently, 'hg status' in a subdirectory shows all files
> in a repo, not just files under pwd.  Worse: hg commit
> will check in all modified files.  This is counterintuitive,
> especially for anyone who has ever used any other SCM
> tool.

It's different from the way Subversion works, for sure, but I've used
other tools that have repo-wide semantics for e.g. their commit
analogues.  I'd prefer us to not be gratuitously different to widely
used free tools, but I'd like to have a stronger argument for changing
current behaviour than simply "we're different", too.

> This is a big change, but there's lots of other big changes
> happening anyway;

Actually, the command line interface has been quite stable for a
(relatively) long time.

What do other people think of Ed's idea?

	<b

-- 
Bryan O'Sullivan <bos at serpentine.com>



More information about the Mercurial mailing list