Bug Report: hg {copy, rename, mv} with ".." to an empty directory fails with obscure error
Mike Neuman
mcn at EnGarde.com
Sat Oct 6 13:20:20 CDT 2007
Matt Mackall wrote:
> Can you try adding some debugging prints to
> mercurial/util.py:canonpath and see if you can catch it doing
> something obviously dumb?
Nothing obviously dumb, but notice that the error message is when
python tries to stat the destination file, which doesn't exist.
% hg mv file1 ../dir2
abort: /home/mcn/test-rep/dir2/file1 not under root
The cause of this error is an OSError exception thrown when os.stat()
is called with the non-existent destination file.
The OSError is:
[Errno 2] No such file or directory: '/home/mcn/test-rep/dir2/file1'
I'm happy to keep tracking this down if you have more suggestions.
-Mike
More information about the Mercurial
mailing list