RFC: Managing Mercurial Repositories Remotely
Jesse Glick
jesse.glick at sun.com
Tue Feb 19 13:16:51 CST 2008
Peter Arrenbrecht wrote:
> This is a somewhat lengthy proposal for an extension that supports
> running a limited set of hg commands server-side.
This would be very welcome. Having to rely on a human admin, or custom
admin scripts, just to create new clones on the server is a pain.
> == hg rclone et al. ==
However I am confused at the plethora of commands. To my mind, there are
only two primitive commands which must be supported:
* hg rinit $name (~ ssh server hg init $name)
* hg rdrop $name (~ ssh server rm -rf $name)
(An admin might want to disable the rdrop command or change it to move
the repo to a "junk" directory.)
If you can create a new repository on the server, you can prepare
whatever content for it you wish on your own local disk using regular Hg
commands, and then push in the desired changesets. As a concession to
performance, especially for people with limited upload bandwidth trying
to clone very large repositories, it would be good to add
* hg rclone -r $rev $old $new (~ ssh server hg clone -r $rev $old $new)
since otherwise you would have to upload megabytes of history which the
server already has in an existing repo.
Everything else you can do locally given the existing network operations
of clone, pull, and push. This does not apply to MQ operations, which
involve nonmonotonic changes to history, but I don't really see what you
need to do with MQ on a server other than create a versioned patch
queue, which is possibly simply with
$ hg rinit existing-repo/.hg/patches
$ hg -R .hg/patches push http://server/existing-repo/.hg/patches
More information about the Mercurial-devel
mailing list