Is there a way to archive a Mercurial repository to a remote directory via SSH? For example, it would be nice if you could do the following:
hg archive ssh:// user@example.com /path/to/archive
However, this does not work. Instead, a directory called ssh: in the current directory.
I made the following quick and dirty script that emulates the desired behavior by creating a temporary ZIP archive, copying it through SSH and unpacking the destination directory. However, I would like to know if there is a better way.
if [[ $# != 1 ]]; then echo "Usage: $0 [ user@ ]hostname:remote_dir" exit fi arg=$1 arg=${arg%/}
Edit : clone -and- push would be ideal, but unfortunately Mercurial is not installed on the remote server.
source share