Patchwork [9,of,9] test-hgweb-auth: stop direct symbol import of mercurial.error.Abort

login
register
mail settings
Submitter Yuya Nishihara
Date April 5, 2016, 4:05 p.m.
Message ID <6cbc5c9566050741df23.1459872317@mimosa>
Download mbox | patch
Permalink /patch/14380/
State Accepted
Headers show

Comments

Yuya Nishihara - April 5, 2016, 4:05 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1459866077 -32400
#      Tue Apr 05 23:21:17 2016 +0900
# Node ID 6cbc5c9566050741df235ae315ab3203e1ffc075
# Parent  b87ed3d1190c41de7792bb6219c1dfd8d5177c8c
test-hgweb-auth: stop direct symbol import of mercurial.error.Abort
Augie Fackler - April 6, 2016, 5:25 p.m.
On Wed, Apr 06, 2016 at 01:05:17AM +0900, Yuya Nishihara wrote:
> # HG changeset patch
> # User Yuya Nishihara <yuya@tcha.org>
> # Date 1459866077 -32400
> #      Tue Apr 05 23:21:17 2016 +0900
> # Node ID 6cbc5c9566050741df235ae315ab3203e1ffc075
> # Parent  b87ed3d1190c41de7792bb6219c1dfd8d5177c8c
> test-hgweb-auth: stop direct symbol import of mercurial.error.Abort

These are queued, thanks.

>
> diff --git a/tests/test-hgweb-auth.py b/tests/test-hgweb-auth.py
> --- a/tests/test-hgweb-auth.py
> +++ b/tests/test-hgweb-auth.py
> @@ -10,13 +10,11 @@ except AttributeError:
>
>  from mercurial import demandimport; demandimport.enable()
>  from mercurial import (
> +    error,
>      ui as uimod,
>      url,
>      util,
>  )
> -from mercurial.error import (
> -    Abort,
> -)
>
>  class myui(uimod.ui):
>      def interactive(self):
> @@ -55,7 +53,7 @@ def test(auth, urls=None):
>              if authinfo is not None:
>                  pm.add_password(*authinfo)
>              print('    ', pm.find_user_password('test', u))
> -        except Abort:
> +        except error.Abort:
>              print('    ','abort')
>
>      if not urls:
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Patch

diff --git a/tests/test-hgweb-auth.py b/tests/test-hgweb-auth.py
--- a/tests/test-hgweb-auth.py
+++ b/tests/test-hgweb-auth.py
@@ -10,13 +10,11 @@  except AttributeError:
 
 from mercurial import demandimport; demandimport.enable()
 from mercurial import (
+    error,
     ui as uimod,
     url,
     util,
 )
-from mercurial.error import (
-    Abort,
-)
 
 class myui(uimod.ui):
     def interactive(self):
@@ -55,7 +53,7 @@  def test(auth, urls=None):
             if authinfo is not None:
                 pm.add_password(*authinfo)
             print('    ', pm.find_user_password('test', u))
-        except Abort:
+        except error.Abort:
             print('    ','abort')
 
     if not urls: