Since my development and testing is dependent on commit changes to the l10n repositories, I need to have commit access to generate more changes and since I am not a localizer I do not have access to the l10n repositories.
Therefore there were three options for me:
- Gain commit access to the x-testing repository on the l10n repositories and do commits in there. Inconvenience: It is a long process to gain access.
- Create my own user repo in hg.mozilla.org. The same inconvenience as the previous one
- Setup my own local repo with pushlog
Steps to create your own hg repo locally with pushlog:
- cd /repos
- hg clone http://hg.mozilla.org/users/bsmedberg_mozilla.com/hghooks/
- hg clone http://hg.mozilla.org/users/bsmedberg_mozilla.com/hgpoller/
- hg clone http://hg.mozilla.org/users/bsmedberg_mozilla.com/hg_templates/
- mkdir test-repo
- cd test-repo
- hg init
- cp ../hghooks/examples-hgrc .hg/hgrc // which basically contains the following:
# the a_ and z_ prefixes are for ordering:
# any hooks which can veto an action (require-singlehead) should be run before
# hooks which make permanent logs (record-changeset-info)
[hooks]
pretxnchangegroup.a_singlehead = python:mozhghooks.single_head_per_branch.hook
pretxnchangegroup.z_linearhistory = python:mozhghooks.pushlog.log
- export PYTHONPATH=/repos/hghooks/ // /repos is my path, use your own
- vi .hg/hgrc // Add the following with your own paths:
[web]
templates = /repos/hg_templates
style = gitweb_mozilla
[extensions]
pushlog-feed = /repos/hgpoller/pushlog-feed.py
buglink = /repos/hgpoller/buglink.py
hgwebjson = /repos/hgpoller/hgwebjson.py - sudo apt-get install python-simplejson //hgwebjson needs this module
- hg serve //To start your hg server
You can now check your own hg server with pushlog:
http://localhost:8000
and your pushlog at:
http://localhost:8000/pushlog
Remember that it is a server and you have to clone first!
- export PYTHONPATH=/repos/hghooks/
- hg clone test-repo
test-repo-2 - cd test-repo-2;
echo "test data" > testfile;
- hg
add testfile;
- hg
ci -m "adding a test file";
- hg push
../test-repo
The HG templates repo is located here:
ReplyDeletehttp://hg.mozilla.org/hg_templates/
Note that Mercurial 1.2 does not work with our hooks. Bug https://bugzilla.mozilla.org/show_bug.cgi?id=486539 to follow it.
ReplyDeleteYou can do easy_install mercurial=1.1 to get the right version
Armen, remember to check this post:
ReplyDeletehttp://armenzg.blogspot.com/2008/12/how-to-show-subdirectories-in-your-hg.html
where the config files is correct:
[web]
templates = /repos/hg_templates
style = gitweb_mozilla
[paths]
l10n-central/af = l10n-central/af
l10n-central/de = l10n-central/de
mozilla-central = mozilla-central