Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the mercurial equivalent of 'svn cat'?

Tags:

svn

mercurial

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>

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

like image 907
Chris R Avatar asked Feb 25 '23 17:02

Chris R


1 Answers

There's two ways to do what you want:

  1. Clone the repository locally, and execute the appropriate hg cat -r REV FILE against it
  2. Use a web interface that gives access to the remote repository

If you don't have the web interface, then you need to clone.

like image 74
Lasse V. Karlsen Avatar answered Mar 04 '23 12:03

Lasse V. Karlsen