Bug 1236857 - Fix valid_revision function + release pushlog_client 0.3.2. r=armenzg
authorMikeLing <sabergeass@gmail.com>
Wed, 06 Jan 2016 08:50:21 -0500
changeset 362073 01efb008d1f2d3c76c61d654de808348bb6be38f
parent 362072 30dab86c2248f9e9438e0248bb76bc67280b1d39
child 362074 be629f390dcecf7f7f9851564bffdbc4ec3e4a2e
push id16998
push userrwood@mozilla.com
push dateMon, 02 May 2016 19:42:03 +0000
reviewersarmenzg
bugs1236857
Bug 1236857 - Fix valid_revision function + release pushlog_client 0.3.2. r=armenzg
pylib/mozhginfo/mozhginfo/pushlog_client.py
pylib/mozhginfo/setup.py
--- a/pylib/mozhginfo/mozhginfo/pushlog_client.py
+++ b/pylib/mozhginfo/mozhginfo/pushlog_client.py
@@ -150,17 +150,20 @@ def query_repo_tip(repo_url):
 def valid_revision(repo_url, revision):
     """Verify that a revision exists in the given repository URL."""
 
     global VALID_CACHE
     if (repo_url, revision) in VALID_CACHE:
         return VALID_CACHE[(repo_url, revision)]
 
     LOG.debug("Determine if the revision is valid.")
-    url = "%s?changeset=%s&tipsonly=1" % (repo_url, revision)
+    url = "%s?changeset=%s&tipsonly=1" % (
+        JSON_PUSHES % {"repo_url": repo_url},
+        revision
+    )
     data = requests.get(url).json()
     ret = True
 
     # A valid revision will return a dictionary with information about exactly one revision
     if len(data) != 1:
         LOG.warning("Revision %s not found on branch %s" % (revision, repo_url))
         ret = False
 
--- a/pylib/mozhginfo/setup.py
+++ b/pylib/mozhginfo/setup.py
@@ -1,13 +1,13 @@
 from setuptools import setup, find_packages
 
 setup(
     name='pushlog_client',
-    version='0.3.1',
+    version='0.3.2',
     packages=find_packages(),
 
     install_requires=[
         'requests>=2.8.1'
     ],
 
     # Meta-data for upload to PyPI
     author='Armen Zambrano G.',