What is the mercury equivalent of "svn cat"?

I want to print the contents of one file from a remote repository with the specified revision. How can i do this? In svn it will be:

svn cat <path to remote file> 

Update

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 the project metadata from a single file inside.

+4
source share
2 answers

There are two ways to do what you want:

  • Clone the repository locally and execute the corresponding hg cat -r REV FILE against it
  • Use the web interface that provides access to the remote repository

If you do not have a web interface, you need to clone.

+6
source

You may be able to download the contents of the file using 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 is as follows:

 http://<host>:<port>/raw-file/<revision>/<filename> 
+2
source

All Articles