Joe Gillon's picture
I'm sure I'm missing something simple. For a particular project, say ccmr, I choose Mercurial as the SCM with path /srv/repos/hg/ccmr, Save, and absolutely nothing happens. It doesn't even create the folder. For another project, mdo, I created the folder and it looks just like the helloworld Hg folder, but again nada. When I copied the py file in helloworld to the mdo folder, it didn't show up. Basically, I can't get off the ground with Hg.
Ed Carp's picture

1. Create a file called hgrc in /srv/repos/hg:


push_ssl = False

allow_push = *

contact = Your Name <>

description = whatever


2. Create script mkrepo in /srv/repos/hg:

#! /bin/sh

cd /srv/repos/hg

mkdir $1

(cd $1;hg init)

chown www-data $1/.hg/store $1/.hg

cp hgrc $1/.hg


3. Run mkrepo:

chown 755 mkrepo



Works for me. :)

Ed Carp's picture

Oops, sorry, that third step should be "./mkrepo ccmr" or whatever your project should be.

Joe Gillon's picture

Thanks. I had to execute the script commands by hand. The script got a permission error. But it all looks good and I have a /srv/repos/hg/ccmr/.hg folder that has 

And in the project I said the path was /srv/repos/hg/ccmr. Also tried /srv/repos/hg/ccmr/.hg.  Both result in
Entry or revision was not found in repository.
Is that just because there's nothing there?
Ed Carp's picture

Yes.  Check something in and it will appear. :)

You had a permission problem because you didn't do a chmod on the script. You can also do "sh ./mkrepo ccmr", that will do the same thing.  The beauty of Unix (and derivations!) is that there's usually more than one way to do just about anything. :)

Joe Gillon's picture

Thank you Your Awesomeness. Now to see if I can figure out how Hg works...

Hmm. Actually, next thing is how to password and SSL it. Any words of wisdom?

Ed Carp's picture

Unfortunately, no.  I use it via VPN, so I don't need the encryption.  Maybe someone else can help...

Remember, this isn't really a TKL thing - Mercurial is used all over the world, and it might help to browse the web for Mercurial tutorials on how to actually use it.  Joel Spoolsky is a big proponet of Mercurial, and he's put out a couple of really good tutorials.

Add new comment