convert: set LC_CTYPE around calls to Subversion bindings
The Subversion bindings require that LC_CTYPE is set. However, we don’t want to
set it all the time, as it changes the behavior of str methods on Python 2. The
taken approach is hopefully fine-grained enough to not trigger any
locale-specfic behavior of the str methods and coarse-grained enough to not
clutter the code.
Emulating the with-statement behavior in before() and after() should be safe, as
after() is always called when before() is called. hgext.convert.hg takes a
similar approach.
curses: do not initialize LC_ALL to user settings (
issue6358)
701341f57ceb moved the setlocale() call to right before curses was used. This
didn’t fully solve the problem it was supposed to solve (locale-dependent
functions, like date formatting/parsing and str methods on Python 2), but only
postponed it.
Initializing LC_CTYPE seems to be sufficient for curses to work correctly.
Therefore LC_CTYPE is set while curses is used and reset afterwards. Some
locale-dependent str methods might behave differently on Python 2 while curses
is used, but that shouldn’d be a problem.
graft: leverage cmdutil.check_incompatible_arguments() for --no-commit
Differential Revision: https://phab.mercurial-scm.org/D8668
graft: leverage cmdutil.check_at_most_one_arg() for --abort/--stop/--continue
Differential Revision: https://phab.mercurial-scm.org/D8667
version: sort extensions by name in verbose mode
External extensions can be assigned any name, but presumably most enabled
extensions will be internal ones and having them sorted makes it easier to find
specific ones if the list is long. The lists in `hg help extensions` are
already sorted.
Differential Revision: https://phab.mercurial-scm.org/D8671
crecord: stop trying to import wcurses
The original import of crecord in 2008 already said "I have no idea if wcurses
works with crecord...".
The last reference to a Python package called wcurses is
https://web.archive.org/web/
20101025073658/http://adamv.com/dev/python/curses/.
However, the Python package from there is called "curses" and not "wcurses".
I didn’t find any evidence that it ever worked.