Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mercurial hg mv doesn't move all files

Tags:

mv

mercurial

Probably an easy one but I haven't dug up anything with the usual search queries so I thought I'd ask here. Basically I'm trying to rearrange my repo; for example:

mkdir test
hg mv DirectoryOfStuff test/

Mercurial moves most of the contents but it leaves some directories an files behind. So far I haven't seen any pattern to what it moves and what it doesn't.

Is there an obvious rule or command that I'm missing?

Thanks!

like image 941
PeterM Avatar asked May 19 '11 07:05

PeterM


People also ask

How do I delete a file from Mercurial?

Once you decide that a file no longer belongs in your repository, use the hg remove command. This deletes the file, and tells Mercurial to stop tracking it (which will occur at the next commit). A removed file is represented in the output of hg status with a “ R ”.

What is .hg folder?

hg folder keeps track of one repo only. If you've got one in your home directory it means your home directory is under version control.

What is hg repository?

Strictly speaking, the term repository refers to the directory named . hg (dot hg) in the repository root directory. The repository root directory is the parent directory of the . hg directory. Mercurial stores its internal data structures – the metadata – inside that .


1 Answers

hg mv moves tracked files, not ignored or unknown ones.

To move everything and still record tracked files as a moved, use a regular (non-hg) move command and then hg addremove -s 100. The addremove command retrofits your file operations as add/remove/rename/move.

Use less than 100 to allow changes in file content & names.

like image 118
Macke Avatar answered Sep 27 '22 21:09

Macke