Commit Graph

1698 Commits

Author SHA1 Message Date
Vadim Gelfer
348b3e116e fix problems with external module handling. found by benoit boissinot.
first fix is to not store module objects in commands.external dict,
instead use module names for key into sys.modules.  this prevents circular
reference during cleanup of aborted transaction.

second is to get name right during import of external module.
2006-07-06 15:03:34 -07:00
Vadim Gelfer
832c369ab0 tests: add timeouts, make run-tests.py clean up dead daemon processes
test timeout feature is needed for test with python 2.5 beta.  if test
does not complete in time (30 seconds is default), it is killed.

some times daemon process used in test can be alive after the test
is killed by user or by timeout.  tests now record daemon pids into
$DAEMON_PIDS and run-tests.py kills all living daemons after every test.

final little change is to add newline to end of pid file printed by
"hg serve", else "cat hg.pid >> $DAEMON_FILES" gives garbage.
2006-07-06 11:45:34 -07:00
Alexis S. L. Carvalho
40dca7e9cd HTTPS: fix python2.3, persistent connections, don't explode if SSL is not available
The urllib2 differences between python 2.3 and 2.4 are hidden by
using keepalive.py, which also gives us support for persistent
connections.

Support for HTTPS is enabled only if there's a HTTPSHandler class in
urllib2.

It's not possible to have separate classes as handlers for HTTP and
HTTPS:  to support persistent HTTPS connections, we need a class that
inherits from both keepalive.HTTPHandler and urllib2.HTTPSHandler.  If
we try to pass (an instance of) this class and (an instance of) the
httphandler class to urllib2.build_opener, this function ends up getting
confused, since both classes are subclasses of the HTTPHandler default
handler, and raises an exception.
2006-07-06 03:14:55 -03:00
Matt Mackall
ae5d801274 Merge context patches 2006-07-05 13:28:25 -05:00
Brendan Cully
40833b0f4d templater.firstline should handle empty strings 2006-07-04 15:36:05 -07:00
Alexis S. L. Carvalho
741f652c36 hgweb: fix unbundle.
After the WSGI changes, even if a push over HTTP succeeds, apache
complains about "Premature end of script headers: hgwebdir.cgi" and
returns a "HTTP Error 500: Internal Server Error", making the local hg
abort.

The change to either of the files touched by this patch is enough to fix
this, but I think changing both is a more robust solution.
2006-07-03 00:33:19 -03:00
Alexis S. L. Carvalho
26477ce2c8 Fix push over https.
Without this patch, python gives me a
TypeError: write() argument 1 must be string or read-only buffer, not file
2006-07-03 00:23:58 -03:00
Alexis S. L. Carvalho
00abec0ffe Allow http://user@example.com URLs (i.e. without passwords) 2006-07-03 00:23:56 -03:00
Alexis S. L. Carvalho
fd806fb861 hg.py: move exception handling code to try to avoid hiding errors 2006-07-02 22:39:39 -03:00
Vadim Gelfer
4538f9a28f help: make "hg help EXTENSION" work 2006-07-03 14:30:24 -07:00
Vadim Gelfer
95fcf73027 merge with crew. 2006-07-03 10:19:09 -07:00
Thomas Arendsen Hein
96ef4def0a Clarified message when nothing to merge is seen.
Sometimes there's a non-tip head waiting to be merged, especially after
pulling in remote changes while there were local modifications in the working
directory which had to be committed before 'hg merge' can work.
2006-07-03 19:14:29 +02:00
Sean Meiners
34ff4a6539 Added ability to clone from a local repository to a (new) remote one.
Rearranged the clone command a good bit to make sure it validates that
the source does exist and that the destination doesn't before doing anything.
Before I moved the source repo check it would create the destination
repository before it verified the source existed.

Moved the responsibility for creating the destination repo root directory
entirly into the localrepo class so that local to local cloning doesn't break.
This also simplifies the code a bit since it's no longer being done in both
clone and init.

Changed the names of the 'repo' and 'other' variables to 'dest_repo' and
'src_repo' to maintain my sanity.

Passes 82/83 tests. The only failure is the version number test, which I
suspect is supposed to fail since it comes from a generated file.
2006-06-30 19:24:02 -07:00
Benoit Boissinot
fbf78b7285 str.rsplit does not exist in python 2.3 2006-06-30 23:02:08 +02:00
Thomas Arendsen Hein
be32671e51 Added missing space in continued string. 2006-06-30 21:57:57 +02:00
Thomas Arendsen Hein
5088fdd568 Include inttypes.h instead of stdint.h (fixes issue299)
Many projects use inttypes.h, too. stdint.h isn't available everywhere, e.g.
on some versions of Solaris, while inttypes.h is available everywhere where
stdint.h is.
2006-06-30 21:41:46 +02:00
Thomas Arendsen Hein
693aaef4a8 Merged WSGI fixes from http://hg.omnifarious.org/~hopper/webmerc/ 2006-06-30 21:36:45 +02:00
Eric Hopper
7011a8d5a5 Cleanup hgweb and hgwebdir's run method a bit. 2006-06-30 09:50:25 -07:00
Benoit Boissinot
eb4253c05c validate the resulting date in parsedate 2006-06-30 18:48:06 +02:00
Jose M. Prieto
9f3a9a5e6e Allow the use of human readable dates (issue 251) 2006-06-30 18:47:35 +02:00
Eric Hopper
39248f1205 Fix hgwebdir to run hgweb using run_wsgi. 2006-06-30 08:47:41 -07:00
Benoit Boissinot
11e30052ea add -r/--rev arguments to incoming and outgoing 2006-06-30 16:16:35 +02:00
Benoit Boissinot
e2896f54f1 add a new template function 'hgdate'
'hgdate' turns a date into a cset timestamp as printed by 'hg export'
2006-06-30 10:15:18 +02:00
Eric Hopper
cbbc59972c Arrange for old copies of CGI scripts to still work. 2006-06-29 19:06:18 -07:00
Eric Hopper
f4e85c5507 Fix raw files in the web UI. 2006-06-29 18:34:26 -07:00
Matt Mackall
b2760f583c Convert hg annotate to context api 2006-06-28 17:42:17 -05:00
Matt Mackall
0128820309 convert hg cat to new context api 2006-06-28 17:11:42 -05:00
Matt Mackall
828e814bf2 Add context helper functions to localrepo 2006-06-28 17:08:10 -05:00
Matt Mackall
092ee51a9a Add context.py: changeset and file revision contexts 2006-06-28 17:07:46 -05:00
Matt Mackall
2c85c281c4 simplify make_filename, fix hg cat bug
hg cat was using file-level rev/node ids for generating filename
templates. This simplifies make_filename to only use changeset
rev/node ids.
2006-06-28 17:06:56 -05:00
Matt Mackall
ca55a0ae02 revlog: make lookup handle binary nodes 2006-06-28 16:52:42 -05:00
Matt Mackall
e00f914b09 revlog: handle integer arguments to lookup 2006-06-28 15:49:33 -05:00
Vadim Gelfer
0abf0a06d3 import: make help clearer. suggested by asak. 2006-06-27 09:41:05 -07:00
Eric Hopper
a557f02a71 Really fix http headers for web UI and issue 254.
This also arranges for static content to allow a keepalive connection.
2006-06-27 09:33:12 -07:00
Vadim Gelfer
958489deb9 import: added tests, fixed bugs found by tests and asak. 2006-06-27 09:30:50 -07:00
Vadim Gelfer
6a5fd53170 merge with crew. 2006-06-27 00:13:44 -07:00
Vadim Gelfer
26b73700a8 merge with wsgi changes. 2006-06-27 00:10:41 -07:00
Eric Hopper
8ac8a46249 Put support for persistent connections back in. 2006-06-27 00:09:37 -07:00
Eric Hopper
000dcf2978 Fix two small bugs that would've prevented the web interface and IPv6
from working.
2006-06-27 00:09:35 -07:00
Eric Hopper
4498f60ff4 This patch make several WSGI related alterations.
First, it changes the server to be almost a generic WSGI server.

Second, it changes request.py to have wsgiapplication and
_wsgirequest.  wsgiapplication is a class that creates _wsgirequests
when called by a WSGI compliant server.  It needs to know whether
or not it should create hgwebdir or hgweb requests.

Lastly, wsgicgi.py is added, and the CGI scripts are altered to
use it to launch wsgiapplications in a WSGI compliant way.

As a side effect, all the keepalive code has been removed from
request.py.  This code needs to be moved so that it is exclusively
in server.py
2006-06-27 00:09:33 -07:00
Eric Hopper
a0494b3aa0 Fix server to set up a more WSGI compliant environment. 2006-06-27 00:09:31 -07:00
Vadim Gelfer
c311a0a586 import: parse email messages 2006-06-27 00:09:13 -07:00
Thomas Arendsen Hein
26282a0687 Don't require opts['dry_run'] to be set to fix external tools like tailor. 2006-06-27 08:31:03 +02:00
Thomas Arendsen Hein
609fc3aa7b Allow using default values with ui.configlist, too, and add a test for this. 2006-06-26 22:44:48 +02:00
Thomas Arendsen Hein
58e95b6ac7 Make "[web] allow_push, deny_push" and "[http_proxy] no" use ui.configlist. 2006-06-26 16:47:24 +02:00
Thomas Arendsen Hein
b1e9507c44 Fixed [web] allow_archive for comma separated parameters by using ui.configlist.
Changed tests/test-archive to use allow_archive instead of the deprecated
allowzip, allowgz and allowbz2.
2006-06-26 14:56:14 +02:00
Thomas Arendsen Hein
a8184486dc Added ui.configlist method to get comma/space separated lists of strings.
For example:
 users = alice, bob
 colors = red green blue
2006-06-26 14:52:26 +02:00
Thomas Arendsen Hein
6ed54e7d77 Fix ui.expandpath problem and broken test introduced by 5460bea2cce9. 2006-06-26 14:49:18 +02:00
Vadim Gelfer
fc206d2a40 do not try to package lsprof if not available. 2006-06-23 19:20:22 -07:00
Vadim Gelfer
b32329ed97 make ui.expandpath better with default path. 2006-06-23 18:23:32 -07:00