"hg log" for remote repositories?

Matt Mackall mpm at selenic.com
Thu Sep 13 12:32:56 CDT 2007


On Thu, Sep 13, 2007 at 09:52:53AM -0700, Jens Alfke wrote:
> Is there a way to get the version history of a remote (ssh or http)  
> repository? "hg log" only works on local repos. If I have a local  
> clone I can use "hg incoming" and "hg outgoing" to see the differences  
> in their revision graph, but I can't find a way to just inspect the  
> remote repo.

I suppose "ssh user at server hg log" or "firefox http://server" is cheating?

The general answer is no. The wire protocol is intentionally very
narrow. It's restricted to supporting the things we can do efficiently
over the wire (that is: push and pull). We could do log over the wire,
but it would be a) very complicated or b) missing lots of features or c)
*SLOW*. The same applies for update, commit, diff, etc.

As it happens, implementing general support for (c) is dead simple
(and apparently the route bzr took). But if we did that, people would
pester us to implement (a) instead ("Mercurial is so slow! <operation
it wasn't designed for> takes ages!"). And implementing (a) would mean
we wouldn't have time to implement other features. And it'd probably
-still- be painfully slow.

> OK, I just thought of a way: run "hg incoming" from an empty  
> repository. Is this kosher? Is there any simpler way?

Sure. But incoming is doing exactly the same thing as pull over the
wire. Which is why incoming -vp, etc., works.

-- 
Mathematics is the supreme nostalgia of our time.


More information about the Mercurial mailing list