[PATCH 5 of 5 stable] crecord: stop raising error.Abort if curses is not found (issue5008)

Laurent Charignon lcharignon at fb.com
Tue Dec 15 23:21:39 CST 2015


These 5 patches look good to me, thanks for doing that!

Laurent

On 12/15/15, 4:06 PM, "Mercurial-devel on behalf of Sean Farley"
<mercurial-devel-bounces at selenic.com on behalf of sean at farley.io> wrote:

># HG changeset patch
># User Sean Farley <sean at farley.io>
># Date 1450224243 28800
>#      Tue Dec 15 16:04:03 2015 -0800
># Branch stable
># Node ID 8fea1f66e5279a305b39fded19ffbf4056a3bf9e
># Parent  23202dc041db998d6e2529b80dd4e7e4d4b4b040
>crecord: stop raising error.Abort if curses is not found (issue5008)
>
>On some servers, python curses support is disabled. This patch not only
>fixes
>that but provides a fallback on other machines (e.g. Windows) when curses
>is
>not found.
>
>diff --git a/mercurial/crecord.py b/mercurial/crecord.py
>--- a/mercurial/crecord.py
>+++ b/mercurial/crecord.py
>@@ -46,13 +46,10 @@ except ImportError:
> # On windows, curses can throw a NameError, so check for that here
> try:
>     curses
> except NameError:
>     curses = False
>-    if os.name != 'nt':  # Temporary hack to get running on Windows again
>-        raise error.Abort(
>-            _('the python curses/wcurses module is not
>available/installed'))
> 
> def checkcurses(ui):
>     """Return True if the user wants to use curses
> 
>     This method returns True if curses is found (and that python is
>built with
>_______________________________________________
>Mercurial-devel mailing list
>Mercurial-devel at selenic.com
>https://selenic.com/mailman/listinfo/mercurial-devel



More information about the Mercurial-devel mailing list