)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"08b23a5e4f9ceb12d2fc3b4de6d90d8743f0e193","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix glanceclient http.py string formatting error"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"* Proposed fixes of \"TypeError: not all arguments converted during string"},{"line_number":10,"context_line":"formatting\" are:"},{"line_number":11,"context_line":"a) msg \u003d \u0027Unable to load CA from \"%s\" %s\u0027 % (self.cacert, e)"},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"AAAAUH%2F%2F5VM%3D","line":9,"updated":"2014-01-07 04:25:08.000000000","message":"pls reorganize this whole commit message, it has a pretty long description around what\u0027s the thinking you have and the thoughts within your implementation progress. I think following is enough, clear and result only:\n\n\nFix http.py string formatting error in glanceclient\n\n* Fix \"TypeError: not all arguments converted during string formatting\" issue within http.py which caused by wrong variable replacement for string formation.\n* Add a UT case to cover the path where the bug is in.\n\nCloses-Bug: #1265730\nChange-Id: I91a137c5c3a9a3cc603804bef5eaea14ae281c08","commit_id":"d3df6c43f93d1fd770163a0af528895e48f3d714"},{"author":{"_account_id":9489,"name":"Le Tian Ren","email":"renlet@cn.ibm.com","username":"gpanda"},"change_message_id":"124eebbe630e32e366cf65d951376444487428d6","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix glanceclient http.py string formatting error"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"* Proposed fixes of \"TypeError: not all arguments converted during string"},{"line_number":10,"context_line":"formatting\" are:"},{"line_number":11,"context_line":"a) msg \u003d \u0027Unable to load CA from \"%s\" %s\u0027 % (self.cacert, e)"},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"AAAAUH%2F%2F5BI%3D","line":9,"in_reply_to":"AAAAUH%2F%2F5VM%3D","updated":"2014-01-07 07:13:36.000000000","message":"@Zhi Yan Liu, I wrote like just because I read the community guide about commit messages. It tells me less is not more, more is more. And get let my reviewers\u0027 notice to review this patch.\n\nSo my patch messages contains: 1) what I changed, 2)why I change like this 3)any way to mitigate such apparent defects in the future.\n\nDoes my commit message really matters that it should get a -1. Any such precedents? Forgive my asking, I\u0027m a newbie in this community.\n\n\nhttps://wiki.openstack.org/wiki/GitCommitMessages, \n\nInformation in commit messages\n\nAs important as the content of the change, is the content of the commit message describing it. When writing a commit message there are some important things to remember\n\n    Do not assume the reviewer understands what the original problem was. \n\nWhen reading bug reports, after a number of back \u0026 forth comments, it is often as clear as mud, what the root cause problem is. The commit message should have a clear statement as to what the original problem is. The bug is merely interesting historical background on /how/ the problem was identified. It should be possible to review a proposed patch for correctness without needing to read the bug ticket.\n\n    Do not assume the reviewer has access to external web services/site. \n\nIn 6 months time when someone is on a train/plane/coach/beach/pub troubleshooting a problem \u0026 browsing GIT history, there is no guarantee they will have access to the online bug tracker, or online blueprint documents. The great step forward with distributed SCM is that you no longer need to be \"online\" to have access to all information about the code repository. The commit message should be totally self-contained, to maintain that benefit.\n\n    Do not assume the code is self-evident/self-documenting. \n\nWhat is self-evident to one person, might be clear as mud to another person. Always document what the original problem was and how it is being fixed, for any change except the most obvious typos, or whitespace only commits.\n\n    Describe why a change is being made. \n\nA common mistake is to just document how the code has been written, without describing /why/ the developer chose to do it that way. By all means describe the overall code structure, particularly for large changes, but more importantly describe the intent/motivation behind the changes.\n\n    Read the commit message to see if it hints at improved code structure. \n\nOften when describing a large commit message, it becomes obvious that a commit should have in fact been split into 2 or more parts. Don\u0027t be afraid to go back and rebase the change to split it up into separate commits.\n\n    Ensure sufficient information to decide whether to review. \n\nWhen Gerrit sends out email alerts for new patch submissions there is minimal information included, principally the commit message and the list of files changes. Given the high volume of patches, it is not reasonable to expect all reviewers to examine the patches in detail. The commit message must thus contain sufficient information to alert the potential reviewers to the fact that this is a patch they need to look at.\n\n    The first commit line is the most important. \n\nIn GIT commits the first line of the commit message has special significance. It is used as email subject line, git annotate messages, gitk viewer annotations, merge commit messages and many more places where space is at a premium. As well as summarizing the change itself, it should take care to detail what part of the code is affected. eg if it affects the libvirt driver, mention \u0027libvirt\u0027 somewhere in the first line.\n\n    Describe any limitations of the current code. \n\nIf the code being changed still has future scope for improvements, or any known limitations then mention these in the commit message. This demonstrates to the reviewer that the broader picture has been considered and what tradeoffs have been done in terms of short term goals vs. long term wishes.\n\nThe rules to follow are:\n\nThe commit message must contain all the information required to fully understand \u0026 review the patch for correctness. Less is not more. More is more.","commit_id":"d3df6c43f93d1fd770163a0af528895e48f3d714"}],"glanceclient/common/http.py":[{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"a7a3c832e0eff2ea81bf71f4d9607472e1aab2eb","unresolved":false,"context_lines":[{"line_number":435,"context_line":"            try:"},{"line_number":436,"context_line":"                self.context.load_verify_locations(self.cacert)"},{"line_number":437,"context_line":"            except Exception as e:"},{"line_number":438,"context_line":"                msg \u003d \u0027Unable to load CA from \"%s\" %s\u0027 % (self.cacert, e)"},{"line_number":439,"context_line":"                raise exc.SSLConfigurationError(msg)"},{"line_number":440,"context_line":"        else:"},{"line_number":441,"context_line":"            self.context.set_default_verify_paths()"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2F9gE%3D","line":438,"updated":"2014-01-06 07:00:04.000000000","message":"when you have more then one parameters do formation, I prefer use named parameters in the string template and pass in a dict.","commit_id":"9a7e27422a82dc8a3e26b6d480f566d1bad9168c"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"ae6024f4b4e6adc64e6f58c63dfb796119d76e74","unresolved":false,"context_lines":[{"line_number":435,"context_line":"            try:"},{"line_number":436,"context_line":"                self.context.load_verify_locations(self.cacert)"},{"line_number":437,"context_line":"            except Exception as e:"},{"line_number":438,"context_line":"                msg \u003d \u0027Unable to load CA from \"%s\" %s\u0027 % (self.cacert, e)"},{"line_number":439,"context_line":"                raise exc.SSLConfigurationError(msg)"},{"line_number":440,"context_line":"        else:"},{"line_number":441,"context_line":"            self.context.set_default_verify_paths()"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2F9CE%3D","line":438,"in_reply_to":"AAAAUH%2F%2F9ME%3D","updated":"2014-01-06 09:19:52.000000000","message":"@LeTian, I\u0027m not sure what kind of justification you\u0027re looking for. But I would say zhiyan\u0027s comments is reasonable for me. I prefer to use dict given it\u0027s a multi-param string formatting as well. As for why, I think it sounds like kwargs, which can make sure the formatting is correct inspect of the key orders.","commit_id":"9a7e27422a82dc8a3e26b6d480f566d1bad9168c"},{"author":{"_account_id":9489,"name":"Le Tian Ren","email":"renlet@cn.ibm.com","username":"gpanda"},"change_message_id":"7cc54170d5b9e55f04f688d5426362d0c9280a97","unresolved":false,"context_lines":[{"line_number":435,"context_line":"            try:"},{"line_number":436,"context_line":"                self.context.load_verify_locations(self.cacert)"},{"line_number":437,"context_line":"            except Exception as e:"},{"line_number":438,"context_line":"                msg \u003d \u0027Unable to load CA from \"%s\" %s\u0027 % (self.cacert, e)"},{"line_number":439,"context_line":"                raise exc.SSLConfigurationError(msg)"},{"line_number":440,"context_line":"        else:"},{"line_number":441,"context_line":"            self.context.set_default_verify_paths()"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2F9ME%3D","line":438,"in_reply_to":"AAAAUH%2F%2F9Pk%3D","updated":"2014-01-06 08:37:05.000000000","message":"@Zhi Yan Liu, IMHO, you didn\u0027t answer my question. I ask why you think #d is better? Please give reference link or book, or the reason you can list here.\n99% in our current code is not a good reason. Say UT mock method, I think in current code base, mox is the major way, but a recent mail in community is discussing transition from mox to mock. You must know this. Then can we say mox is better than mock?","commit_id":"9a7e27422a82dc8a3e26b6d480f566d1bad9168c"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"493225e028fc7e29bed5dad313a14c33f41d4595","unresolved":false,"context_lines":[{"line_number":435,"context_line":"            try:"},{"line_number":436,"context_line":"                self.context.load_verify_locations(self.cacert)"},{"line_number":437,"context_line":"            except Exception as e:"},{"line_number":438,"context_line":"                msg \u003d \u0027Unable to load CA from \"%s\" %s\u0027 % (self.cacert, e)"},{"line_number":439,"context_line":"                raise exc.SSLConfigurationError(msg)"},{"line_number":440,"context_line":"        else:"},{"line_number":441,"context_line":"            self.context.set_default_verify_paths()"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2F9Pk%3D","line":438,"in_reply_to":"AAAAUH%2F%2F9RY%3D","updated":"2014-01-06 08:23:29.000000000","message":"@Le Tian Ren, you can search current code base, and see under 99% situation, we use named-param\u0026dict do string formation when there are more then one variables.","commit_id":"9a7e27422a82dc8a3e26b6d480f566d1bad9168c"},{"author":{"_account_id":9489,"name":"Le Tian Ren","email":"renlet@cn.ibm.com","username":"gpanda"},"change_message_id":"6c2968e3d4e5b8339cef1bdcb0ab894f336cafe6","unresolved":false,"context_lines":[{"line_number":435,"context_line":"            try:"},{"line_number":436,"context_line":"                self.context.load_verify_locations(self.cacert)"},{"line_number":437,"context_line":"            except Exception as e:"},{"line_number":438,"context_line":"                msg \u003d \u0027Unable to load CA from \"%s\" %s\u0027 % (self.cacert, e)"},{"line_number":439,"context_line":"                raise exc.SSLConfigurationError(msg)"},{"line_number":440,"context_line":"        else:"},{"line_number":441,"context_line":"            self.context.set_default_verify_paths()"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2F9RY%3D","line":438,"in_reply_to":"AAAAUH%2F%2F9UY%3D","updated":"2014-01-06 08:15:06.000000000","message":"@Zhi Yan Liu, can you give me a reference that among kinds of string formatting, which one is best practice. or can you tell me the reason you think #d is better than #b.\nI did some search in the internet, cannot find a conclusion which one is better between the #b and #d.\nPlus, even #a, it get passed from pylint(which is more strict than flake8 and pep8).","commit_id":"9a7e27422a82dc8a3e26b6d480f566d1bad9168c"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"8a4c62ed3d17acc3974bc1b556517d590d259e06","unresolved":false,"context_lines":[{"line_number":435,"context_line":"            try:"},{"line_number":436,"context_line":"                self.context.load_verify_locations(self.cacert)"},{"line_number":437,"context_line":"            except Exception as e:"},{"line_number":438,"context_line":"                msg \u003d \u0027Unable to load CA from \"%s\" %s\u0027 % (self.cacert, e)"},{"line_number":439,"context_line":"                raise exc.SSLConfigurationError(msg)"},{"line_number":440,"context_line":"        else:"},{"line_number":441,"context_line":"            self.context.set_default_verify_paths()"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2F9UY%3D","line":438,"in_reply_to":"AAAAUH%2F%2F9co%3D","updated":"2014-01-06 07:52:36.000000000","message":"@Le Tian Ren, it seems I\u0027m talking option #d, says:\n\n\u0027Unable to load CA from \"%(cacert)s\" %(err)s\u0027 % dict(cacert\u003dself.cacert, err\u003de)","commit_id":"9a7e27422a82dc8a3e26b6d480f566d1bad9168c"},{"author":{"_account_id":9489,"name":"Le Tian Ren","email":"renlet@cn.ibm.com","username":"gpanda"},"change_message_id":"8985842e78dafaddecbc476927e02aa768cfff7d","unresolved":false,"context_lines":[{"line_number":435,"context_line":"            try:"},{"line_number":436,"context_line":"                self.context.load_verify_locations(self.cacert)"},{"line_number":437,"context_line":"            except Exception as e:"},{"line_number":438,"context_line":"                msg \u003d \u0027Unable to load CA from \"%s\" %s\u0027 % (self.cacert, e)"},{"line_number":439,"context_line":"                raise exc.SSLConfigurationError(msg)"},{"line_number":440,"context_line":"        else:"},{"line_number":441,"context_line":"            self.context.set_default_verify_paths()"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2F9co%3D","line":438,"in_reply_to":"AAAAUH%2F%2F9gE%3D","updated":"2014-01-06 07:47:56.000000000","message":"@Zhi Yan Liu, Please check my bug description. Does that change your mind?","commit_id":"9a7e27422a82dc8a3e26b6d480f566d1bad9168c"},{"author":{"_account_id":9209,"name":"Lin Cai","email":"reachlin@gmail.com","username":"reachlin"},"change_message_id":"9ff4bd669d47e6b0ccf2b3bdb0f32af841138d8c","unresolved":false,"context_lines":[{"line_number":435,"context_line":"            try:"},{"line_number":436,"context_line":"                self.context.load_verify_locations(self.cacert)"},{"line_number":437,"context_line":"            except Exception as e:"},{"line_number":438,"context_line":"                msg \u003d \u0027Unable to load CA from \"%s\" %s\u0027 % (self.cacert, e)"},{"line_number":439,"context_line":"                raise exc.SSLConfigurationError(msg)"},{"line_number":440,"context_line":"        else:"},{"line_number":441,"context_line":"            self.context.set_default_verify_paths()"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2F9c4%3D","line":438,"in_reply_to":"AAAAUH%2F%2F9gE%3D","updated":"2014-01-06 07:36:42.000000000","message":"This should be OK as long as following the conventions in this file, such as in line 431.","commit_id":"9a7e27422a82dc8a3e26b6d480f566d1bad9168c"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"104b9edf22baf24fb8e145c06cf2192efcb0bc86","unresolved":false,"context_lines":[{"line_number":435,"context_line":"            try:"},{"line_number":436,"context_line":"                self.context.load_verify_locations(self.cacert)"},{"line_number":437,"context_line":"            except Exception as e:"},{"line_number":438,"context_line":"                msg \u003d (\u0027Unable to load CA from \"%(cacert)s\" %(exc)s\u0027 %"},{"line_number":439,"context_line":"                       dict(cacert\u003dself.cacert, exc\u003de))"},{"line_number":440,"context_line":"                raise exc.SSLConfigurationError(msg)"},{"line_number":441,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2F4Q8%3D","line":438,"updated":"2014-01-07 09:57:39.000000000","message":"nit: what about this:\n\nmsg \u003d (\u0027Unable to load CA from \"%(cacert)s\": %(exc)s\u0027 %","commit_id":"2ed01afac96af59304215e384fd9b0f0be992711"}]}
