View  Edit  Attributes  History  Attach  Print  Search

Mercurial

FileServer.Mercurial History

Hide minor edits - Show changes to markup

October 29, 2012, at 10:00 PM by 83.226.44.246 -
Added line 46:

allow_push = user1

Changed lines 54-56 from:

allow_push = user1 allow_read = user1 push_ssl = false

to:

allow_push = user2 allow_read = user2

Changed line 60 from:

https://www.yourserver.com:9000/hg/

to:

https://www.yourserver.com:8443/hg/

October 22, 2012, at 07:23 PM by 83.226.44.246 -
Changed line 60 from:

http://www.yourserver.com:9000/hg/

to:

https://www.yourserver.com:9000/hg/

October 21, 2012, at 03:45 PM by 83.226.44.246 -
Changed lines 28-32 from:

restart apache and you should be able to to access the repo at:

http://www.yourserver.com:9000/hg/

to:
Added lines 58-60:

When the above was done I could restart apache and access the repo at:

http://www.yourserver.com:9000/hg/

October 20, 2012, at 04:31 PM by 83.226.44.246 -
Added lines 1-61:

Short notes on my Mercurial installation.

I basically followed the instructions on HgWebDirStepByStep and ended up with the following:

In /etc/apache2/sites-enabled/default-ssl I added

        ScriptAliasMatch ^/hg(.*) "/var/www/hg/hgwebdir.cgi$1"
        <Directory "/var/www/hg">
                AuthType Basic
                AuthName "Mercurial repositories"
                AuthUserFile /var/www/hg/hgusers
                Require valid-user
                Options ExecCGI FollowSymLinks
                AllowOverride None
        </Directory>

My users are specified in /home/repo/hg/hgusers

user1:$ajlhgvlihasbdhgbw7hgEJO.
guest:u883hCsadddCs

To add another user you can do the following:

htpasswd /home/repo/hg/hgusers another_user

restart apache and you should be able to to access the repo at:

http://www.yourserver.com:9000/hg/

The last two lines of hgwebdir.cgi looks like this

application = hgwebdir('hgweb.config')
wsgicgi.launch(application)

The hgweb.config looks like this

[paths]
proj1 = /var/www/hg/repos/proj1/
proj2 = /var/www/hg/repos/proj2/

[web]
style =
allow_archive = gz zip
contact = Master, master@universe.se
push_ssl = false

The repositories are inside the proj1 and proj2 directories, and each repository have its own configuration, i.e. repos/proj1/.hg/hgrc contains the following

[web]
description = This contains my proj1 files.
allow_push = user1
allow_read = user1
push_ssl = false