Reputation: 141
We are migrating from CVS to Mercurial, and my job is to make Mercurial work as similarly to CVS as possible.
CVS allows you to commit and checkout directories (in addition to files), which means if you copy a directory with files in it (eg. foo/bar1.txt, foo/bar2.txt, foo/bar3.txt) to another directory (eg. cp -r foo foo2
), then cvs will say:
> cvs -nq update
? foo2
However, in Mercurial, the behaviour is different because you can't commit individual directories - you can only commit the files in those directories. As a result, if you do the same thing in Mercurial, you get:
> hg status
? foo2/bar1.txt
? foo2/bar2.txt
? foo2/bar3.txt
This is not ideal, especially when dealing with directories with hundreds or thousands of files in them. Every file in foo2 is untracked, so it would be much nicer if Mercurial would tell us that the entire directory is untracked. Is there a way to convert the Mercurial output to something more similar to CVS, where if all files in a directory are untracked, then hg status will say that the entire directory is untracked?
Upvotes: 2
Views: 13