开发者

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.


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.


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
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜