)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"86bd3685c26698dc6d85d46fe2f504e3c6a771c6","unresolved":false,"context_lines":[{"line_number":15,"context_line":"would result in the files being installed as follows:"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"share/ansible/roles/kolla-share/test"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"This patch changes the behavior so that only the first occurance is"},{"line_number":20,"context_line":"replaced."},{"line_number":21,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"dfd5e7cf_9ee9a11b","line":18,"updated":"2019-01-09 14:44:53.000000000","message":"Not proud to say it took me at least 5 minutes to figure out what was wrong here. Could you add something like below:\n\n  whereas we expected:\n\n  share/ansible/roles/kolla-ansible/test","commit_id":"c39d26dc28732d3f9c6a8682630d11bce3979474"}],"pbr/hooks/files.py":[{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"af429dd83d9c8bec556fe46924da4685d615155f","unresolved":false,"context_lines":[{"line_number":60,"context_line":"                    target +\u003d os.path.sep"},{"line_number":61,"context_line":"                for (dirpath, dirnames, fnames) in os.walk(source_prefix):"},{"line_number":62,"context_line":"                    new_prefix \u003d re.sub(r\"^{}\".format(source_prefix),"},{"line_number":63,"context_line":"                                        target, dirpath)"},{"line_number":64,"context_line":"                    finished.append(\"%s \u003d \" % new_prefix)"},{"line_number":65,"context_line":"                    finished.extend("},{"line_number":66,"context_line":"                        [\" %s\" % os.path.join(dirpath, f) for f in fnames])"}],"source_content_type":"text/x-python","patch_set":4,"id":"dfd5e7cf_4f7069a6","line":63,"updated":"2019-01-09 10:47:33.000000000","message":"Don\u0027t you need to pass in count\u003d1 here to ensure at most one substitution is performed?\n\nAlternatively, just use .replace(source_prefix, target, 1)?\n\nI think a test case for this would be a mid-level directory that contains the prefix, e.g. ansible/kolla-ansible/roles?","commit_id":"0f8aa9d0c8bf39c27bec9c7bed732237b27f7935"},{"author":{"_account_id":28048,"name":"Will Szumski","email":"will@stackhpc.com","username":"jovial"},"change_message_id":"a85edcd161d7c85241a8648d6161a5a13700aed9","unresolved":false,"context_lines":[{"line_number":60,"context_line":"                    target +\u003d os.path.sep"},{"line_number":61,"context_line":"                for (dirpath, dirnames, fnames) in os.walk(source_prefix):"},{"line_number":62,"context_line":"                    new_prefix \u003d re.sub(r\"^{}\".format(source_prefix),"},{"line_number":63,"context_line":"                                        target, dirpath)"},{"line_number":64,"context_line":"                    finished.append(\"%s \u003d \" % new_prefix)"},{"line_number":65,"context_line":"                    finished.extend("},{"line_number":66,"context_line":"                        [\" %s\" % os.path.join(dirpath, f) for f in fnames])"}],"source_content_type":"text/x-python","patch_set":4,"id":"dfd5e7cf_8fbe5163","line":63,"in_reply_to":"dfd5e7cf_4f7069a6","updated":"2019-01-09 11:33:39.000000000","message":"I tested the test case on the master and it does fail with the expected mode of failure:\n    pbr.tests.test_files.FilesConfigTest.test_data_files_globbing_source_prefix_in_directory_name\n    ---------------------------------------------------------------------------------------------\n\n    Captured traceback:\n    ~~~~~~~~~~~~~~~~~~~\n        Traceback (most recent call last):\n          File \"pbr/tests/test_files.py\", line 98, in test_data_files_globbing_source_prefix_in_directory_name\n            config[\u0027files\u0027][\u0027data_files\u0027])\n          File \"/home/will/code/pbr/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py\", line 417, in assertIn\n            self.assertThat(haystack, Contains(needle), message)\n          File \"/home/will/code/pbr/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py\", line 498, in assertThat\n            raise mismatch_error\n        testtools.matchers._impl.MismatchError: \u0027\\nshare/ansible/ \u003d \\nshare/ansible/kolla-ansible \u003d \\nshare/ansible/kolla-ansible/test \u003d \\n ansible/kolla-ansible/test/baz\u0027 not in \u0027\\nshare/ansible/ \u003d \\nshare/ansible/kolla-ansible \u003d \\nshare/ansible/kolla-share/ansible/test \u003d \\n ansible/kolla-ansible/test/baz\u0027\n\nis this sufficient?","commit_id":"0f8aa9d0c8bf39c27bec9c7bed732237b27f7935"}],"pbr/tests/test_files.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"86bd3685c26698dc6d85d46fe2f504e3c6a771c6","unresolved":false,"context_lines":[{"line_number":92,"context_line":"        )"},{"line_number":93,"context_line":"        files.FilesConfig(config, \u0027fake_package\u0027).run()"},{"line_number":94,"context_line":"        self.assertIn("},{"line_number":95,"context_line":"            \u0027\\nshare/ansible/ \u003d \\nshare/ansible/kolla-ansible \u003d \u0027"},{"line_number":96,"context_line":"            \u0027\\nshare/ansible/kolla-ansible/test \u003d \\n \u0027"},{"line_number":97,"context_line":"            \u0027ansible/kolla-ansible/test/baz\u0027,"},{"line_number":98,"context_line":"            config[\u0027files\u0027][\u0027data_files\u0027])"}],"source_content_type":"text/x-python","patch_set":5,"id":"dfd5e7cf_de4ac953","line":97,"range":{"start_line":95,"start_character":0,"end_line":97,"end_character":45},"updated":"2019-01-09 14:44:53.000000000","message":"This would be much easier to comprehend if written like so:\n\n  \u0027\\nshare/ansible/ \u003d \u0027\n  \u0027\\nshare/ansible/kolla-ansible \u003d \u0027\n  \u0027\\nshare/ansible/kolla-ansible/test \u003d \u0027\n  \u0027\\n ansible/kolla-ansible/test/baz\u0027,\n\ni.e. every line was actually a new line.","commit_id":"c39d26dc28732d3f9c6a8682630d11bce3979474"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"c08cd16b1434b6d4bb318e0686447a429a4d7b00","unresolved":false,"context_lines":[{"line_number":83,"context_line":"            config[\u0027files\u0027][\u0027data_files\u0027])"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    def test_data_files_globbing_source_prefix_in_directory_name(self):"},{"line_number":86,"context_line":"        # We want to test that the string, \"docs\", is not replaced in a"},{"line_number":87,"context_line":"        # subdirectory name, \"sub-docs\""},{"line_number":88,"context_line":"        config \u003d dict("},{"line_number":89,"context_line":"            files\u003ddict("}],"source_content_type":"text/x-python","patch_set":6,"id":"9fdfeff1_71bf62fb","line":86,"range":{"start_line":86,"start_character":44,"end_line":86,"end_character":48},"updated":"2019-01-22 17:46:54.000000000","message":"Nit: *ansible?","commit_id":"a9b31113b76bde3debc696c1ce71aa7dd594faa3"}],"releasenotes/notes/fix-global-replace-of-src-prefix-in-glob-eb850b94ca96993e.yaml":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"86bd3685c26698dc6d85d46fe2f504e3c6a771c6","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"fixes:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Fixes a bug where the directory names of items specified in data_files could"},{"line_number":5,"context_line":"    be renamed if the source prefix glob was contained within the directory name."},{"line_number":6,"context_line":"    See `bug 1810804 \u003chttps://bugs.launchpad.net/pbr/+bug/1810804\u003e`_ for details."}],"source_content_type":"text/x-yaml","patch_set":5,"id":"dfd5e7cf_deb8892b","line":4,"range":{"start_line":4,"start_character":64,"end_line":4,"end_character":74},"updated":"2019-01-09 14:44:53.000000000","message":"nit: ``data_files``. Also, might not be any harm link to the docs on this [1]\n\n[1] https://docs.python.org/2/distutils/setupscript.html#installing-additional-files","commit_id":"c39d26dc28732d3f9c6a8682630d11bce3979474"}]}
