cmdserver: set current process folder to a repository root after startup
idankk86 at gmail.com
Mon Feb 20 06:36:19 CST 2012
On Sun, Feb 19, 2012 at 9:04 PM, Sergey Antonov <sergant_ at mail.ru> wrote:
> On 17.02.2012 19:39, Matt Mackall wrote:
>> 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
>> repository root.
> Well, for me this is not an option.
> I'm writing a plugin to an IDE. There are too much existing code that
> operates on paths, written in assumption, that they are relative to
> repository root.
> For me it is easier to run standalone mercurial once to know a repository
> root from a path and then start a cmdserver instance with that path as
> working directory, than adapt 'path:' pattern.
> It is not a big deal though. Additional 100-200 ms per project in
> solution, if the project is not under known repository roots.
> By the way, do you think that adding a option to a cmdserver to change a
> working directory to repository root after startup is a bad idea for some
> reason ? Actually, I think cmdserver should do this by default without any
It shouldn't do this by default because the cmdserver is simply
meant to provide faster access to Mercurial's command line interface,
doing this will be a surprise to those expecting the default handling of
on the command line.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mercurial-devel