Commit Graph

48 Commits

Author SHA1 Message Date
Augie Fackler
f95a6caba1 extensions: document that testedwith = 'internal' is special
Extension authors (notably at companies using hg) have been
cargo-culting the `testedwith = 'internal'` bit from hg's own
extensions, which then defeats our "file bugs over here" logic in
dispatch. Let's be more aggressive about trying to give extension
authors a hint about what testedwith should say.
2015-04-28 16:44:37 -04:00
Shun-ichi GOTO
00c29a9036 win32mbcs: wrap util.split()
util.split() should be wrapped because it is an alias of unsafe
os.path.split().
2013-07-04 23:05:59 +09:00
Shun-ichi GOTO
cc7e94372c win32mbcs: add reversing wrapper for some unicode-incompatible functions.
This changeset fix the problem to use win32mbcs with mercurial 2.3 or
later.

The problem is brought by side effect of modification of
encoding.upper() (changeset 17236:8b2442729eb3) because upper() does
not accept unicode string argument. So wrapped util.normcase() which
uses upper() will fail. In other words, upper() and lower() are
unicode incompatible.

To fix this issue, this changeset adds new wrapper for reversed
conversion (unicode to str) for lower() and upper() to use them
safely.
2012-10-17 18:09:00 +09:00
Mads Kiilerich
5e3dc3e383 avoid using abbreviations that look like spelling errors 2012-08-27 23:14:27 +02:00
Augie Fackler
96d44b39f7 hgext: mark all first-party extensions as such 2012-05-15 14:37:49 -05:00
FUJIWARA Katsunori
a8d00559c9 win32mbcs: allow win32mbcs extension to be enabled on cygwin platform
this patch allows win32mbcs extension to be enabled on cygwin platform
for problematic character encodings.

on recent cygwin platform, even though
"os.path.supports_unicode_filenames" is False, "os.listdir()" and
other path manipulation functions can return the result correctly
decoded in unicode for invocations with unicode arguments, if locale
is configured properly.

existing code to check "os.path.supports_unicode_filenames" is kept to
prevent win32mbcs from being enabled on unexpected platform.
2011-12-25 20:32:48 +09:00
FUJIWARA Katsunori
fe972435d4 i18n: use encoding.lower/upper for encoding aware case folding
this patch uses encoding.lower/upper for case folding, because ones of
str can not fold case of non ascii characters correctly.

to avoid cyclic dependency and to encapsulate logic of normcase in
each platforms, this patch introduces encodinglower/encodingupper in
both posix/windows specific files.

this patch does not change implementation of normcase() in posix.py,
because we do not know the encoding of filenames on POSIX.

some "normcase()" are excluded from function wrap list in
hgext/win32mbcs.py, because they become encoding aware by this patch.
2011-12-16 21:09:41 +09:00
FUJIWARA Katsunori
cfdf6a59f4 windows: use upper() instead of lower() or os.path.normcase()
this patch uses upper() instead of lower() or os.path.normcase() for
case folding on Windows(NTFS), because lower-ing causes problems for
some languages on it.

see below for detail about problem of lower-ing:

    https://blogs.msdn.com/b/michkap/archive/2005/01/16/353873.aspx
2011-12-16 21:09:40 +09:00
Shun-ichi GOTO
add6b2013e win32mbcs: wrap two more functions to be wrapped.
util.checkwinfilename() and util.checkosfilename() are wrapped.
The former, used by scmutil, is not friendly for Shift_JIS bytes.
The latter is an dynamic alias of checkwinfilename() used by other
modules.
2011-07-06 18:28:42 +09:00
Javi Merino
71b8e54360 win32mbcs: Fix typo in documentation
extention -> extension
2011-02-01 07:29:11 +00:00
Shun-ichi GOTO
c55a471867 win32mbcs: use extsetup() to wrap functions only once.
Using reposetup() may cause multiple-wrap issue in some situation
like "hg serve".
2010-11-19 18:07:15 +09:00
Matt Mackall
cd3ef170f7 Merge with stable 2010-01-19 22:45:09 -06:00
Matt Mackall
595d66f424 Update license to GPLv2+ 2010-01-19 22:20:08 -06:00
Martin Geisler
9f1896c083 do not attempt to translate ui.debug output 2009-09-19 01:15:38 +02:00
Shun-ichi GOTO
a63337a60d win32mbcs: util.normpath should be wrapped.
It is because util.normpath() finally calls windows.pconvert()
which is not wrapped (by changeset:7f85efa178c8).
2009-09-18 21:25:47 +09:00
Patrick Mezard
01b7d3fa6f Merge with crew-stable 2009-09-13 17:53:09 +02:00
Shun-ichi GOTO
0020809b4d win32mbcs: wrap util.pconvert, not windows.pconvert (issue1828) 2009-09-09 18:38:39 +09:00
Nicolas Dumazet
fb2cbab1fb use 'x in dict' instead of 'dict.has_key(x)'
"in" is faster, and has_key will be removed in py3k
2009-08-24 21:00:34 +02:00
Shun-ichi GOTO
e6da45a0f4 win32mbcs: add special wrapper for osutil.listdir().
osutil.listdir() may misinterpret 0x5c of MBCS 2nd. byte as path
separator.  New wrapper prevents this by adding it beforehand.
2009-07-10 19:34:08 +09:00
Shun-ichi GOTO
928f0827e6 win32mbcs: wrapper supports keyword arguments and dict result.
The keyword arguments are also decoded before calling original.
And dict of return value is also encoded back.
2009-07-10 15:52:01 +09:00
Shun-ichi GOTO
8edf72da29 win32mbcs: also wrap windows.pconvert() 2009-07-09 22:06:30 +09:00
Brodie Rao
fef8ccb4a7 win32mbcs: look up modules using sys.modules (issue1729)
globals()[module] doesn't work for modules inside of packages, such as
os.path.
2009-07-08 09:48:48 -04:00
Martin Geisler
8356aab2ee win32mbcs: wrap docstrings at 70 characters 2009-07-26 02:03:00 +02:00
Martin Geisler
f2a0ea2454 win32mbcs: fix formatting of lists with proper reST markup 2009-07-23 00:25:54 +02:00
Matt Mackall
9f21c99975 Merge with stable 2009-07-16 15:40:13 -05:00
Matt Mackall
eb6cba34d7 Merge with stable 2009-07-09 19:49:02 -05:00
Martin Geisler
ac3616c343 win32mbcs: wrapped docstrings at 78 characters 2009-07-07 23:54:42 +02:00
Dirkjan Ochtman
1c6c4a9bc7 extensions: fix up description lines some more 2009-06-24 12:25:56 +02:00
Cédric Duval
dbcec5595d extensions: improve the consistency of synopses
Trying as much as possible to consistently:
 - use a present tense predicate followed by a direct object
 - verb referring directly to the functionality provided
   (ie. not "add command that does this" but simple "do that")
 - keep simple and to the point, leaving details for the long help
   (width is tight, possibly even more so for translations)

Thanks to timeless, Martin Geisler, Rafael Villar Burke, Dan Villiom
Podlaski Christiansen and others for the helpful suggestions.
2009-06-22 15:48:08 +02:00
Cédric Duval
0caffe860f help: remove per-extension paragraph on how to enable it
The central place to find this information is the "extensions" help topic.
2009-06-20 20:57:13 +02:00
timeless
3ccbc308d0 Spell Mercurial as a proper noun 2009-06-09 09:25:31 -04:00
Shun-ichi GOTO
f8a815df63 Add cp950 as problematic encoding which is used in chinese windows. 2009-06-04 21:23:31 +09:00
Martin Geisler
c624e91552 fixed typos found in translatable strings
This is from a spell-check of hg.pot.
2009-05-31 14:55:51 +02:00
Martin Geisler
bda88a146a graphlog, win32mbcs: capitalize ASCII 2009-05-31 14:53:46 +02:00
Martin Geisler
d00dd17408 win32mbcs: capitalize Unicode 2009-05-31 14:51:37 +02:00
Martin Geisler
87171a08a5 win32mbcs: fix typos and reST syntax 2009-12-14 00:26:28 +01:00
Shun-ichi GOTO
662311913b win32mbcs: Add configuration to specify path encoding
Add win32mbcs.encoding configuration option to specify the encoding to
use instead of encoding.encoding.

This option is useful for the users who want to write UTF-8 log
message on non UTF-8 path encoding environment.
2009-12-07 19:18:03 +09:00
Matt Mackall
1bd6760d60 win32mbcs: remove silly eval 2009-05-17 17:13:56 -05:00
Martin Geisler
7d509c2459 add blank line after copyright notices and after header 2009-04-26 01:25:53 +02:00
Martin Geisler
750183bdad updated license to be explicit about GPL version 2 2009-04-26 01:08:54 +02:00
Martin Geisler
8606f65b7b win32mbcs: word-wrap help texts at 70 characters 2009-04-04 23:19:42 +02:00
Martin Geisler
04b0d911a3 Change double spaces to single spaces in help texts. 2009-04-04 21:09:43 +02:00
Matt Mackall
642f4d7151 move encoding bits from util to encoding
In addition to cleaning up util, this gets rid of some circular dependencies.
2009-04-03 14:51:48 -05:00
Peter Arrenbrecht
8c3658a497 cleanup: whitespace cleanup 2009-03-23 13:13:27 +01:00
Martin Geisler
23608038bf lowercase help output
Changes docstrings to begin with a lowercase word. Only docstrings
used in help output is changed.

Scripts are not expected to grep the output of 'hg help' so this
change should pose no problem with regard to the compatibility rules.
2009-01-03 17:15:15 +01:00
Shun-ichi Goto
92fe458e5a Update win32mbcs extension
* Code cleanup by Matt.
  * Fix the issue with case-insensitive fs support
    by wrapping also util.fspath() and util.checkcase()
  * Abort program when path conversion is failed.
2008-08-13 20:18:40 -05:00
Thomas Arendsen Hein
deb94bc7fe Removed trailing spaces from everything except test output 2008-03-07 00:24:36 +01:00
Shun-ichi GOTO
d8777b5d83 New extension to support problematic MBCS on Windows.
The aim of this extension is to clear the problem related to having
0x5c in 2nd byte of encoded bytes.  So this extension is usefull for:
 * Japanese Windows user shift_jis encoding.
 * Chinese Windows user using big5 encoding.

To use this extension, simply enable it without any customization.

Note that some important python built-in functions and mercurial
functions are altered for this extension to convert argument if need
to handle MBCS.
2008-01-09 22:41:30 +09:00