)]}'
{"devstack-vm-gate-wrap.sh":[{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"85cf52bd558cbc934265c38ca26658b5b247f04d","unresolved":false,"context_lines":[{"line_number":82,"context_line":"      # TODO: remove; this is temporary to handle some project renames"},{"line_number":83,"context_line":"      git remote set-url origin https://review.openstack.org/p/$PROJECT"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"      BRANCH\u003d$ZUUL_BRANCH"},{"line_number":86,"context_line":"      PROJECT_USE_ZUUL\u003d$CHECKOUT_ZUUL"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"      MAX_ATTEMPTS\u003d3"}],"source_content_type":"text/x-sh","patch_set":1,"id":"AAAARH%2F%2F75E%3D","line":85,"updated":"2013-08-14 23:34:10.000000000","message":"Let\u0027s trace this for the nova project.  In the job, you\u0027ve set ZUUL_BRANCH to stable/grizzly, and have set the backwards compat variable to true\n\ncode:\n  BRANCH\u003dstable/grizzly","commit_id":"cbc3d71fc6b6e769ef393b91788e7aa1de7b579d"},{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"85cf52bd558cbc934265c38ca26658b5b247f04d","unresolved":false,"context_lines":[{"line_number":106,"context_line":"      # Ensure that we don\u0027t have stale remotes around"},{"line_number":107,"context_line":"      git remote prune origin"},{"line_number":108,"context_line":"      # See if this project has this branch, if not, use master"},{"line_number":109,"context_line":"      if ! git branch -a |grep remotes/origin/$BRANCH\u003e/dev/null; then"},{"line_number":110,"context_line":"        BRANCH\u003dmaster"},{"line_number":111,"context_line":"      fi"},{"line_number":112,"context_line":""}],"source_content_type":"text/x-sh","patch_set":1,"id":"AAAARH%2F%2F748%3D","line":109,"updated":"2013-08-14 23:34:10.000000000","message":"code:\n if not (remotes/origin/stable/grizzly exists)\n -\u003e\n if not (true)\n -\u003e\n if false\nthis doesn\u0027t run","commit_id":"cbc3d71fc6b6e769ef393b91788e7aa1de7b579d"},{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"85cf52bd558cbc934265c38ca26658b5b247f04d","unresolved":false,"context_lines":[{"line_number":109,"context_line":"      if ! git branch -a |grep remotes/origin/$BRANCH\u003e/dev/null; then"},{"line_number":110,"context_line":"        BRANCH\u003dmaster"},{"line_number":111,"context_line":"      fi"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"      # If we are doing backwards compatibility testing, and the current"},{"line_number":114,"context_line":"      # project has a stable branch, then we want to use it and not any"},{"line_number":115,"context_line":"      # zuul refs that may be stacked up for it in the queue"}],"source_content_type":"text/x-sh","patch_set":1,"id":"AAAARH%2F%2F75g%3D","line":112,"updated":"2013-08-14 23:34:10.000000000","message":"state:\n  ZUUL_BRANCH\u003dstable/grizzly\n  BRANCH\u003dstable/grizzly","commit_id":"cbc3d71fc6b6e769ef393b91788e7aa1de7b579d"},{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"85cf52bd558cbc934265c38ca26658b5b247f04d","unresolved":false,"context_lines":[{"line_number":113,"context_line":"      # If we are doing backwards compatibility testing, and the current"},{"line_number":114,"context_line":"      # project has a stable branch, then we want to use it and not any"},{"line_number":115,"context_line":"      # zuul refs that may be stacked up for it in the queue"},{"line_number":116,"context_line":"      if [ $DEVSTACK_GATE_BACKWARDS_COMPAT \u003d 1 -a $BRANCH !\u003d $ZUUL_BRANCH ]"},{"line_number":117,"context_line":"      then"},{"line_number":118,"context_line":"        PROJECT_USE_ZUUL\u003d0"},{"line_number":119,"context_line":"      fi"}],"source_content_type":"text/x-sh","patch_set":1,"id":"AAAARH%2F%2F75U%3D","line":116,"updated":"2013-08-14 23:34:10.000000000","message":"code:\n if [ 1 \u003d 1 and stable/grizzly !\u003d stable/grizzly ]\n -\u003e\n if [true and false]\n -\u003e\n if false\nthis doesn\u0027t run","commit_id":"cbc3d71fc6b6e769ef393b91788e7aa1de7b579d"},{"author":{"_account_id":2,"name":"Monty Taylor","email":"mordred@inaugust.com","username":"mordred"},"change_message_id":"afc7b224cef6908475103a19216defbebfc0db8b","unresolved":false,"context_lines":[{"line_number":113,"context_line":"      # If we are doing backwards compatibility testing, and the current"},{"line_number":114,"context_line":"      # project has a stable branch, then we want to use it and not any"},{"line_number":115,"context_line":"      # zuul refs that may be stacked up for it in the queue"},{"line_number":116,"context_line":"      if [ $DEVSTACK_GATE_BACKWARDS_COMPAT \u003d 1 -a $BRANCH !\u003d $ZUUL_BRANCH ]"},{"line_number":117,"context_line":"      then"},{"line_number":118,"context_line":"        PROJECT_USE_ZUUL\u003d0"},{"line_number":119,"context_line":"      fi"}],"source_content_type":"text/x-sh","patch_set":1,"id":"AAAARX%2F%2F%2F6Y%3D","line":116,"in_reply_to":"AAAARH%2F%2F75U%3D","updated":"2013-08-18 03:25:38.000000000","message":"Thank you. I believe the logic fix is that the test wants to be BRANCH \u003d ZUUL_BRANCH.\n\nBecause we only want to applly zuul changes in the backwards test case to repos that don\u0027t have a stable branch, which are repos who would have BRANCH\u003dmaster here.","commit_id":"cbc3d71fc6b6e769ef393b91788e7aa1de7b579d"},{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"85cf52bd558cbc934265c38ca26658b5b247f04d","unresolved":false,"context_lines":[{"line_number":119,"context_line":"      fi"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"      # See if we should check out a Zuul ref"},{"line_number":122,"context_line":"      if [ $PROJECT_USE_ZUUL -eq \"1\" ]; then"},{"line_number":123,"context_line":"          # See if Zuul prepared a ref for this project"},{"line_number":124,"context_line":"          if [ \"$ZUUL_REF\" !\u003d \"\" ] \u0026\u0026 \\"},{"line_number":125,"context_line":"              git fetch $ZUUL_URL/$PROJECT $ZUUL_REF; then"}],"source_content_type":"text/x-sh","patch_set":1,"id":"AAAARH%2F%2F74w%3D","line":122,"updated":"2013-08-14 23:34:10.000000000","message":"this runs","commit_id":"cbc3d71fc6b6e769ef393b91788e7aa1de7b579d"},{"author":{"_account_id":5263,"name":"Jeremy Stanley","display_name":"fungi","email":"fungi@yuggoth.org","username":"fungi","status":"missing, presumed fed"},"change_message_id":"32bfdabef77d6e1746b2b9379ba5ce41bc10a7c6","unresolved":false,"context_lines":[{"line_number":118,"context_line":"          if [ \"$OVERRIDE_ZUUL_REF\" !\u003d \"\" ] \u0026\u0026 \\"},{"line_number":119,"context_line":"              git fetch $ZUUL_URL/$PROJECT $OVERRIDE_ZUUL_REF || \\"},{"line_number":120,"context_line":"              [ \"$ZUUL_REF\" !\u003d \"\" ] \u0026\u0026 \\"},{"line_number":121,"context_line":"              git fetch $ZUUL_URL/$PROJECT $ZUUL_REF; then"},{"line_number":122,"context_line":"              # It\u0027s there, so check it out."},{"line_number":123,"context_line":"              git checkout FETCH_HEAD"},{"line_number":124,"context_line":"              git reset --hard FETCH_HEAD"}],"source_content_type":"text/x-sh","patch_set":5,"id":"AAAAS3%2F%2Fey0%3D","line":121,"updated":"2013-09-26 00:26:23.000000000","message":"I think you need some associative bracketing here. According to the bash manpage \u0026\u0026 and || have equal precedence and are evaluated with left associativity, so since || does not take precedence over \u0026\u0026 this will always end up trying to fetch $ZUUL_REF unless the first three clauses all return nonzero.","commit_id":"5b228a9e42f06c3e46d20c00ba8ab42e52804ba8"}]}
