remote file extraction
Brendan Cully
brendan at kublai.com
Wed Jul 2 01:38:56 UTC 2008
On Tuesday, 01 July 2008 at 18:34, Tom Karzes wrote:
>
> I want to extract the contents of a single file from a remote repository.
> For a local repository, I can use "hg cat" to achieve the desired result.
> But for a remote repository (e.g., ssh://me@host//repo), this command can't
> be used. Instead, I would need to do something like:
>
> hg clone --noupdate ssh://me@host//repo tmprepo
> hg cat tmprepo/file
> rm -rf tmprepo
>
> Is there a simpler way to do this, without the need to create a temporary
> local repository? This seems like it would be a fairly common thing to want
> to do, and if the file is small but the repo is large, having a more direct
> way would also save a lot of bandwidth. (I'd also prefer a command-line
> solution rather than a web-based solution.)
How about a command-line web-based solution?
wget http://<path/to/repo>/raw-file/<rev>/<file>
admittedly, it doesn't work for SSH repositories.
More information about the Mercurial
mailing list