Repo-relative indicator

Mads Kiilerich mads at kiilerich.com
Wed Nov 27 18:52:23 CST 2013


On 11/26/2013 02:38 AM, Bosco Rama wrote:
> Hey,
>
> I have a strange question:  Is there a repo-relative indicator for
> command-line paths similar to the bash '~' character?  Several times
> recently I've been several levels deep in a different part of the tree
> and have wanted to generate a 'hg diff' of a file in another part of the
> tree.  So, I either have to use a bunch of '..'s or use an absolute
> path to do this.  Short of setting my own '$repo' shell var and using
> that do I have any other options within hg?
>
> Nothing glaringly obvious shows up in the docs though there seem to be
> some things that can be massaged to help.  Just thought I'd get a
> definitive yay or nay from the collective before reinventing the wheel.

It sounds like you are looking for 'path:xxx', mentioned in 'hg help 
patterns'.

/Mads


More information about the Mercurial mailing list