Submitter | timeless |
---|---|
Date | Aug. 25, 2016, 11:18 p.m. |
Message ID | <2b368e1f8ac00774b2a1.1472167100@gcc2-power8.osuosl.org> |
Download | mbox | patch |
Permalink | /patch/16440/ |
State | Accepted |
Headers | show |
Comments
On Thu, 25 Aug 2016 23:18:20 +0000, timeless wrote: > # HG changeset patch > # User timeless <timeless@mozdev.org> > # Date 1472165499 0 > # Thu Aug 25 22:51:39 2016 +0000 > # Node ID 2b368e1f8ac00774b2a1d24c6cf9282e3cd24f1a > # Parent b1809f5d7630a3fff0fa715bbd30dba0f07672a8 > # Available At https://bitbucket.org/timeless/mercurial-crew > # hg pull https://bitbucket.org/timeless/mercurial-crew -r 2b368e1f8ac0 > hghave: make bzr checks stricter > > My bzr does not have bzrlib.revisionspec.RevisionSpec, > and thus tests were failing because convert refused to believe in bzr, > but hghave without this change thought it was available. > > diff -r b1809f5d7630 -r 2b368e1f8ac0 tests/hghave.py > --- a/tests/hghave.py Mon Aug 15 20:39:33 2016 -0700 > +++ b/tests/hghave.py Thu Aug 25 22:51:39 2016 +0000 > @@ -110,6 +110,10 @@ > def has_bzr(): > try: > import bzrlib > + import bzrlib.bzrdir > + import bzrlib.errors > + import bzrlib.revision > + import bzrlib.revisionspec.RevisionSpec RevisionSpec isn't a module. It should be from bzrlib.revisionspec import RevisionSpec and catch AttributeError.
Patch
diff -r b1809f5d7630 -r 2b368e1f8ac0 tests/hghave.py --- a/tests/hghave.py Mon Aug 15 20:39:33 2016 -0700 +++ b/tests/hghave.py Thu Aug 25 22:51:39 2016 +0000 @@ -110,6 +110,10 @@ def has_bzr(): try: import bzrlib + import bzrlib.bzrdir + import bzrlib.errors + import bzrlib.revision + import bzrlib.revisionspec.RevisionSpec return bzrlib.__doc__ is not None except ImportError: return False