Commit Graph

4721 Commits

Author SHA1 Message Date
Simon Heimberg
09ac1e6c92 separate import lines from mercurial and general python modules 2009-04-28 17:40:46 +02: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
Martin Geisler
ca3bc4a9ab dispatch: remember loaded extensions in a real set 2009-05-07 17:56:57 +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
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
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
Martin Geisler
15612f806b commands: fix capitalization in revert help text 2009-05-03 20:34:12 +02:00
Alexander Solovyov
0e1b0cfac7 bisect: use subprocess to get command return code 2009-05-03 10:38:08 +03:00
Martin Geisler
6f75deac3f localrepo: mark commit message template for translation 2009-05-03 00:20:08 +02:00
Martin Geisler
21ba2e96f6 util: initialize md5 and sha1 without using extra global variables
This lets the functions skip the "if _sha1 is None" test on each call.
2009-05-03 00:03:35 +02:00
Martin Geisler
11190d5aaa util: always use subprocess 2009-05-02 23:05:35 +02:00
Martin Geisler
60e8837e82 commands: describe --debug in showconfig help 2009-05-02 21:29:00 +02:00
Martin Geisler
98fbeb0b9f write options in "-r/--rev" style in help texts 2009-05-02 19:13:29 +02:00
Steve Borho
83629eeaea simplemerge: use ui.warn() for warnings 2009-04-30 23:57:36 -05:00
Matt Mackall
83d555f0f7 config: add parse interface 2009-04-30 19:22:06 -05:00
Matt Mackall
f3552e4141 config: allow spaces in key portion of items 2009-04-29 20:47:30 -05:00
Matt Mackall
f4f1e74f08 localrepo: use set for requirements 2009-04-29 20:47:28 -05:00
Matt Mackall
2beed3c7cc dirstate: use propertycache 2009-04-29 20:47:18 -05:00
Matt Mackall
a2f3734c4c localrepo: use propertycache 2009-04-29 20:47:15 -05:00
Steve Borho
52bf113f2e ui: replace regexp pattern with sequence of choices
Use ampersands (&) to delineate the response char in each choice.
ui.prompt() responses are now explicitly case insensitive.  GUIs
that subclass ui can generate dialogs from the full choice names.
2009-04-30 10:15:32 -05:00
Patrick Mezard
695b5f0d5f Fix missing import from 4bea569e9933 merge 2009-04-30 08:38:20 +02:00
Patrick Mezard
0cdb05f6a7 Merge with crew-stable 2009-04-29 23:56:20 +02:00
Sune Foldager
2f3ee06863 util.rename: use temporary file name for rename-targets on windows
Use a temporary file name as target for a forced rename on Windows. The
target file name is not opened at any time; just renamed into and then
unlinked. Using a temporary instead of a static name is necessary since
otherwise a hg crash can leave the file lying around, blocking future
attempts at renaming.
2009-04-29 09:30:28 +02:00
Martijn Pieters
6644fca213 localrepo: Refactor var names in filecommit to improve readability. 2009-04-28 18:14:49 +02:00
Martin Geisler
29ac8050fe localrepo: corrected outdated comment 2009-04-28 18:32:15 +02:00
Martin Geisler
3ea1f07ffc localrepo: fixed typos in comments 2009-04-28 18:29:50 +02:00
Martin Geisler
bbf34c8655 help: document nonempty template filter. 2009-04-28 17:30:00 +02:00
Martin Geisler
eee44d410e webcommands: move nonempty logic from JavaScript to Python
This avoids hard-coding the '(none)' string in the JavaScript for each
style and avoids the {nonexisting|nonempty} hack which only works
since the template system don't complain about undefined variables.
2009-04-28 17:28:00 +02:00
Rocco Rutte
9aa9232b09 templatefilters: add "nonempty" template filter
It ensures that at least "(none)" is returned in case the argument
passed is None or ''. This is primarily useful to render empty
changelog messages for hgweb but may be useful for others, too.
2009-04-20 11:34:15 +02:00
Patrick Mezard
af0fa1531e keepalive: fix a82d2fe41c70, reintroduce unredirected_hdrs
The previous fix dropped unredirected_hdrs which contain authentication
headers. Removing them break POST request requiring authentication (like
unbundle calls to bitbucket.org).
2009-04-27 22:15:36 +02:00
Martin Geisler
59adad78ff pure/osutil: add copyright and license header 2009-04-26 01:57:12 +02:00
Martin Geisler
cd12c66fa6 match: add copyright and license header 2009-04-26 01:57:00 +02:00
Martin Geisler
f1f94caf9a fancyopts: add copyright and license header 2009-04-26 01:56:52 +02:00
Martin Geisler
539f6e1aac config: add copyright and license header 2009-04-26 01:56:41 +02:00
Martin Geisler
7d509c2459 add blank line after copyright notices and after header 2009-04-26 01:25:53 +02:00
Martin Geisler
2c8901a1b9 turn some comments back into module docstrings 2009-04-26 01:24:49 +02:00
Martin Geisler
8e4bc1e9ad put license and copyright info into comment blocks 2009-04-26 01:13:08 +02:00
Martin Geisler
750183bdad updated license to be explicit about GPL version 2 2009-04-26 01:08:54 +02:00
Dirkjan Ochtman
ed04819e2f hgweb: pre-init mimetypes module (fixes ugly bug in python-2.6.2 mimetypes)
The ugly initialization hack in mimetypes' initialization procedure can make
hg serve hit the maximum recursion depth when in threaded mode.
2009-04-27 16:29:26 +02:00
Dirkjan Ochtman
6bfc24b2af templater: fix little problem from stylemap() changes 2009-04-27 16:26:31 +02:00
Dirkjan Ochtman
80de6974e4 more whitespace cleanup and some other style nits 2009-04-27 12:37:19 +02:00