~ubuntu-branches/ubuntu/precise/mercurial/precise-updates

« back to all changes in this revision

Viewing changes to hgweb.cgi

  • Committer: Bazaar Package Importer
  • Author(s): Vincent Danjean, Javi Merino, Vincent Danjean
  • Date: 2010-07-04 09:55:28 UTC
  • mfrom: (1.2.12 upstream)
  • Revision ID: james.westby@ubuntu.com-20100704095528-bzag1mhfylss9zth
Tags: 1.6-1
[ Javi Merino ]
* New upstream release (1.6). Many bug fixes and improvements. Among
    them:
  - push: break infinite http recursion bug with Python 2.6.5
       (issue2179 and issue2255) (Closes: #586907)
  - zeroconf: Don't use string exceptions (Closes: #585250)
* Removed patch for_upstream__bashism_in_examples.patch since a fix for
    #581122 is included upstream.
* Updated Standards-Version to 3.9 (no change needed)

[ Vincent Danjean ]
* debian/control:
  + Use Breaks instead of Conflicts
  + Use a fixed version in Replaces
    I put 1.4 but it has been a long time since nothing has been moved
    from mercurial to mercurial-common

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/env python
2
2
#
3
 
# An example CGI script to use hgweb, edit as necessary
4
 
 
5
 
# adjust python path if not a system-wide install:
6
 
#import sys
7
 
#sys.path.insert(0, "/path/to/python/lib")
8
 
 
9
 
# enable importing on demand to reduce startup time
 
3
# An example hgweb CGI script, edit as necessary
 
4
 
 
5
# Path to repo or hgweb config to serve (see 'hg help hgweb')
 
6
config = "/path/to/repo/or/config"
 
7
 
 
8
# Uncomment and adjust if Mercurial is not installed system-wide:
 
9
#import sys; sys.path.insert(0, "/path/to/python/lib")
 
10
 
 
11
# Uncomment to send python tracebacks to the browser if an error occurs:
 
12
#import cgitb; cgitb.enable()
 
13
 
10
14
from mercurial import demandimport; demandimport.enable()
11
 
 
12
 
# Uncomment to send python tracebacks to the browser if an error occurs:
13
 
#import cgitb
14
 
#cgitb.enable()
15
 
 
16
 
# If you'd like to serve pages with UTF-8 instead of your default
17
 
# locale charset, you can do so by uncommenting the following lines.
18
 
# Note that this will cause your .hgrc files to be interpreted in
19
 
# UTF-8 and all your repo files to be displayed using UTF-8.
20
 
#
21
 
#import os
22
 
#os.environ["HGENCODING"] = "UTF-8"
23
 
 
24
 
from mercurial.hgweb.hgweb_mod import hgweb
25
 
import mercurial.hgweb.wsgicgi as wsgicgi
26
 
 
27
 
application = hgweb("/path/to/repo", "repository name")
 
15
from mercurial.hgweb import hgweb, wsgicgi
 
16
application = hgweb(config)
28
17
wsgicgi.launch(application)