Is it possible to checkout a single directory from a Mercurial (HG) repository?
mercurial, version-control
Solution
This concept is called "narrow cloning" and no, it's not possible at the moment in Mercurial.
It's on the radar of some of us that contribute to Mercurial but it's a hard problem to solve. For example:
- How do you calculate the hash of any new commits you make if you don't have all of the files in the repo?
- What happens if you try to view the history of a file in `contrib/testng` if that file was moved from another folder?
Problem
So, I'm trying to checkout just the TestNG plugin from the Netbeans contrib repository. (Or is it module? I'm new to Mercurial, so I don't really know the lingo yet.) When I run the following command... ``` hg clone http://hg.netbeans.org/main/contrib/ ``` ...I get the entire repository, which contains all of the the contrib plug-ins. Is it possible to just pull this location? http://hg.netbeans.org/main/contrib/file/tip/testng/ Thanks!