)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":15197,"name":"Pierre Riteau","email":"pierre@stackhpc.com","username":"priteau","status":"StackHPC"},"change_message_id":"1e5db253f970e045e95db807c5619f2a0092e0c9","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"4a56e709_74d2be29","updated":"2021-11-17 11:02:17.000000000","message":"Note, this would break compatibility with git \u003c 2.18. Do we need to check the git version and use the appropriate option?","commit_id":"4410b9198beed214ca746e9277c9ebb7eb1c062f"},{"author":{"_account_id":15197,"name":"Pierre Riteau","email":"pierre@stackhpc.com","username":"priteau","status":"StackHPC"},"change_message_id":"ca2e11d39ce3dac60f23fc7d643f9fcfd496e06a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"af49e5a3_734005a5","updated":"2021-11-17 11:56:28.000000000","message":"CI jobs use an old Git version with no support for -r","commit_id":"8427962b2520cb14bcbfc393b3db7e86de4d9fae"},{"author":{"_account_id":15197,"name":"Pierre Riteau","email":"pierre@stackhpc.com","username":"priteau","status":"StackHPC"},"change_message_id":"1bbdc0007f52ca2ec3bda29c28ee70c7c59259c2","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"6741df99_e5b3d68a","updated":"2021-11-17 21:54:17.000000000","message":"Clark, thanks a lot for updating the patch.","commit_id":"406b8e8f08c4ae029dbb980c46bc68136bfb307d"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"9e4c0bda2f45d4031ca55e2d10a054d8259e0fdf","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"01b2076d_846cc961","updated":"2021-11-18 08:06:15.000000000","message":"Thanks for keeping git-review in shape :-)","commit_id":"406b8e8f08c4ae029dbb980c46bc68136bfb307d"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"4c7fe21282e9f020b404b15319b8ba8bf52f7976","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"e7d33eb1_4f0fe07e","updated":"2021-11-17 19:37:00.000000000","message":"recheck starting gerrit failed whcih should be unrelated to this change.","commit_id":"406b8e8f08c4ae029dbb980c46bc68136bfb307d"}],"git_review/cmd.py":[{"author":{"_account_id":5263,"name":"Jeremy Stanley","display_name":"fungi","email":"fungi@yuggoth.org","username":"fungi","status":"missing, presumed fed"},"change_message_id":"37b4b14119bf68a5bb016394af67297a960085be","unresolved":false,"context_lines":[{"line_number":912,"context_line":"    # Determine git version to set rebase flags below."},{"line_number":913,"context_line":"    output \u003d run_command(\"git --version\")"},{"line_number":914,"context_line":"    rebase_flag \u003d \"--rebase-merges\""},{"line_number":915,"context_line":"    if \"git version\" in output:"},{"line_number":916,"context_line":"        v \u003d output.rsplit(None, 1)[1]"},{"line_number":917,"context_line":"        gitv \u003d tuple(map(int, v.split(\u0027.\u0027)))"},{"line_number":918,"context_line":"        if gitv \u003c (2, 18, 0):"}],"source_content_type":"text/x-python","patch_set":3,"id":"033a4e42_b838d585","line":915,"updated":"2021-11-17 19:14:00.000000000","message":"Oh, good point about the rsplit(), so it\u0027s effectively the same as if you\u0027d done split()[-1]. I suppose the odds another word will be added to the end of the string are considerably less.","commit_id":"aa7209f48dd009ab76efd5ad07dc76582b4dce1f"},{"author":{"_account_id":5263,"name":"Jeremy Stanley","display_name":"fungi","email":"fungi@yuggoth.org","username":"fungi","status":"missing, presumed fed"},"change_message_id":"114540ce15cc70df807f930864d3084f35e878fa","unresolved":false,"context_lines":[{"line_number":912,"context_line":"    # Determine git version to set rebase flags below."},{"line_number":913,"context_line":"    output \u003d run_command(\"git --version\")"},{"line_number":914,"context_line":"    rebase_flag \u003d \"--rebase-merges\""},{"line_number":915,"context_line":"    if \"git version\" in output:"},{"line_number":916,"context_line":"        v \u003d output.rsplit(None, 1)[1]"},{"line_number":917,"context_line":"        gitv \u003d tuple(map(int, v.split(\u0027.\u0027)))"},{"line_number":918,"context_line":"        if gitv \u003c (2, 18, 0):"}],"source_content_type":"text/x-python","patch_set":3,"id":"3b1a0fad_9a7720d8","line":915,"updated":"2021-11-17 18:32:16.000000000","message":"While this is a good start at failing forward in case the version string changes in the future, it\u0027s still a bit fragile. Consider that a word could be added to the beginning of the string, causing the int recasting below to raise ValueError (e.g. \"The git version is 3.45.6\").","commit_id":"aa7209f48dd009ab76efd5ad07dc76582b4dce1f"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"eb723ad806b24fd855a9ce45e95a6e53d75e8b88","unresolved":false,"context_lines":[{"line_number":912,"context_line":"    # Determine git version to set rebase flags below."},{"line_number":913,"context_line":"    output \u003d run_command(\"git --version\")"},{"line_number":914,"context_line":"    rebase_flag \u003d \"--rebase-merges\""},{"line_number":915,"context_line":"    if \"git version\" in output:"},{"line_number":916,"context_line":"        v \u003d output.rsplit(None, 1)[1]"},{"line_number":917,"context_line":"        gitv \u003d tuple(map(int, v.split(\u0027.\u0027)))"},{"line_number":918,"context_line":"        if gitv \u003c (2, 18, 0):"}],"source_content_type":"text/x-python","patch_set":3,"id":"8a168bb6_922a6d4c","line":915,"in_reply_to":"3b1a0fad_9a7720d8","updated":"2021-11-17 19:07:06.000000000","message":"We do an rsplit so it should really only be a problem if the version string isn\u0027t the end of the line. However, this code does try to fallback to using --rebase-merges if it cannot find the version. We can update this to also catch the cast errors should they happen and just continue on.","commit_id":"aa7209f48dd009ab76efd5ad07dc76582b4dce1f"},{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"d64d5119d3c2a9ed6273569468aae0a5a6e553d0","unresolved":true,"context_lines":[{"line_number":910,"context_line":"        sys.exit(1)"},{"line_number":911,"context_line":""},{"line_number":912,"context_line":"    # Determine git version to set rebase flags below."},{"line_number":913,"context_line":"    output \u003d run_command(\"git --version\")"},{"line_number":914,"context_line":"    rebase_flag \u003d \"--rebase-merges\""},{"line_number":915,"context_line":"    if \"git version\" in output:"},{"line_number":916,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":4,"id":"09dfca08_0ce5b344","line":913,"updated":"2021-11-18 21:01:51.000000000","message":"This could be just \"git version\"","commit_id":"406b8e8f08c4ae029dbb980c46bc68136bfb307d"},{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"d64d5119d3c2a9ed6273569468aae0a5a6e553d0","unresolved":true,"context_lines":[{"line_number":915,"context_line":"    if \"git version\" in output:"},{"line_number":916,"context_line":"        try:"},{"line_number":917,"context_line":"            v \u003d output.rsplit(None, 1)[1]"},{"line_number":918,"context_line":"            gitv \u003d tuple(map(int, v.split(\u0027.\u0027)))"},{"line_number":919,"context_line":"            if gitv \u003c (2, 18, 0):"},{"line_number":920,"context_line":"                rebase_flag \u003d \"--preserve-merges\""},{"line_number":921,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":4,"id":"7dc74b02_3dc0af82","line":918,"updated":"2021-11-18 21:01:51.000000000","message":"For my current git checkout it get\n\n $ ~/programs/git/git version\n git version 2.34.0.1.g01cc505b7f.dirty\n\nthe git tag here breaking the int casting.  It\u0027s unfortunately not PEP440 compliant, so the parsing utils don\u0027t help.  But it looks pretty strictly semver, so I think a better idea is to do \n \n # custom builds may look like \"2.34.0.1.g01cc505b7f.dirty\", only consider first 3\n tuple(map(int, v.split(\u0027.\u0027)[0:3]))\n\nI\u0027d also suggest raising an error that we can\u0027t determine the version, because that\u0027s going to be less confusing than using wrong flags.","commit_id":"406b8e8f08c4ae029dbb980c46bc68136bfb307d"},{"author":{"_account_id":5263,"name":"Jeremy Stanley","display_name":"fungi","email":"fungi@yuggoth.org","username":"fungi","status":"missing, presumed fed"},"change_message_id":"2981ee4e36314b7b689e84fb1d891af55909defa","unresolved":false,"context_lines":[{"line_number":915,"context_line":"    if \"git version\" in output:"},{"line_number":916,"context_line":"        try:"},{"line_number":917,"context_line":"            v \u003d output.rsplit(None, 1)[1]"},{"line_number":918,"context_line":"            gitv \u003d tuple(map(int, v.split(\u0027.\u0027)))"},{"line_number":919,"context_line":"            if gitv \u003c (2, 18, 0):"},{"line_number":920,"context_line":"                rebase_flag \u003d \"--preserve-merges\""},{"line_number":921,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":4,"id":"e5279ffe_405b6605","line":918,"updated":"2021-11-18 21:44:08.000000000","message":"Printing a warning is probably in order, but if we cease to be able to guess the git version because of a future change in the layout of the version string then we can fairly safely assume it\u0027s newer than whatever old problem behavior we\u0027re switching on. On the other hand if the program just refuses to work in that situation, then we\u0027re not being especially forward-compatible and users will have to wait for a new version of git-review before they can use it with their shiny new git.","commit_id":"406b8e8f08c4ae029dbb980c46bc68136bfb307d"},{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"555df29822bade9014de100c1881e38f24d5bd04","unresolved":false,"context_lines":[{"line_number":915,"context_line":"    if \"git version\" in output:"},{"line_number":916,"context_line":"        try:"},{"line_number":917,"context_line":"            v \u003d output.rsplit(None, 1)[1]"},{"line_number":918,"context_line":"            gitv \u003d tuple(map(int, v.split(\u0027.\u0027)))"},{"line_number":919,"context_line":"            if gitv \u003c (2, 18, 0):"},{"line_number":920,"context_line":"                rebase_flag \u003d \"--preserve-merges\""},{"line_number":921,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":4,"id":"6535fbda_afe3a26e","line":918,"in_reply_to":"e5279ffe_405b6605","updated":"2021-11-19 00:07:39.000000000","message":"fair point, failing probably isn\u0027t helpful.  i still think that for wide compatibility just taking the first 3 elements is best, although i also agree i tested a few systems that i thought might add things (gentoo and a homebrew installation via mac) and both didn\u0027t.","commit_id":"406b8e8f08c4ae029dbb980c46bc68136bfb307d"}]}
