Skip to main content

django-hgadmin

Features

  1. Create new repository and delete

  2. Create’s backup tarball before delete

  3. Change repository settings

  4. Authentification

Install

  1. Create new Django project

  2. Set HGWEBDIR_CONF, HGWEBDIR_WSGI, HGWEBDIR_ROOT paths and set HGADMIN_ALLOW_REMOVE True or False

  3. Cange Apache configuration (see example)

  4. Put your repos and run $ python manage.py syncdb

  5. ???

  6. PROFIT :)

Examples

Project tree

project
|-- __init__.py
|-- auth.wsgi -> ./hgadmin/auth.wsgi
|-- django.wsgi
|-- hgadmin
|-- hgweb.config
|-- hgwebdir.wsgi
|-- manage.py
|-- repos
|   |-- test0
|   |-- test1.tar.bz2
|   `-- test2
|-- settings.py
`-- urls.py

Django settings

##
# Helpers
import os.path
PROJECT_ROOT = os.path.normpath(os.path.dirname(__file__))

##
# Paths
HGWEBDIR_CONF = os.path.join(PROJECT_ROOT, 'hgweb.config')
HGWEBDIR_WSGI = os.path.join(PROJECT_ROOT, 'hgwebdir.wsgi')
HGWEBDIR_ROOT = os.path.join(PROJECT_ROOT, 'repos')

##
# Allow remove repo from server.
# Be careful!
HGADMIN_ALLOW_REMOVE = False

Apache settings

<VirtualHost *:80>
    ServerAdmin     webmaster@example.com
    ServerName      hg.example.com
    DocumentRoot    /path/to/hg/root

    ##
    # WSGI
    #
    # WSGIProcessGroup group-name
    # WSGIDaemonProcess group-name user=username group=group maximum-requests=2000
    #
    # Django settings.HGWEBDIR_WSGI
    WSGIScriptAlias / /path/to/hgwebdir.wsgi

    <Location />
        Order allow,deny
        Allow from all

        ##
        # WSGI based auth
        AuthName "Mercurial repository"
        AuthType Basic
        AuthBasicProvider wsgi
        WSGIAuthUserScript /path/to/hgadmin/auth.wsgi

        <LimitExcept GET>
                Require valid-user
        </LimitExcept>
    </Location>

    LogLevel debug
    ErrorLog /var/log/httpd/hg.example.com-error.log
    CustomLog /var/log/httpd/hg.example.com-access.log common
</VirtualHost>

Metadata

Release files for django-hgadmin 0.4.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-hgadmin 0.4.2
File Size Uploaded Provenance
django-hgadmin-0.4.2.tar.bz2 7.1 kB Without provenance Details

Release files / django-hgadmin-0.4.2.tar.bz2

Download URL django-hgadmin-0.4.2.tar.bz2
Size 7.1 kB
Tags Source
SHA-256 checksum
How to use checksums
e8d544de61608885f67afa71be43d0a36281e9fa407e3ad821aaeb410ac63af8
BLAKE2b-256 checksum
How to use checksums
d5246fde2f06b69af9921269d2488cb0a031da6a6632152e14d08f3600912514
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for django-hgadmin 0.4.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.4.2 This release

1 release file No provenance

0.4.0

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page