Accessing a remote repository on a web server using ftp with user and password

Jens Alfke jens at mooseyard.com
Thu Sep 13 10:04:31 CDT 2007


On 13 Sep '07, at 2:46 AM, Massimo Manca wrote:

> 1. Is there a method that may work to access a remote repository using
> ftp with user and password?

You can serve a repository read-only via static HTTP, by uploading the  
contents of a local repository's ".hg/" folder to the web server.  
Clients then use "hg pull" with a special "http-static:" URL, to pull  
revisions using only regular HTTP GETs of the static files.

...or so it says at
	http://www.selenic.com/mercurial/wiki/index.cgi/StaticHTTP
I haven't tried it myself :)

The only issue I can see is with race conditions when you want to  
update this repository. You shouldn't just FTP up the current version  
of the local repository in place, because during the copy readers will  
get inconsistent sets of files. Instead, FTP to another directory,  
then rename.

This is read-only, of course. It's still possible for other people to  
assist in development by sending you patches through some other means,  
most likely using "hg bundle" and then emailing you the resulting  
bundle file.

--Jens

PS: Not having shell or CGI access is pretty weird, in this day and  
age. You might consider a different provider. There are all sorts of  
web hosts who will gladly rent you vast amounts of web space with  
shell, SSH, CGI, MySQL, etc. for less than $10 a month. I recommend  
DreamHost.com, whom I've been using for a few years.


More information about the Mercurial mailing list