)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11047,"name":"Mark Sturdevant","email":"mark.sturdevant@ibm.com","username":"markstur"},"change_message_id":"eacc1c03f05a7eb5fbd265d866cd743a6d1fd04f","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     zhongjun \u003cjun.zhongjun@huawei.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-06-24 08:08:30 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Delete redundant period and modify the description"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"--Delete redundant period in the command echo."},{"line_number":10,"context_line":"--In order to keep consistent with the command prompt,"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"fa32b979_43dce672","line":7,"updated":"2015-06-23 17:33:25.000000000","message":"Delete redundant period in ManilaException messages","commit_id":"f8d103431217f88139fec7603973e8f0a7b15206"},{"author":{"_account_id":11047,"name":"Mark Sturdevant","email":"mark.sturdevant@ibm.com","username":"markstur"},"change_message_id":"eacc1c03f05a7eb5fbd265d866cd743a6d1fd04f","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"--Delete redundant period in the command echo."},{"line_number":10,"context_line":"--In order to keep consistent with the command prompt,"},{"line_number":11,"context_line":"change \u0027extended\u0027 to \u0027new\u0027 (current: 4, extended: 1)."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I0081643b0ba432b327a22473856d06b63f307873"},{"line_number":14,"context_line":"Closes-Bug: #1466062"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"fa32b979_03501ed3","line":11,"updated":"2015-06-23 17:33:25.000000000","message":"This other stuff is not in this patch.","commit_id":"f8d103431217f88139fec7603973e8f0a7b15206"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"699530ef243befff7d610aeaac9ebf2cf9665c48","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"--Delete redundant period in the command echo."},{"line_number":10,"context_line":"--In order to keep consistent with the command prompt,"},{"line_number":11,"context_line":"change \u0027extended\u0027 to \u0027new\u0027 (current: 4, extended: 1)."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I0081643b0ba432b327a22473856d06b63f307873"},{"line_number":14,"context_line":"Closes-Bug: #1466062"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"fa32b979_2641b0a9","line":11,"in_reply_to":"fa32b979_03501ed3","updated":"2015-06-23 18:16:25.000000000","message":"Agreed. This commit message is very confusing.","commit_id":"f8d103431217f88139fec7603973e8f0a7b15206"},{"author":{"_account_id":11047,"name":"Mark Sturdevant","email":"mark.sturdevant@ibm.com","username":"markstur"},"change_message_id":"eacc1c03f05a7eb5fbd265d866cd743a6d1fd04f","unresolved":false,"context_lines":[{"line_number":11,"context_line":"change \u0027extended\u0027 to \u0027new\u0027 (current: 4, extended: 1)."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I0081643b0ba432b327a22473856d06b63f307873"},{"line_number":14,"context_line":"Closes-Bug: #1466062"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"fa32b979_a32db247","line":14,"updated":"2015-06-23 17:33:25.000000000","message":"Only partially fixes because that bug refers to 2 different problems (period and description).  Can you split the bug in to 2?  That would be better.","commit_id":"f8d103431217f88139fec7603973e8f0a7b15206"},{"author":{"_account_id":11047,"name":"Mark Sturdevant","email":"mark.sturdevant@ibm.com","username":"markstur"},"change_message_id":"f2b5d7998cf31905e65d9fda19e72aad207cc53b","unresolved":false,"context_lines":[{"line_number":9,"context_line":"--Delete redundant period in the command echo."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: I0081643b0ba432b327a22473856d06b63f307873"},{"line_number":12,"context_line":"Closes-Bug: #1466062"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"fa32b979_b6061584","line":12,"updated":"2015-06-24 20:48:47.000000000","message":"That bug still refers to 2 different things. Can you clean that up?  Is the other part merged already?","commit_id":"83d73f824452acbc545c943773f0e6c12d6748fc"},{"author":{"_account_id":15100,"name":"zhongjun","email":"jun.zhongjun2@gmail.com","username":"zhongjun2"},"change_message_id":"690338c295c08065efcb0aa6424cc4373ff43a89","unresolved":false,"context_lines":[{"line_number":9,"context_line":"--Delete redundant period in the command echo."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: I0081643b0ba432b327a22473856d06b63f307873"},{"line_number":12,"context_line":"Closes-Bug: #1466062"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"fa32b979_005aa2f2","line":12,"in_reply_to":"fa32b979_b6061584","updated":"2015-06-27 02:54:38.000000000","message":"Done","commit_id":"83d73f824452acbc545c943773f0e6c12d6748fc"}],"manila/exception.py":[{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"699530ef243befff7d610aeaac9ebf2cf9665c48","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        elif isinstance(message, Exception):"},{"line_number":104,"context_line":"            message \u003d six.text_type(message)"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"        message \u003d message.rstrip(\u0027.\u0027) + \u0027.\u0027"},{"line_number":107,"context_line":"        self.msg \u003d message"},{"line_number":108,"context_line":"        super(ManilaException, self).__init__(message)"},{"line_number":109,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"fa32b979_493967d6","line":106,"updated":"2015-06-23 18:16:25.000000000","message":"I have the same concern as Clinton.  This will change \"An error occurred......\" to \"An error occurred.\" which is not expected.\n\nIt seems odd to strip the period like this. The original message should be kept as much as possible.  If the original message adds extra period, it should be fixed there instead of altering the behavior of the original message here.","commit_id":"f8d103431217f88139fec7603973e8f0a7b15206"},{"author":{"_account_id":11865,"name":"Clinton Knight","email":"cknight@netapp.com","username":"cknight"},"change_message_id":"11dbeb5f5a03bbbadff7a790a644fab944467c57","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        elif isinstance(message, Exception):"},{"line_number":104,"context_line":"            message \u003d six.text_type(message)"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"        message \u003d message.rstrip(\u0027.\u0027) + \u0027.\u0027"},{"line_number":107,"context_line":"        self.msg \u003d message"},{"line_number":108,"context_line":"        super(ManilaException, self).__init__(message)"},{"line_number":109,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"fa32b979_89220fa2","line":106,"updated":"2015-06-23 18:11:05.000000000","message":"This doesn\u0027t just fix the double period problem, it also forces every exception message to end with a period.  Is that we want?  Are there legitimate cases for exception messages not ending in a period?","commit_id":"f8d103431217f88139fec7603973e8f0a7b15206"},{"author":{"_account_id":11865,"name":"Clinton Knight","email":"cknight@netapp.com","username":"cknight"},"change_message_id":"e4ffbc2c85d5018a43503e4546a223dad68d4210","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        elif isinstance(message, Exception):"},{"line_number":104,"context_line":"            message \u003d six.text_type(message)"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"        message \u003d message.rstrip(\u0027.\u0027) + \u0027.\u0027"},{"line_number":107,"context_line":"        self.msg \u003d message"},{"line_number":108,"context_line":"        super(ManilaException, self).__init__(message)"},{"line_number":109,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"fa32b979_11edbdb6","line":106,"in_reply_to":"fa32b979_493967d6","updated":"2015-06-23 23:46:40.000000000","message":"Hi, Xing.  In the first patch set, Zhongjun started changing exception messages to remove periods, planning to do it across the codebase.  But I wasn\u0027t comfortable with that.  Besides the fact it\u0027s a lot of work for him and everyone else, it doesn\u0027t guarantee more offending messages aren\u0027t added later.  Addressing the issue surgically in the exception class is very appealing, because it\u0027s a simple, one-time, future-proof fix.  We just have to agree on an implementation that minimizes unintended consequences.\n\nZhongjun, what we need is to ensure the combination of the base message and a substitution parameter *at the end of the message* don\u0027t combine to end with a double period.  Is there an elegant way to do that, even if i18n translation reorders the kwargs?\n\nIf not, then perhaps we could match exactly two periods and replace that with one.  At least then the ellipsis (...) case Xing pointed out would still be preserved.","commit_id":"f8d103431217f88139fec7603973e8f0a7b15206"},{"author":{"_account_id":11865,"name":"Clinton Knight","email":"cknight@netapp.com","username":"cknight"},"change_message_id":"aec29d9c122129ee883fedbda461f1e052b52ad2","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        elif isinstance(message, Exception):"},{"line_number":104,"context_line":"            message \u003d six.text_type(message)"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"        if message.endswith(\u0027..\u0027):"},{"line_number":107,"context_line":"            message \u003d message[:-1]"},{"line_number":108,"context_line":"        self.msg \u003d message"},{"line_number":109,"context_line":"        super(ManilaException, self).__init__(message)"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa32b979_a5b1fde1","line":106,"updated":"2015-06-24 19:32:47.000000000","message":"This would also match \u0027...\u0027, which we don\u0027t want.  I think you\u0027ll need a regex to match a non-period, followed by two periods, at the end of a string.  For example:\n\nif re.match(\u0027[^\\.]+\\.\\.$\u0027, message):\n   message \u003d message[:-1]","commit_id":"83d73f824452acbc545c943773f0e6c12d6748fc"},{"author":{"_account_id":15100,"name":"zhongjun","email":"jun.zhongjun2@gmail.com","username":"zhongjun2"},"change_message_id":"690338c295c08065efcb0aa6424cc4373ff43a89","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        elif isinstance(message, Exception):"},{"line_number":104,"context_line":"            message \u003d six.text_type(message)"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"        if message.endswith(\u0027..\u0027):"},{"line_number":107,"context_line":"            message \u003d message[:-1]"},{"line_number":108,"context_line":"        self.msg \u003d message"},{"line_number":109,"context_line":"        super(ManilaException, self).__init__(message)"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa32b979_a0717679","line":106,"in_reply_to":"fa32b979_a5b1fde1","updated":"2015-06-27 02:54:38.000000000","message":"Done","commit_id":"83d73f824452acbc545c943773f0e6c12d6748fc"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"81ae94f626a43c30a564a4874f8a61365a418f8b","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        elif isinstance(message, Exception):"},{"line_number":105,"context_line":"            message \u003d six.text_type(message)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        if re.match(\u0027.*[^\\.]\\.\\.$\u0027, message):"},{"line_number":108,"context_line":"            message \u003d message[:-1]"},{"line_number":109,"context_line":"        self.msg \u003d message"},{"line_number":110,"context_line":"        super(ManilaException, self).__init__(message)"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba3cc151_31dc8872","line":107,"updated":"2015-07-08 10:58:04.000000000","message":"Regex is kind of overkill here, IMHO. Could be used more simplier variant:\n\n\"\"\"\n\nif len(message) \u003e 1 and message[-2:] \u003d\u003d \u0027..\u0027:\n\n    message \u003d message[:-1]\n\n\"\"\"\n\nAnd yes, as Mark mentioned in main comment thread of this commit. Need to cover this change with unit tests.","commit_id":"88be8c0a1f39e583eb4e9ee4db373c8c7257cf9e"},{"author":{"_account_id":16652,"name":"zhaohua","email":"nk-zh@163.com","username":"zhaohua"},"change_message_id":"bed3f20cfec17d3f9f85b4fa4ffe884e734a6567","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        elif isinstance(message, Exception):"},{"line_number":105,"context_line":"            message \u003d six.text_type(message)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        if re.match(\u0027.*[^\\.]\\.\\.$\u0027, message):"},{"line_number":108,"context_line":"            message \u003d message[:-1]"},{"line_number":109,"context_line":"        self.msg \u003d message"},{"line_number":110,"context_line":"        super(ManilaException, self).__init__(message)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a41bdd9_207243ae","line":107,"in_reply_to":"ba3cc151_31dc8872","updated":"2015-07-13 14:15:37.000000000","message":"Done","commit_id":"88be8c0a1f39e583eb4e9ee4db373c8c7257cf9e"},{"author":{"_account_id":11865,"name":"Clinton Knight","email":"cknight@netapp.com","username":"cknight"},"change_message_id":"1f9ebd4c94620ca49dc530cee52cf3f8e54be2e2","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        elif isinstance(message, Exception):"},{"line_number":105,"context_line":"            message \u003d six.text_type(message)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        if len(message) \u003e 1 and message[-2:] \u003d\u003d \u0027..\u0027:"},{"line_number":108,"context_line":"            message \u003d message[:-1]"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        self.msg \u003d message"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a41bdd9_0fa64810","line":107,"updated":"2015-07-13 15:39:43.000000000","message":"As Xing indicated earlier, the problem with this implementation is that it will corrupt at least one valid case of multiple periods, where a message ends with an ellipsis (...).  The regex implementation didn\u0027t have that problem, since it matched exactly two periods (the problem case) and preserved anything else.\n\nValeriy, you weren\u0027t happy with a regex, so can you suggest something else that does have the above issue?","commit_id":"b52aecf6905b03b42462896c776b38cf4a6e7b3c"},{"author":{"_account_id":15100,"name":"zhongjun","email":"jun.zhongjun2@gmail.com","username":"zhongjun2"},"change_message_id":"60c5e95310aebd5a9473256ceba449070640c9d6","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        elif isinstance(message, Exception):"},{"line_number":105,"context_line":"            message \u003d six.text_type(message)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        if len(message) \u003e 1 and message[-2:] \u003d\u003d \u0027..\u0027:"},{"line_number":108,"context_line":"            message \u003d message[:-1]"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        self.msg \u003d message"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a41bdd9_218b01c5","line":107,"in_reply_to":"9a41bdd9_0fa64810","updated":"2015-07-14 12:03:43.000000000","message":"Done","commit_id":"b52aecf6905b03b42462896c776b38cf4a6e7b3c"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"9314003417c5d83bcddf7ae6bff916818dee6111","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        elif isinstance(message, Exception):"},{"line_number":105,"context_line":"            message \u003d six.text_type(message)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        if len(message) \u003e 1 and message[-2:] \u003d\u003d \u0027..\u0027:"},{"line_number":108,"context_line":"            message \u003d message[:-1]"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        self.msg \u003d message"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a41bdd9_4abbdee5","line":107,"in_reply_to":"9a41bdd9_0fa64810","updated":"2015-07-13 15:57:45.000000000","message":"Oh, I did not take into account ellipsis. Then, I am OK with regex here.","commit_id":"b52aecf6905b03b42462896c776b38cf4a6e7b3c"},{"author":{"_account_id":15100,"name":"zhongjun","email":"jun.zhongjun2@gmail.com","username":"zhongjun2"},"change_message_id":"60c5e95310aebd5a9473256ceba449070640c9d6","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        elif isinstance(message, Exception):"},{"line_number":105,"context_line":"            message \u003d six.text_type(message)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        if len(message) \u003e 1 and message[-2:] \u003d\u003d \u0027..\u0027:"},{"line_number":108,"context_line":"            message \u003d message[:-1]"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        self.msg \u003d message"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a41bdd9_81ba0d6d","line":107,"in_reply_to":"9a41bdd9_4abbdee5","updated":"2015-07-14 12:03:43.000000000","message":"Done","commit_id":"b52aecf6905b03b42462896c776b38cf4a6e7b3c"}],"manila/tests/test_exception.py":[{"author":{"_account_id":11865,"name":"Clinton Knight","email":"cknight@netapp.com","username":"cknight"},"change_message_id":"1f9ebd4c94620ca49dc530cee52cf3f8e54be2e2","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        self.assertNotIn(\u0027foo_msg\u0027, exc.kwargs)"},{"line_number":105,"context_line":"        self.assertNotIn(\u0027bar_msg\u0027, exc.kwargs)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    def test_exception_redundant_period(self):"},{"line_number":108,"context_line":"        msg \u003d \u0027test message..\u0027"},{"line_number":109,"context_line":"        exc1 \u003d Exception(msg)"},{"line_number":110,"context_line":"        exc2 \u003d exception.ManilaException(exc1)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a41bdd9_143c1de1","line":107,"updated":"2015-07-13 15:39:43.000000000","message":"I\u0027d like to see several more test inputs.  And please use DDT to collapse the tests to a single method.","commit_id":"b52aecf6905b03b42462896c776b38cf4a6e7b3c"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"9314003417c5d83bcddf7ae6bff916818dee6111","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        self.assertNotIn(\u0027foo_msg\u0027, exc.kwargs)"},{"line_number":105,"context_line":"        self.assertNotIn(\u0027bar_msg\u0027, exc.kwargs)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    def test_exception_redundant_period(self):"},{"line_number":108,"context_line":"        msg \u003d \u0027test message..\u0027"},{"line_number":109,"context_line":"        exc1 \u003d Exception(msg)"},{"line_number":110,"context_line":"        exc2 \u003d exception.ManilaException(exc1)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a41bdd9_ca960e4c","line":107,"in_reply_to":"9a41bdd9_143c1de1","updated":"2015-07-13 15:57:45.000000000","message":"+1","commit_id":"b52aecf6905b03b42462896c776b38cf4a6e7b3c"},{"author":{"_account_id":15100,"name":"zhongjun","email":"jun.zhongjun2@gmail.com","username":"zhongjun2"},"change_message_id":"60c5e95310aebd5a9473256ceba449070640c9d6","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        self.assertNotIn(\u0027foo_msg\u0027, exc.kwargs)"},{"line_number":105,"context_line":"        self.assertNotIn(\u0027bar_msg\u0027, exc.kwargs)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    def test_exception_redundant_period(self):"},{"line_number":108,"context_line":"        msg \u003d \u0027test message..\u0027"},{"line_number":109,"context_line":"        exc1 \u003d Exception(msg)"},{"line_number":110,"context_line":"        exc2 \u003d exception.ManilaException(exc1)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a41bdd9_21b22195","line":107,"in_reply_to":"9a41bdd9_143c1de1","updated":"2015-07-14 12:03:43.000000000","message":"Done","commit_id":"b52aecf6905b03b42462896c776b38cf4a6e7b3c"},{"author":{"_account_id":11047,"name":"Mark Sturdevant","email":"mark.sturdevant@ibm.com","username":"markstur"},"change_message_id":"6e577698e90b37f21d8e2e42db93eedf93e060e3","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        self.assertNotIn(\u0027foo_msg\u0027, exc.kwargs)"},{"line_number":105,"context_line":"        self.assertNotIn(\u0027bar_msg\u0027, exc.kwargs)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    def test_exception_redundant_period(self):"},{"line_number":108,"context_line":"        msg \u003d \u0027test message..\u0027"},{"line_number":109,"context_line":"        exc1 \u003d Exception(msg)"},{"line_number":110,"context_line":"        exc2 \u003d exception.ManilaException(exc1)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a41bdd9_a5197d7b","line":107,"in_reply_to":"9a41bdd9_ca960e4c","updated":"2015-07-13 16:12:08.000000000","message":"The results should show that a period is only added when needed for an exception like InvalidInput which tries to add another period.  So you probably should test with both a period-adder and a non-period-adder as well as a variety of period endings in the reason (input). Fortunately with DDT it\u0027s really easy to add those combinations.","commit_id":"b52aecf6905b03b42462896c776b38cf4a6e7b3c"}]}
