Patchwork [evolve-ext] Fixed case where AttributeError can be thrown when importing wireproto

login
register
mail settings
Submitter andrew@apastron.co
Date July 31, 2018, 12:39 p.m.
Message ID <c4a2d0e5bf18c229fc55.1533040794@gannon.localdomain>
Download mbox | patch
Permalink /patch/32982/
State New
Headers show

Comments

andrew@apastron.co - July 31, 2018, 12:39 p.m.
# HG changeset patch
# User Andrew Fischer <andrew@apastron.co>
# Date 1533040717 18000
#      Tue Jul 31 07:38:37 2018 -0500
# Node ID c4a2d0e5bf18c229fc559323295900e421e246ef
# Parent  2af10d0a59e06c7f84d33eb1eb5eec4a880df162
Fixed case where AttributeError can be thrown when importing wireproto
Boris Feld - Oct. 19, 2018, 4:06 p.m.
I was checking the in-flight patches and saw that we never acknowledge
the reception of those patches.

Thank you, they have been merged in evolve.

Sorry about the delay.

On 31/07/2018 14:39, andrew@apastron.co wrote:
> # HG changeset patch
> # User Andrew Fischer <andrew@apastron.co>
> # Date 1533040717 18000
> #      Tue Jul 31 07:38:37 2018 -0500
> # Node ID c4a2d0e5bf18c229fc559323295900e421e246ef
> # Parent  2af10d0a59e06c7f84d33eb1eb5eec4a880df162
> Fixed case where AttributeError can be thrown when importing wireproto
>
> diff -r 2af10d0a59e0 -r c4a2d0e5bf18 hgext3rd/topic/discovery.py
> --- a/hgext3rd/topic/discovery.py	Tue Jul 31 11:25:57 2018 +0200
> +++ b/hgext3rd/topic/discovery.py	Tue Jul 31 07:38:37 2018 -0500
> @@ -16,7 +16,7 @@
>  try:
>      from mercurial import wireproto
>      wireproto.branchmap
> -except ImportError: # <= hg-4.5
> +except (AttributeError, ImportError): # <= hg-4.5
>      from mercurial import wireprotov1server as wireproto
>  
>  def _headssummary(orig, pushop, *args, **kwargs):
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
andrew@apastron.co - Oct. 19, 2018, 4:08 p.m.
No problem, marmoute informed me directly over IRC when they were added.

Thanks for the follow up!

On Fri, Oct 19, 2018 at 11:06 AM Boris FELD <boris.feld@octobus.net> wrote:

> I was checking the in-flight patches and saw that we never acknowledge
> the reception of those patches.
>
> Thank you, they have been merged in evolve.
>
> Sorry about the delay.
>
> On 31/07/2018 14:39, andrew@apastron.co wrote:
> > # HG changeset patch
> > # User Andrew Fischer <andrew@apastron.co>
> > # Date 1533040717 18000
> > #      Tue Jul 31 07:38:37 2018 -0500
> > # Node ID c4a2d0e5bf18c229fc559323295900e421e246ef
> > # Parent  2af10d0a59e06c7f84d33eb1eb5eec4a880df162
> > Fixed case where AttributeError can be thrown when importing wireproto
> >
> > diff -r 2af10d0a59e0 -r c4a2d0e5bf18 hgext3rd/topic/discovery.py
> > --- a/hgext3rd/topic/discovery.py     Tue Jul 31 11:25:57 2018 +0200
> > +++ b/hgext3rd/topic/discovery.py     Tue Jul 31 07:38:37 2018 -0500
> > @@ -16,7 +16,7 @@
> >  try:
> >      from mercurial import wireproto
> >      wireproto.branchmap
> > -except ImportError: # <= hg-4.5
> > +except (AttributeError, ImportError): # <= hg-4.5
> >      from mercurial import wireprotov1server as wireproto
> >
> >  def _headssummary(orig, pushop, *args, **kwargs):
> > _______________________________________________
> > Mercurial-devel mailing list
> > Mercurial-devel@mercurial-scm.org
> > https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
>

Patch

diff -r 2af10d0a59e0 -r c4a2d0e5bf18 hgext3rd/topic/discovery.py
--- a/hgext3rd/topic/discovery.py	Tue Jul 31 11:25:57 2018 +0200
+++ b/hgext3rd/topic/discovery.py	Tue Jul 31 07:38:37 2018 -0500
@@ -16,7 +16,7 @@ 
 try:
     from mercurial import wireproto
     wireproto.branchmap
-except ImportError: # <= hg-4.5
+except (AttributeError, ImportError): # <= hg-4.5
     from mercurial import wireprotov1server as wireproto
 
 def _headssummary(orig, pushop, *args, **kwargs):