TurnKey Linux Virtual Appliance Library

Mercurial config blues

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.

RE: Mercurial config blues

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

[web]

push_ssl = False

allow_push = *

contact = Your Name <you@yourdomain.com>

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

./mkrepo

 

Works for me. :)


oops

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

Thanks. I had to execute the

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 

 
00changelog.i
hgrc
requires
store
 
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?

RE:Mercurial config blues

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. :)

Works!

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?

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <strike> <caption>

More information about formatting options

Leave this field empty. It's part of a security mechanism.
(Dear spammers: moderators are notified of all new posts. Spam is deleted immediately)