cmdserver: set current process folder to a repository root after startup

Matt Mackall mpm at selenic.com
Fri Feb 17 15:39:38 UTC 2012


On Fri, 2012-02-17 at 10:48 +0400, Sergey Antonov wrote:
> When I run hg in cmdserver mode it treats the paths relative to the 
> process current folder (like standalone hg).
> 
> So, if I get some path from a changeset description (i.e. 
> Folder/foobar.txt) the cmdserver does not accept it. I need either make 
> it a full path or relative to process current folder.

Or add 'path:' to it. From 'hg help patterns':

    To use a plain path name without any pattern matching, start it with
    "path:". These path names must completely match starting at the current
    repository root.

$ cd hg/mercurial
$ hg log localrepo.py | wc
   5513   22378  203124
$ hg log mercurial/localrepo.py | wc
      0       0       0
$ hg log path:mercurial/localrepo.py | wc
   5513   22378  203124

-- 
Mathematics is the supreme nostalgia of our time.





More information about the Mercurial-devel mailing list