Commit Graph

8308 Commits

Author SHA1 Message Date
Sune Foldager
4a665141b4 allow http authentication information to be specified in the configuration 2009-05-04 20:26:27 +02:00
Rocco Rutte
00891e0e67 patchbomb: quoted-printable encode overly long lines
RfC2822 mandates a line length limit of 998 byte + CRLF.
Python mail tools break lines at 990 byte. To prevent
that, we quoted-printable encode overly long lines.
2009-05-08 18:30:44 +02:00
Martin Geisler
139c77bb60 patchbomb: fix quotes in help string 2009-05-09 01:15:24 +02:00
Bryan O'Sullivan
3054118009 Windows: improve performance via buffered I/O
The posixfile_nt code hits the win32 file API directly, which
essentially amounts to performing a system call for every read and
write. This is slow.

We add a C extension that lets us use a Python file object instead,
but preserve our desired POSIX-like semantics (the ability to rename
or delete a file that is being accessed).

If the C extension is not available (e.g. in a VPS environment
without a compiler), we fall back to the posixfile_nt code.
2009-05-08 15:52:26 -07:00
Bryan O'Sullivan
25eaff219f win32: clarify comment regarding use of fdopen 2009-03-26 13:14:35 -07:00
Bryan O'Sullivan
3b57c5ca0f win32: allow catching of both pywintypes.error and WindowsError 2009-03-26 13:13:48 -07:00
Bryan O'Sullivan
64e91f0ca1 atomictempfile: delegate to posixfile instead of inheriting from it 2009-03-26 13:12:11 -07:00
Dirkjan Ochtman
fc8d4f68ea merge with mpm 2009-05-08 22:35:10 +02:00
Matt Mackall
c70b6084a7 revlog: add cache priming for reconstructing delta chains 2009-05-07 19:39:45 -05:00
Matt Mackall
7aa559f96a revlog: use chunk cache to avoid rereading when splitting inline files 2009-05-07 19:39:45 -05:00
Matt Mackall
d48241b5f7 revlog: clean up the chunk caching code 2009-05-07 19:39:45 -05:00
Matt Mackall
9f78d7798f revlog: use index to find index size 2009-05-07 19:39:45 -05:00
Matt Mackall
00548e0791 revlog: preread revlog .i file
Smaller revlogs can be read with a single read, do it on open.
2009-05-07 19:39:45 -05:00
Sverre Rabbelier
1c34b4064b commit: be more verbose in the -u help text
Make the requirement of an argument for -u a little more explicit.
2009-05-08 16:30:51 +02:00
Nicolas Dumazet
f6419bf349 inotify: inotify.server.walk() simplify control flow 2009-05-04 18:04:41 +09:00
Nicolas Dumazet
292d751d64 inotify: inotify.server.walk*() remove unnecessary var
Remove hginside var and the test it relates to:

not( top or not hginside ) == (not top) and hginside, so the only case
when nothing will be yielded is when hginside is True and top is False.

Because of the returns placed upstream, this case will not happen anymore.
We can then safely remove hginside and the (if)s
2009-05-04 17:58:26 +09:00
Nicolas Dumazet
11aeef500e inotify: inotify.server.walk*() cleanup
When not in root repo, if we meet a .hg, bail out.
break was used, but return can be safely used instead: if we go through break
then (top or not hginside) == False -> nothing is done after the for loop
2009-05-04 17:17:03 +09:00
Nicolas Dumazet
eba4602603 inotify: inotify.server.walkrepodirs() simplify walking
Do not 'yield tuple, boolean' to filter later on the boolean.
Test the boolean first, and yield tuple only if needed.
2009-05-04 17:11:49 +09:00
Nicolas Dumazet
1ecc45315c inotify: inotify.server.walkrepodirs() simplify
compute string concatenation only once
2009-05-04 17:06:59 +09:00
Nicolas Dumazet
371a96accc inotify: inotify.server.walk() simplify algorithm
Do not yield (bool, tuple) in a subfunction and check later:
'if not bool: yield tuple'.

Instead simplify so the tuple doesnt get yielded on the first time, to avoid
systematic checks.
2009-05-04 16:57:52 +09:00
Nicolas Dumazet
43cc5ba1c8 inotify: inotify.server.walk cleanups
* Removing useless path computation
* moving 'reporoot' computation down to the first call to avoid confusion
  with the parameter used in walkit()
2009-05-04 16:43:28 +09:00
Simon Heimberg
09ac1e6c92 separate import lines from mercurial and general python modules 2009-04-28 17:40:46 +02:00
Giorgos Keramidas
afd8c70fd6 manpage build: fail early when xmlto is not available
When we try to build manpages with xmlto and sed, but xmlto is
missing fail at the xmlto stage.  Otherwise, one may run `cd doc;
make' and miss the warnings like:

  xmlto: not found
  sed: hg.1: No such file or directory

and end up with empty files installed as manpages.
2009-05-07 15:08:25 +03:00
Simon Heimberg
054906a1f5 dirstate: translate forgotten string 2009-05-08 07:54:00 +02:00
Simon Heimberg
f29f0db784 util: overwrite sha1 and _fastsha1 2009-05-08 09:59:15 +02:00
Greg Ward
5485b0d573 test-convert-bzr: tweak sed hack to preserve timezone in 'bzr log' output 2009-05-07 21:35:12 -04:00
Martin Geisler
c1cdde97f7 zeroconf: remove unwarranted execute bit 2009-05-07 19:08:25 +02:00
Martin Geisler
c6d62b90de test-convert-bzr: use sed instead of awk
The run-tests.py script has a list of required tools and awk is not
one of them -- luckily it could be replaced by sed in this case.
2009-05-07 19:02:39 +02:00
Greg Ward
ccfd8df373 convert/bzr: handle Bazaar timestamps correctly (issue1652). 2009-05-06 17:48:03 -04:00
Martin Geisler
ca3bc4a9ab dispatch: remember loaded extensions in a real set 2009-05-07 17:56:57 +02:00
Martin Geisler
50e87afefd gpg: use reverse kwarg to sort sigs in reversed order 2009-05-07 01:33:45 +02:00
Martin Geisler
97b9a7a062 util: simplify pipefilter and avoid subprocess race
The subprocess module is not thread safe. Spawning a thread to read
the output leads to exceptions like this when Mercurial exits:

  Exception exceptions.TypeError: TypeError("'NoneType' object is not
  callable",) in <bound method Popen.__del__ of <subprocess.Popen
  object at 0x9ed0dcc>> ignored

The bug is already reported in the Python bug tracker:

  http://bugs.python.org/issue1731717
2009-05-07 01:33:44 +02:00
Martin Geisler
e3185cd4af Removed unnecessary call to dict.keys. 2009-05-06 23:35:20 +02:00
Giorgos Keramidas
c555bd60d4 gpg: fix traceback in revs{} display code 2009-05-06 20:30:46 +03:00
Matt Mackall
01454e7a1b util: kill unused Popen3 2009-05-04 14:22:33 -05:00
Matt Mackall
ec94003cea config: make remap actually work 2009-05-04 14:21:43 -05:00
Martin Geisler
8fdb40802d util: stop overwriting sha1, overwrite _fastsha1 instead
Some modules (like revlog) would import util.sha1 as _sha1. This
defeats the purpose of having util.sha1 overwrite itself with a faster
version -- revlog would end up always calling the slow version. By
always delegating to util._fastsha1 we avoid this at the cost of an
extra (but unconditional) indirection.
2009-05-04 22:14:52 +02:00
Martin Geisler
6533e94352 util: remove md5
This hash function is broken and should not be used by new code. It is
currently only used by keepalive.
2009-05-04 21:30:39 +02:00
Sune Foldager
b19fc2c469 util: remove warnings when importing md5 and sha 2009-05-04 20:29:05 +02:00
Henrik Stuart
d0b7d204d4 transaction: refactor transaction.abort and rollback to use the same code
This adds a change to the way that abort is processed, as it will not continue
truncating files beyond the first failure, otherwise the respective
functionality is maintained, i.e. abort will not unlink files, but rollback
will.

Co-contributor: Sune Foldager <cryo@cyanite.org>
2009-05-04 15:31:57 +02:00
Henrik Stuart
b0183e01a2 test: change repair strip test to illustrate manifest errors 2009-05-04 13:47:12 +02:00
Benoit Boissinot
fdd0aa0449 verify: reference the correct linkrev when a filelog is missing
when a filelog is missing, the first bad revision is the first revision
where the filelog is referenced, not 0.
2009-05-04 19:51:08 +02:00
Henrik Stuart
fbd8e53ee1 verify: avoid exception on missing file revlog
Previously, accessing the filelinkrevs of a specific file that happens to
have already been unlinked from the filesystem, e.g. due to a partial rollback
having occurred, will trigger a KeyError being raised.

Co-contributor: Sune Foldager <cryo@cyanite.org>
2009-04-24 10:44:39 +02:00
Henrik Stuart
206e98a6fb transaction: reset transaction on abort
Prevent the use of the transaction after it has been aborted.

Co-contributor: Sune Foldager <cryo@cyanite.org>
2009-04-19 20:02:32 +02:00
Henrik Stuart
db9b1644e1 transaction: ensure finished transactions are not reused
All transactional methods on the transaction class have had a decorator
added that ensures the transaction is running.

Co-contributor: Sune Foldager <cryo@cyanite.org>
2009-04-24 09:56:53 +02:00
Simon Heimberg
b21a1df0f0 mq: simpler check of first character of guard name 2009-05-04 03:49:57 +02:00
Martin Geisler
15612f806b commands: fix capitalization in revert help text 2009-05-03 20:34:12 +02:00
Martin Geisler
a100fe0b6c setup: require Python 2.4 2009-05-03 17:36:58 +02:00
Patrick Mezard
8636bd4633 Merge with crew-stable 2009-05-03 13:49:04 +02:00
Alexander Solovyov
0e1b0cfac7 bisect: use subprocess to get command return code 2009-05-03 10:38:08 +03:00