)]}'
{"reno/formatter.py":[{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"6f9a1ebb507b4b3305473560c6fad21b95584a91","unresolved":false,"context_lines":[{"line_number":49,"context_line":"            file_contents[filename] \u003d y"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    if not versions_to_include:"},{"line_number":52,"context_line":"        report.append(\u0027*There are no release notes for this branch, yet.*\u0027)"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    for version in versions_to_include:"},{"line_number":55,"context_line":"        report.append(version)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a1a9d01_51c218ea","line":52,"updated":"2015-09-30 19:13:05.000000000","message":"I think the \", yet\" at the end makes this harder to process for non-native-english speakers. Not -1\u0027ing, but perhaps we could drop this.","commit_id":"501a4ea363caa6374653c91c22a16d84d2e638d0"}],"reno/scanner.py":[{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"6f9a1ebb507b4b3305473560c6fad21b95584a91","unresolved":false,"context_lines":[{"line_number":93,"context_line":"    log_cmd.extend([\u0027--\u0027, notesdir])"},{"line_number":94,"context_line":"    try:"},{"line_number":95,"context_line":"        history_results \u003d utils.check_output(log_cmd, cwd\u003dreporoot)"},{"line_number":96,"context_line":"    except subprocess.CalledProcessError:"},{"line_number":97,"context_line":"        history_results \u003d \u0027\u0027"},{"line_number":98,"context_line":"    history \u003d history_results.split(\u0027\\x00\u0027)"},{"line_number":99,"context_line":"    current_version \u003d current_version"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a1a9d01_ff33f35f","line":96,"updated":"2015-09-30 19:13:05.000000000","message":"This seems like it will catch /any/ error - e.g. if git is not installed it will do the same thing. That seems overly broad to me - is it possible to check the return code, for instance, to be more narrow? Also, since we\u0027re not capturing stderr here, the message will go to reno\u0027s stderr, but without any porcelain to give it context. So - I think we probably want something like this:\n\n p \u003d subprocess.Process(log_cmd, cwd\u003dreporoot,\n     stdout\u003dsubprocess.PIPE, subprocess.stderr\u003dPIPE\n     ) #errors here signal git not installed\n history_results, err \u003d p.communicate\n retcode \u003d process.poll()\n if retcode and retcode !\u003d 128:\n     # non-git error\n     raise subprocess.CalledProcessError(retcode, \u0027git\u0027, err)\n if retcode \u003d\u003d 128:\n     if (\"fatal: bad revision \u0027%s\u0027\" % (branch,)) in err:\n         history_results \u003d \u0027\u0027\n     else:\n         raise subprocess.CalledProcessError(retcode, \u0027git\u0027, err)\n\nBecause this will not mask any error other than \u0027the branch being generated for does not exist\u0027.\n\nBUT -that said, I don\u0027t actually agree that we should transform generation of notes on a missing branch into a non-fatal error: it seems to me that in that situation something is genuinely broken somewhere, and we should just report back to the caller to let them fix it.\n\nThe remaining case - git log of a notesdir that doesn\u0027t exist doesn\u0027t trigger a git error - it just exits 0 with no output at all, so whether or not that makes sense, the status quo is that it doesn\u0027t error (in my testing anyhow:\n\n git log --name-only -- releasenotesa/notes \u0026\u0026 echo ok\n ok","commit_id":"501a4ea363caa6374653c91c22a16d84d2e638d0"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"646035125528df2f7e611c9c5b534a519557f378","unresolved":false,"context_lines":[{"line_number":93,"context_line":"    log_cmd.extend([\u0027--\u0027, notesdir])"},{"line_number":94,"context_line":"    try:"},{"line_number":95,"context_line":"        history_results \u003d utils.check_output(log_cmd, cwd\u003dreporoot)"},{"line_number":96,"context_line":"    except subprocess.CalledProcessError:"},{"line_number":97,"context_line":"        history_results \u003d \u0027\u0027"},{"line_number":98,"context_line":"    history \u003d history_results.split(\u0027\\x00\u0027)"},{"line_number":99,"context_line":"    current_version \u003d current_version"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a1a9d01_2813400f","line":96,"in_reply_to":"9a1a9d01_ff33f35f","updated":"2015-10-01 21:02:01.000000000","message":"I\u0027ve improved the error handling by adding it to the utils module instead of here inline.\n\nI get what you\u0027re saying about not ignoring the error. I may rework this patch to report the error more clearly, since right now it\u0027s catching all errors and ignoring them.","commit_id":"501a4ea363caa6374653c91c22a16d84d2e638d0"}]}
