canonpath usage on Windows

Steve Borho steve at
Sun Nov 28 10:14:30 CST 2010

On Sun, Nov 28, 2010 at 10:07 AM, timeless <timeless at> wrote:
> On Sun, Nov 28, 2010 at 6:05 PM, Steve Borho <steve at> wrote:
>> In general, if you're running commands with cwd outside of the
>> repository and are forced to give a --repository option, then any
>> filenames you use need to be absolute filenames.
>> I don't think this is Windows specific.
> i generally use relative paths...
> and i'd expect them to work.
> just as i'd expect absolute paths to work.

I think paths relative to cwd are fine as well, you just can't give
repository canonical file paths and expect them to work on the command

In general, util.canonpath is only used to find the canonical path of
files given on the command line.  Most internal APIs assume the paths
have been "canonicalized".

Steve Borho

More information about the Mercurial-devel mailing list