Commit Graph

2591 Commits

Author SHA1 Message Date
Vadim Gelfer
e0b0ae3431 clean up trailing white space. 2006-07-12 08:28:00 -07:00
Thomas Arendsen Hein
e99c2d8c39 Added tests for local and remote init.
This tests the changes done in 974850ade4a1 and 53c61ee4b42e.
2006-07-12 09:01:10 +02:00
Thomas Arendsen Hein
56e267824a Add ui method to set --ssh/--remotecmd, use it in init/clone/pull/push/in/out.
The only user visible change is that 'hg init' now accepts this options, too.
2006-07-12 08:57:18 +02:00
Vadim Gelfer
5f404bd1f9 clone: move code into hg module. make doc better.
api in commands module is still same, but version in hg is best for
calling within python now.
2006-07-11 16:18:53 -07:00
Vadim Gelfer
67dc7a0949 merge with crew. 2006-07-11 15:52:56 -07:00
Vadim Gelfer
8a2a795f3f parse url schemes more strictly.
previous code mistook repo named "hg" for scheme named "hg".
2006-07-11 15:52:36 -07:00
Vadim Gelfer
683b313996 add missed tests for diff -b/-B 2006-07-11 15:51:16 -07:00
Vadim Gelfer
0923c5c205 merge with crew. 2006-07-11 13:47:51 -07:00
Thomas Arendsen Hein
51f1e8f0e0 Additional information about URLs in pull/push/clone/init:
- clone to ssh://
- init via ssh://
- example for pull from an absolute directory via ssh://
- push to http:// and https://
2006-07-11 22:36:52 +02:00
Aurelien Jacobs ext:(%22)
3128936ebe disambiguate help about url syntax 2006-07-11 22:19:49 +02:00
Mathieu Clabaut ext:(%22)
7d1dd836ba Vim script: Adaptation from CVS to Mercurial 2006-07-10 23:45:16 +02:00
Mathieu Clabaut ext:(%22)
2958e5cbf3 Addition of CVScommand vim script as a base for HGcommand 2006-07-10 23:39:08 +02:00
Vadim Gelfer
515c2fd875 merge with crew. 2006-07-10 09:36:56 -07:00
Sébastien Pierre
ec2dc6ca98 darcs2hg: improved logging 2006-07-10 09:24:04 -07:00
Sébastien Pierre
27d193fe81 darcs2hg: pause and resume support, date extraction from commit hash, does not break on empty commits 2006-07-10 12:19:37 -04:00
Nils Decker
7b2bc09d74 darcs2hg.py: use darcs patch hash as patch identifier
The use of the patch name is dangerous when duplicate names exist.
In case of a duplicate name the second patch and all its dependancies
are merged into a single mercurial patch.
The patch identifier (hash) is always unique.
2006-07-09 21:41:00 -07:00
Benoit Boissinot
1433da063e merge with crew 2006-07-09 14:42:18 +02:00
Valentino Volonghi aka dialtone
1caa939c7d adding local_hostname option to smtp configuration 2006-07-09 14:12:19 +02:00
Alexis S. L. Carvalho
39d9875f38 Respect "Connection: close" headers sent by HTTP clients.
A HTTP client can indicate that it doesn't support (or doesn't want)
persistent connections by sending this header.

This not only makes the server more compliant with the RFC, but also
reduces the run time of test-http-proxy when run with python 2.3 from
~125s to ~5s (it doesn't affect it with python 2.4, which was already
~5s).
2006-07-07 14:33:51 -03:00
Benoit Boissinot
be9e8c572e allow use of extensions in python hooks
extensions are loaded with hgext_ prefix, try to use them if
the module is not found in the normal path
2006-07-09 11:10:11 +02:00
Thomas Arendsen Hein
ee260bdfad Changed default timeout for run-tests.py from 30 to 180 seconds.
As e.g. test-http-proxy already takes quite some time (about a minute here)
and tests usually should clean up after themselves, the timeout should only be
hit in case of other problems.
2006-07-07 11:23:53 +02:00
Lee Cantey
169c49677d Redirect MacPython link to point to python.org 2006-07-06 09:26:31 -07:00
Vadim Gelfer
8f588d6d9a merge with mpm. 2006-07-06 15:04:10 -07:00
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
Matt Mackall
cbe34cd629 Fix annotate breakage 2006-07-06 14:15:24 -05:00
Vadim Gelfer
e9e427a8ab tests: record few more daemon pids to be safe 2006-07-06 11:49:19 -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
Vadim Gelfer
6901c8941f run-tests.py: make tests use same python interpreter as test harness.
this is wanted because some tests run python interpreter directly.

must use same python interpreter in tests as in main harness or problems
will happen because of e.g. different python abi if run-tests.py run
with python 2.5 but system python is 2.4.

fix is to see if system python is used and is named python.  if no,
put symlink called python at front of shell search path.
2006-07-06 10:09:24 -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
eef60e2c8d help: add help to mq extension 2006-07-03 14:30:38 -07:00
Vadim Gelfer
4538f9a28f help: make "hg help EXTENSION" work 2006-07-03 14:30:24 -07:00
Thomas Arendsen Hein
56992c9012 Adjusted test output to changed abort message of 'hg merge' (from 37579062eb39) 2006-07-03 19:28:31 +02:00
Vadim Gelfer
95fcf73027 merge with crew. 2006-07-03 10:19:09 -07:00
Raphael Marmier
4d2b4ac19a Disable automatic line endings conversion on windows
The rationale behind this is that such conversion implies a particular
situation in which all files in the repo are terminated by only LF. This
is documented nowhere and it bit me sharply when I upgraded.

Furthermore, it works on the assumption that a file containing no NULL
characters are actually a text file. Therefore it cannot guarantee that
no binary file will be harmed in the process.

Currently, if a file already contains CRLF line endings when it is
copied to the working dir from the repo, then the version in the working
dir will be corrupted by an extra CR.

I'm working on a patch that will turn this into a warning. But as a side
effect, committing such a file back will strip it from its CR.

In all case, unrequested data modification can occur under the feet of
the user, which is bad(tm), ihmo.
2006-07-03 10:18:46 -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
Vadim Gelfer
f5cc524830 test-webraw: do not store hostname in test output 2006-06-30 22:04:02 -07: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
703b773cf0 Merge with crew. 2006-06-30 22:09:43 +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
1a37a0b91c Use more compatible cmd instead of $(cmd) in test-http-proxy 2006-06-30 21:41:24 +02:00
Thomas Arendsen Hein
32b4467310 Don't change $PATH (breaks python in other locations) and $PWD in test-oldcgi 2006-06-30 21:40:56 +02:00
Thomas Arendsen Hein
e7d4218f04 Don't use non-sh declare in test-oldcgi. 2006-06-30 21:40:20 +02:00