Y:\>hg -R Y:/mercFlow.cache/vm-linux rename Migration-2010/create_directory_stru
cture.pl Migration-2010/create_directory_structure.pl2
abort: Migration-2010/create_directory_structure.pl not under root

I am in windows using Mercurial. I am trying to rename\move a file as a simple test. Y:/mercFlow.cache/vm-linx/Migration-2010/create_directory_structure.pl exists and is brow-sable in the file browser. Migration-2010/create_directory_Structure.pl most definitely does seem to exist under the vm-linux local repository.

What's going wrong here?

link|improve this question

50% accept rate
feedback

2 Answers

up vote 1 down vote accepted

You need to use paths relative to your current working directory when you use hg -R -- that is, the -R option does not change the working directory of the hg proceess. The --cwd option does change the working directory.

This illustrates the difference:

$ hg init test
$ echo hello > test/hello.txt
$ hg -R test add test/hello.txt
$ hg -R test status test/hello.txt
A test/hello.txt
$ hg --cwd test status hello.txt
A hello.txt

and this does not work:

$ hg -R test status hello.txt
abort: hello.txt not under root
$ hg --cwd test status test/hello.txt
test/hello.txt: No such file or directory
link|improve this answer
feedback

is Migration-2010/create_directory_structure.pl under version control? It has to be in your Mercurial repository before you can manipulate it with Mercurial.

link|improve this answer
Yes it is under Version Control. – Joshua Enfield Jul 27 '10 at 20:25
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.