Creating a Remote Mercurial Repository 3

Posted by Frederic Jean Mon, 14 Jan 2008 07:04:06 GMT

I wanted to play with the metaprogramming abilities of Groovy. So I started a new project in NetBeans and created a Mercurial repository to version it. I had a few files committed eventually.

I am really nervous about keeping code in a single location. This is why I do Time Machine backups on my mac. This is also why I keep a clone of Mercurial repositories on my workstation at work. Well, except for my personal projects. I keep a clone on the same server that is hosting this blog. I decided that this new project was worth cloning remotely.

It turns out that you can clone a repository to a remote system just as easily that you can clone a repository from a remote system. The syntax is simply:

hg clone [local-repo] [remote-repo]

This even works over ssh. It also leads to a little more peace of mind on my part.

Comments

Leave a response

  1. Avatar
    James Branam 3 days later:
    Hi, My name is James Branam and I'm the NetBeans Community Docs Manager. Your blog entry would make a fantastic Tips & Tricks entry for our Community Docs wiki (http://wiki.netbeans.org/wiki/view/CommunityDocs). Would you be willing to contribute it? If you need any help or have any questions, please contact me at james.branam@sun.com. I look forward to hearing from you.
  2. Avatar
    Jesse Glick 5 days later:
    Note that this does not work if your remote repositories are served over HTTP:
    abort: cannot create new http repository
  3. Avatar
    Fred Jean 6 days later:

    Jesse,

    I'm curious now. Are you able to push to your remote repository? I normally use ssh to connect to my remote repositories. I haven't tried over HTTP yet.

    Fred

Comments


(leave url/email »)