Wiki

Clone wiki

django-hgwebproxy / Home

* NEWS *

Author here, I'm in the consideration of reimplement this in another project, that supports mercurial repos as a single plugable app and also as an standalone app. If someone wants to keep the direction from the current implementation please send me a message I'm willing to transfer this repo.

English Documentation - Documentación en Español

Welcome

What is django-hgwebproxy?

django-hgwebproxy is a proxy built overtop of mercurial's hgweb which allows authentication using Django's auth application. Read/Pull and Write/Push permissions can be added on a per-repository basis using Django's admin interface.

Requirements

Installing

The application can be installed installed using easy_install or pip:

$ sudo easy_install django-hgwebproxy
$ pip install django-hgwebproxy

or you get the source tarball on:

or much Better clone my repo

$ hg clone https://mariocesar@bitbucket.org/mariocesar/django-hgwebproxy/

Screenshots

Hwebproxy overview screenshot Hwebproxy overview screenshot

More: http:www.flickr.com/photos/mariocesar/sets/72157621783087769/

Usage

You can start testing hgwebproxy from the example project in the source code.

$ hg clone http://bitbucket.org/mariocesar/django-hgwebproxy/
$ cd django-hgwebproxy/example
$ python manage.py syncdb
$ python manage.py runserver
  1. Go to http://127.0.0.1:8000/admin/
  2. Add a new mercurial repositories, providing a name and a path to an existing repositories. You can use '..', to manage your copy of hgwebproxy it self.
  3. Explore the mercurial repositorie going to http://127.0.0.1:8000/admin/repos/{your-reponame}
  4. Have fun!

On the command line you can pull and push code to the repositories, for example if you manage a repo named 'test'

$ hg clone http://127.0.0.1:8000/admin/repo/test/
http authorization required
realm: Basic Auth
user: admin
password: 
destination directory: ulriksen
requesting all changes
adding changesets
adding manifests
adding file changes
added 13 changesets with 82 changes to 75 files
updating working directory
75 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ cd test

Now made some changes and commit a new revision, after that push

$ hg push
http authorization required
realm: Basic Auth
user: admin
password: 
pushing to http://127.0.0.1:8000/admin/repo/ulriksen/
searching for changes
added 1 changesets with 1 changes to 1 files

Notice that the user 'admin' is superuser, you can create users and asign permissions for managing the repositories. Permissions for hgwebproxy are:

  • Can pull: the user can clone and explore the repositorie, but can't push revisions
  • Can push: the user can clone, explore and push code to the repositorie

You can add this permissions on the change form of the Auth app of django for Users.

Sites and Proyects using Django-Hgwebproxy

Updated