changeset 32825:16ff5c6066a6

patchbomb: look for non-empty publicurl, not a non-None one Otherwise it's impossible to turn this feature back off, which is making writing of tests awkward.
author Augie Fackler <augie@google.com>
date Tue, 13 Jun 2017 16:30:50 -0400
parents d3b2d4587e73
children 3abba5bc3454
files hgext/patchbomb.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/patchbomb.py	Tue Jun 13 16:30:11 2017 -0400
+++ b/hgext/patchbomb.py	Tue Jun 13 16:30:50 2017 -0400
@@ -113,7 +113,7 @@
     # waiting for some logic that check that the changeset are available on the
     # destination before patchbombing anything.
     publicurl = repo.ui.config('patchbomb', 'publicurl')
-    if publicurl is not None:
+    if publicurl:
         return ('Available At %s\n'
                 '#              hg pull %s -r %s' % (publicurl, publicurl, ctx))
     return None
@@ -588,7 +588,7 @@
 
     # check if revision exist on the public destination
     publicurl = repo.ui.config('patchbomb', 'publicurl')
-    if publicurl is not None:
+    if publicurl:
         repo.ui.debug('checking that revision exist in the public repo')
         try:
             publicpeer = hg.peer(repo, {}, publicurl)