tags:

views:

63

answers:

3

I have a server with ssh, that I want to use as a central repo. However I can not install mercurial on it. Therefore how can clients push to the server over ssh without having mercurial installed on the server.

Thank You

+5  A: 

You do not have to install mercurial on that server. if you can mount it then you can create a regular repository by providing the path to "hg init" for creating a repository on this remote server.

Another way is sshfs. This is a filesystem client based on the SSH File Transfer Protocol.

So using this you could do

sshfs hostname: mountpoint # mounts the file system
hg init mountpoint # do your mercurial operation
fusermount -u mountpoint # unmounts the file system

I have not done this but you could give a try.

pyfunc
+1  A: 

If the local system can mount the remote repository using sshfs then that would work. Otherwise you're out of luck. :-(

Omnifarious
+2  A: 

Be aware that you can probably install mercurial on the server even if you think you can't. If you have a system with a similar architecture you can make local to install mercurial right in its own distribution directory and then just scp that up to the server.

The only difference in this case is that if you can't get the resulting you@there:mercurialCopiedIn/hg into the $PATH then you'll need to use the --remotecmd argument on your pushes and pulls to say what binary to use.

Ry4an