Reputation: 17916
I want to print the contents of a single file from a remote repository, at a specified revision. How can I do that? In svn, it'd be:
svn cat <path to remote file>
The main thing I want to avoid is cloning the entire repository; some of the ones I'm working with are quite large, and I just need project metadata from a single file within.
Upvotes: 4
Views: 476
Reputation: 66733
You may be able to download the file content with wget
or your favorite browser. For example, for bitbucket repositories the URL looks like this:
http://bitbucket.org/<user>/<project>/raw/<revision>/<filename>
For the hg serve
web interface, the URL looks like this:
http://<host>:<port>/raw-file/<revision>/<filename>
Upvotes: 2
Reputation: 391396
There's two ways to do what you want:
hg cat -r REV FILE
against itIf you don't have the web interface, then you need to clone.
Upvotes: 6