Adding a file x to the hg repository in one commit, then replacing it with a directory x/ containing a file x/a in the next commit does not work correctly -- the resulting clone will present a tree containing no x at all. Here is a shell script to reproduce this:
#!/bin/sh -e
mkdir repo_orig
cd repo_orig
hg init
echo a > a
hg add a
hg commit -m a
hg rm a
mkdir a
echo x > a/x
hg add a/x
hg commit -m x
ls -l
cd ..
git clone gitifyhg::repo_orig repo_clone
cd repo_clone
test ! -d a && echo "Directory 'a' was not cloned"
test ! -f a/x && echo "File 'a/x' was not cloned"
Adding a file
x
to the hg repository in one commit, then replacing it with a directoryx/
containing a filex/a
in the next commit does not work correctly -- the resulting clone will present a tree containing no x at all. Here is a shell script to reproduce this: