Bug Report: hg {copy, rename, mv} with ".." to an empty directory fails with obscure error

Mike Neuman mcn at EnGarde.com
Mon Oct 1 11:17:48 CDT 2007


Version 0.9.4.

Repeat with the following steps:

(Setup simple repository with two directories and one file)
% mkdir test-rep
% cd test-rep
% hg init .
% mkdir dir1
% mkdir dir2
% touch dir1/file1
% hg -m "Test" commit

( Try to copy a file from within dir1 into ../dir2 )
% cd dir1
% hg mv file1 ../dir2
abort: /home/mcn/test-rep/dir2/file1 not under root
% hg copy file1 ../dir2
abort: /home/mcn/test-rep/dir2/file1 not under root
% hg rename file1 ../dir2
abort: /home/mcn/test-rep/dir2/file1 not under root

( Try to copy from within the parent directory )
% cd ..
% hg copy dir1/file1 dir2
(Success)

-----
In summary:
% hg mv file1 ../dir2
(failure)
% (cd ..;hg mv dir1/file1 dir2)
(success)

Thanks for listening, and for the great revision control system!

-Mike


More information about the Mercurial mailing list