user37278
user37278

Reputation: 91

How to list all remote repositories in Mercurial?

I'm just looking for a Mercurial command that can list the available repositories in the remote parent repository. When I used subversion, this was simple, as in:

svn ls httpx://server/repos/002/trunk

svn ls httpx://server/repos/002/trunk/blort

svn ls httpx://server/repos/002/trunk/blort/fubar

And then I could use ``svn co'' to fetch as much or as little of some directory tree as I wished.

However, I can't find the analog to this in Mercurial. All the tutorials seem to expect you to know precisely the path to the remote repository and don't discuss anything about even some top level browsing of the remote repository.

Thanks.

Upvotes: 7

Views: 5763

Answers (2)

Serve Laurijssen
Serve Laurijssen

Reputation: 9733

I dont know about a command but it is doable with a script

for repo in `curl $url/hgweb.cgi | \
    grep -v "atom" | \
    grep hgweb.cgi | \
    awk -F'>' '{ print $3}' | \
    awk -F'<' '{print $1}'`; do \
    echo $repo \
    done

Upvotes: 1

sylvanaar
sylvanaar

Reputation: 8216

There is only 1 path to the repository.

With a DVCS you typically clone the repository as a whole. Then you can look at it all you want locally. That is why you have received those answers in the past.

Upvotes: 8

Related Questions