Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to easily publish a new Mercurial repository or subrepository on a shared central server? (Push a clone)

Mercurial's vast publishing options include HgWeb (and formerly HgWebDir), which is almost perfect for my needs. HgWeb 1.6 supports multiple repositories, including collections.

So hgweb.config could contain something like this:

[collections]
/home/user/collection1 = /home/user/collection1
/home/user/collection2 = /home/user/collection2

So, the above folders (collection1, collection2) might each contain about 10-20 repositories, as subfolders, in the above locations.

My question is, is there any hg extension, or configuration technique that will allow me to push a clone up to a collection being served by hgweb?

My usual approach on Linux is to login remotely using SSH and then do an hg clone of my developer workstation copy, which I momentarily serve up using `hg serve'. I find that I work with some Linux-savvy developers, who have no problem ssh-ing into a box, and doing stuff with hg. But windows users (a) don't grok ssh, and (b) don't know Linux command line environments, and want a way either with their IDE version control plugins, or GUI tools, or with a CGI Page (written by me in python), to remotely pull a clone, giving them effectively a way to push or publish their HG Repository up to a central repository without recourse to any ssh access to the remote server system. In the odd case that a centralized mercurial server was running on Windows, you might not even be ABLE to ssh into the remote server.

It seems to me the answer is "no you can't do this", unless I write my own extension for hgweb, which I am about to do. But if there is a way to do this already in hg, I would like to know it.

Related questions:

Setup of mercurial on shared hosting

Multiple central repositoriess with mercurial

like image 936
Warren P Avatar asked Nov 05 '22 19:11

Warren P


1 Answers

The default web interface of Mercurial does not support remote creations of repositories (see Why doesn't Mercurial support remote repository creations over HTTP?). However, if your fellow developers principally are allowed to login to the Mercurial server using SSH and if you have some kind of shared filespace on that server which can be accessed by multiple users, you could clone local repos to the server using an SSH repo URL (see this answer). That should be also easy for Windows users too as the lowlevel SSH stuff is done by Mercurial.

like image 102
Oben Sonne Avatar answered Nov 09 '22 10:11

Oben Sonne