Commit Graph

118 Commits

Author SHA1 Message Date
Vincent Wagelaar
aa1081493c Fix hg serve... 2005-08-30 16:25:46 +02:00
Vincent Wagelaar
11db1866f1 Fix TypeError 2005-08-30 14:52:58 +01:00
Vincent Wagelaar
b642bda4e5 Change use of global sys.stdout, sys.stdin os.environ to a hgrequest object.
Note: also change hgrequest.write(str(thing)) to hgrequest.write(thing),
people should make sure they write strings.
2005-08-30 10:57:52 +02:00
Thomas Arendsen Hein
05fb9953ac Allow list of (virtual, real) or dictionary to be passed to hgwebdir. 2005-08-29 07:39:01 +02:00
Thomas Arendsen Hein
19e3a9cdda Cleaned up hgweb.hgwebdir.run() 2005-08-29 07:34:35 +02:00
Thomas Arendsen Hein
8443979389 Use ConfigParser only in hgwebdir.__init__() 2005-08-29 07:28:39 +02:00
Thomas Arendsen Hein
1174c2ce17 Don't create repo objects in hgwebdir, ui object is enough. 2005-08-29 07:19:02 +02:00
Thomas Arendsen Hein
21afb81102 Reverted change 861174d374d5: Reading changelogs is too slow. 2005-08-29 07:07:07 +02:00
Thomas Arendsen Hein
57ee4cf496 Use commit time instead of stat to check time of last change. 2005-08-28 19:50:13 +02:00
Thomas Arendsen Hein
f1b6c5859a Completed renaming author to contact in hgwebdir:
Prefer [web] contact = foo instead of author, but still accept the old name.
Adjusted template to show obfuscated contact. Drop bogus <i>email</i> entry.
2005-08-28 18:13:28 +02:00
Thomas Arendsen Hein
4bd7a0accd Create repository objects instead of using own ConfigParser in hgwebdir. 2005-08-28 17:55:15 +02:00
Thomas Arendsen Hein
c7f84e08e4 Longer variable names in hgwebdir: l->repos, v->name, r->path 2005-08-28 17:53:37 +02:00
Thomas Arendsen Hein
9129755767 Move generating short username to display in hg/hgweb annotate to ui module. 2005-08-28 17:29:28 +02:00
Ollivier Robert
2f777bc14b Use a template for the error message. 2005-08-27 23:44:15 -07:00
Ollivier Robert
19c2c58ce2 Use .has_option to avoid the unknown Exception. 2005-08-27 23:44:02 -07:00
Ollivier Robert
e7d03166de NoOptionError is unknown there. 2005-08-27 23:43:13 -07:00
Ollivier Robert
1ebd87c07a Handle a nonexistent repository with a 404 error.
Based on changeset 62ea868cafbfa3acb7e5dba6982ecb46a1637246 from
Vincent Wagelaar <vincent@ricardis.tudelft.nl>
in http://hannibal.lr-s.tudelft.nl/~vincent/fcgi
2005-08-27 23:43:08 -07:00
roberto@keltia.freenix.fr
b5f8402762 Protect against unknown repositories. 2005-08-27 23:42:51 -07:00
mpm@selenic.com
38e347d953 hgweb: add mdiff / fix sorting of archives 2005-08-27 18:40:25 -07:00
mpm@selenic.com
3af508f816 Minor import fixups 2005-08-27 15:19:36 -07:00
mpm@selenic.com
4ffffb3fc4 hgweb: add catch for connection reset
suggested by Jeff Sipek
2005-08-27 01:55:10 -07:00
mpm@selenic.com
e243599beb Various cleanups for tarball support
s/tarball/archive/
query config rather than maintaining a list
default all archive support to off
use changeset nodes rather than manifest nodes
use web:name for archive name
don't use rev number in filename, it's not portable
refactor manifest lookup bits
use finally: clause to delete tmpfile
2005-08-26 20:52:31 -07:00
Wojciech Milkowski
3273ff69eb tarball support v0.3 pt 2 2005-08-26 20:51:48 -07:00
Wojciech Milkowski
340ba8e86e tarball support v0.3
Hello,

I'm slowly improving support for tarballs in Mercurial. Attached patch
is made against current tip in Matt's repository - c582763bc7fd, and
contains everything done so far.

Changes:
- gzip and bzip2 tarballs are sent immediately without writing to
temporary files (I was wrong Matt, it can be done very easy)
- hgrc customization, you can choose which type (if any) you will support

There's no easy way to support compression levels, since TarFile open()
assume that it is 9. I tried to use gzopen(), and bz2open() methods
instead, but it seems that headers of generated archives, are missing or
wrong. We could eventually try to rewrite tarfile.py and include our own
version into Mercurial, but I don't know if it's good idea...

Wojtek
2005-08-26 20:51:34 -07:00
Bart Trojanowski
3529a29a40 [PATCH] raise exceptions with Exception subclasses
Fixed the patch.  Using Exception subclasses.

(tweaked by mpm)
2005-08-26 19:08:25 -07:00
Thomas Arendsen Hein
d28fa10d3f Some more spacing/indentation/linebreak cleanups to hgweb.py. 2005-08-26 13:29:52 +02:00
benoit.boissinot@ens-lyon.fr
95b97f01ed pep-0008 cleanup
- Don't use spaces around the '=' sign when used to indicate a
      keyword argument or a default parameter value.
2005-08-26 13:06:58 +02:00
mpm@selenic.com
bf94ed815e Minor tweak to the revgen algorithm 2005-08-24 03:33:54 -07:00
mpm@selenic.com
7c92a626a7 Minor hgwebdir tweaks
- ignore / for PATH_INFO
- fix // in URLs
2005-08-24 03:32:08 -07:00
mpm@selenic.com
8bb9bacafa hgweb: change startup argument processing
- allow passing a repo object instead of a path
  (if we get a string, we construct a repo object)
- hg serve: pass options via repo.ui.setconfig
- add --style option
- get default name from repo.root rather than getcwd()
- remove template argument to hgweb()
- reduce create_server from 8 args to 1
2005-08-21 15:56:14 -07:00
mpm@selenic.com
731055ffd1 Add web:style option 2005-08-21 15:00:02 -07:00
mpm@selenic.com
ad6bff85ff Remove debug print 2005-08-21 11:52:52 -07:00
mpm@selenic.com
ac6c96ea43 Fix RSS feeds 2005-08-21 11:46:39 -07:00
mpm@selenic.com
386d6f39d6 hgweb: convert index entries to list expansion style 2005-08-20 13:11:36 -07:00
mpm@selenic.com
ba08a3d105 Merge with jeffpc 2005-08-20 13:08:07 -07:00
mpm@selenic.com
21802a4ed9 hgweb: Make maxfiles, maxchanges, and allowpull proper config options 2005-08-19 22:12:40 -08:00
mpm@selenic.com
bc11f47499 hgweb: sort repository list 2005-08-19 17:22:04 -08:00
mpm@selenic.com
f0ae86293f Fix hgwebdir virtual start-up 2005-08-19 17:01:11 -08:00
mpm@selenic.com
e827a5700c Add a multi-repository server
This merges a bunch of the ideas for a multi-repository CGI script and
simplifies things a bit.

It uses PATH_INFO so it generally wants paths of the form:

http://host/hg.cgi/virtualpath

This gets mapped via a simple config file to the real path. All info
about the repo is read from the repo's hgrc.
2005-08-19 16:38:25 -08:00
Josef "Jeff" Sipek
29f76a06ac Merge with MPM 2005-08-17 22:59:47 -05:00
Josef "Jeff" Sipek
8d47ab93e3 hgweb: Changed manifest page to list format syntax 2005-08-17 22:32:47 -05:00
Josef "Jeff" Sipek
e93ee68c7d hgweb: Changed file revision page to list format syntax 2005-08-17 22:08:15 -05:00
Josef "Jeff" Sipek
648fbc401f hgweb: Changed annotate page to list format syntax 2005-08-17 22:03:28 -05:00
Josef "Jeff" Sipek
1fb176c855 hgweb: Changed file page to list format syntax 2005-08-17 21:59:02 -05:00
Josef "Jeff" Sipek
2e63eb1703 hgweb: Changed changelog page to list format syntax 2005-08-17 21:45:44 -05:00
mpm@selenic.com
15214e2950 Fix stray debug statement 2005-08-17 18:41:04 -08:00
Josef "Jeff" Sipek
0977c5f04b Added support for #foo%bar# syntax
This required moving template() into the templater class
2005-08-17 21:14:20 -05:00
mpm@selenic.com
211f1e3677 hgweb: add [web] section to hgrc
This makes almost all of the hgweb settings available in hgrc.
2005-08-17 17:57:37 -08:00
mpm@selenic.com
26b61451d6 Whitespace 2005-08-17 16:37:04 -08:00
Bryan O'Sullivan
6d86d89086 Fix problem with "hg serve" on systems not providing IPv6. 2005-08-10 12:35:25 -08:00