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

Jeremy Fitzhardinge jeremy at goop.org
Fri Jun 16 14:04:58 CDT 2006


Bryan O'Sullivan wrote:
>  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.
>   
Is there any downside to listing all files as relative paths from '.'?  
I guess it could break scripts assuming the current behaviour.

I can't say this is something which has ever bugged me.  I think adding 
a pile of "../../.."s to the output would be more noisy than helpful; 
you'd end up with output like:

    $ pwd
    /home/jeremy/hg/repo/foo/bar
    $ hg st
    A ../../biff/bonk
    ? ../../boo/bar
    D ../bibble
    M gonk/twop
    M splot

which looks pretty hard to visually parse.  The alternative would be to 
always stick "../../path" on the front of everything so all the lines 
have a consistent, but possibly redundant, prefix.

I dunno.  Worth trying, I suppose.

    J


More information about the Mercurial mailing list