| Index: gm/rebaseline_server/imagepairset.py
|
| diff --git a/gm/rebaseline_server/imagepairset.py b/gm/rebaseline_server/imagepairset.py
|
| index ef9acbc4bcc1c10fbe46fe9a926c2d8e35c6cf1e..998c280684fc380c78f35c0fc0c9600e1355ef20 100644
|
| --- a/gm/rebaseline_server/imagepairset.py
|
| +++ b/gm/rebaseline_server/imagepairset.py
|
| @@ -12,9 +12,13 @@ ImagePairSet class; see its docstring below.
|
| # System-level imports
|
| import posixpath
|
|
|
| -# Local imports
|
| +# Must fix up PYTHONPATH before importing from within Skia
|
| +import fix_pythonpath # pylint: disable=W0611
|
| +
|
| +# Imports from within Skia
|
| import column
|
| import imagediffdb
|
| +from py.utils import gs_utils
|
|
|
| # Keys used within dictionary representation of ImagePairSet.
|
| # NOTE: Keep these in sync with static/constants.js
|
| @@ -162,6 +166,13 @@ class ImagePairSet(object):
|
|
|
| key_description = KEY__IMAGESETS__FIELD__DESCRIPTION
|
| key_base_url = KEY__IMAGESETS__FIELD__BASE_URL
|
| + # EPOGER: instead of this special handling for GS URLs vs HTTP URLs, maybe come up with an object than can represent either one? (or even a local file)
|
| + if gs_utils.GSUtils.is_gs_url(self._image_base_url):
|
| + value_base_url = imagediffdb.GSObject(
|
| + gs_url=self._image_base_url).as_http_url()
|
| + else:
|
| + value_base_url = self._image_base_url
|
| +
|
| return {
|
| KEY__ROOT__EXTRACOLUMNHEADERS: self._column_headers_as_dict(),
|
| KEY__ROOT__EXTRACOLUMNORDER: column_ids_in_order,
|
| @@ -169,11 +180,11 @@ class ImagePairSet(object):
|
| KEY__ROOT__IMAGESETS: {
|
| KEY__IMAGESETS__SET__IMAGE_A: {
|
| key_description: self._descriptions[0],
|
| - key_base_url: self._image_base_url,
|
| + key_base_url: value_base_url,
|
| },
|
| KEY__IMAGESETS__SET__IMAGE_B: {
|
| key_description: self._descriptions[1],
|
| - key_base_url: self._image_base_url,
|
| + key_base_url: value_base_url,
|
| },
|
| KEY__IMAGESETS__SET__DIFFS: {
|
| key_description: 'color difference per channel',
|
|
|