)]}'
{"functions-common":[{"author":{"_account_id":970,"name":"Dean Troyer","email":"dtroyer@gmail.com","username":"dtroyer"},"change_message_id":"6a03d5eb71cfe264dc2ff3ca17a3e72cdb2b1fd8","unresolved":false,"context_lines":[{"line_number":460,"context_line":"# Git Functions"},{"line_number":461,"context_line":"# \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":462,"context_line":""},{"line_number":463,"context_line":"# git can sometimes get itself infinitely stuck with transient network"},{"line_number":464,"context_line":"# errors or other issues with the remote end.  This wraps git in a"},{"line_number":465,"context_line":"# timeout/retry loop and is intended to watch over non-local git"},{"line_number":466,"context_line":"# processes that might hang."}],"source_content_type":"application/octet-stream","patch_set":1,"id":"AAAAUX%2F%2BoOM%3D","line":463,"updated":"2014-02-20 06:00:14.000000000","message":"Sort functions alphabetically within the sections in this file","commit_id":"c5e355cc099253b0614f51141afc77a77def9e9d"},{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"7aefd0e488052ed15a8a0b5945c4d7f3a56d3816","unresolved":false,"context_lines":[{"line_number":460,"context_line":"# Git Functions"},{"line_number":461,"context_line":"# \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":462,"context_line":""},{"line_number":463,"context_line":"# git can sometimes get itself infinitely stuck with transient network"},{"line_number":464,"context_line":"# errors or other issues with the remote end.  This wraps git in a"},{"line_number":465,"context_line":"# timeout/retry loop and is intended to watch over non-local git"},{"line_number":466,"context_line":"# processes that might hang."}],"source_content_type":"application/octet-stream","patch_set":1,"id":"AAAAUX%2F%2Be6o%3D","line":463,"in_reply_to":"AAAAUX%2F%2BoOM%3D","updated":"2014-02-21 00:47:47.000000000","message":"Done","commit_id":"c5e355cc099253b0614f51141afc77a77def9e9d"},{"author":{"_account_id":970,"name":"Dean Troyer","email":"dtroyer@gmail.com","username":"dtroyer"},"change_message_id":"6a03d5eb71cfe264dc2ff3ca17a3e72cdb2b1fd8","unresolved":false,"context_lines":[{"line_number":463,"context_line":"# git can sometimes get itself infinitely stuck with transient network"},{"line_number":464,"context_line":"# errors or other issues with the remote end.  This wraps git in a"},{"line_number":465,"context_line":"# timeout/retry loop and is intended to watch over non-local git"},{"line_number":466,"context_line":"# processes that might hang."},{"line_number":467,"context_line":"function git_timed(){"},{"line_number":468,"context_line":"    local count\u003d0"},{"line_number":469,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":1,"id":"AAAAUX%2F%2BoCk%3D","line":466,"updated":"2014-02-20 06:00:14.000000000","message":"The use of global GIT_CLONE needs to be noted here and at the top of this file.  Also add a usage comment:\n# git_timed \u003cgit-command\u003e ...","commit_id":"c5e355cc099253b0614f51141afc77a77def9e9d"},{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"7aefd0e488052ed15a8a0b5945c4d7f3a56d3816","unresolved":false,"context_lines":[{"line_number":463,"context_line":"# git can sometimes get itself infinitely stuck with transient network"},{"line_number":464,"context_line":"# errors or other issues with the remote end.  This wraps git in a"},{"line_number":465,"context_line":"# timeout/retry loop and is intended to watch over non-local git"},{"line_number":466,"context_line":"# processes that might hang."},{"line_number":467,"context_line":"function git_timed(){"},{"line_number":468,"context_line":"    local count\u003d0"},{"line_number":469,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":1,"id":"AAAAUX%2F%2Be50%3D","line":466,"in_reply_to":"AAAAUX%2F%2BoCk%3D","updated":"2014-02-21 00:47:47.000000000","message":"Done","commit_id":"c5e355cc099253b0614f51141afc77a77def9e9d"},{"author":{"_account_id":970,"name":"Dean Troyer","email":"dtroyer@gmail.com","username":"dtroyer"},"change_message_id":"6a03d5eb71cfe264dc2ff3ca17a3e72cdb2b1fd8","unresolved":false,"context_lines":[{"line_number":464,"context_line":"# errors or other issues with the remote end.  This wraps git in a"},{"line_number":465,"context_line":"# timeout/retry loop and is intended to watch over non-local git"},{"line_number":466,"context_line":"# processes that might hang."},{"line_number":467,"context_line":"function git_timed(){"},{"line_number":468,"context_line":"    local count\u003d0"},{"line_number":469,"context_line":""},{"line_number":470,"context_line":"    # avoid running under timeout, even though \"timeout 0\" does wait"}],"source_content_type":"application/octet-stream","patch_set":1,"id":"AAAAUX%2F%2BoG8%3D","line":467,"updated":"2014-02-20 06:00:14.000000000","message":"need a space between () and {","commit_id":"c5e355cc099253b0614f51141afc77a77def9e9d"},{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"7aefd0e488052ed15a8a0b5945c4d7f3a56d3816","unresolved":false,"context_lines":[{"line_number":464,"context_line":"# errors or other issues with the remote end.  This wraps git in a"},{"line_number":465,"context_line":"# timeout/retry loop and is intended to watch over non-local git"},{"line_number":466,"context_line":"# processes that might hang."},{"line_number":467,"context_line":"function git_timed(){"},{"line_number":468,"context_line":"    local count\u003d0"},{"line_number":469,"context_line":""},{"line_number":470,"context_line":"    # avoid running under timeout, even though \"timeout 0\" does wait"}],"source_content_type":"application/octet-stream","patch_set":1,"id":"AAAAUX%2F%2Be5M%3D","line":467,"in_reply_to":"AAAAUX%2F%2BoG8%3D","updated":"2014-02-21 00:47:47.000000000","message":"Done\n\nget_release_name_from_branch doesn\u0027t do this.  Most of the git functions use function() but most of the others are just \"function\".  Wasn\u0027t sure which is better","commit_id":"c5e355cc099253b0614f51141afc77a77def9e9d"},{"author":{"_account_id":970,"name":"Dean Troyer","email":"dtroyer@gmail.com","username":"dtroyer"},"change_message_id":"6a03d5eb71cfe264dc2ff3ca17a3e72cdb2b1fd8","unresolved":false,"context_lines":[{"line_number":469,"context_line":""},{"line_number":470,"context_line":"    # avoid running under timeout, even though \"timeout 0\" does wait"},{"line_number":471,"context_line":"    # forever..."},{"line_number":472,"context_line":"    if [[ $GIT_TIMEOUT \u003d\u003d 0 ]]; then"},{"line_number":473,"context_line":"\tgit \"$@\""},{"line_number":474,"context_line":"\treturn"},{"line_number":475,"context_line":"    fi"}],"source_content_type":"application/octet-stream","patch_set":1,"id":"AAAAUX%2F%2BoIk%3D","line":472,"updated":"2014-02-20 06:00:14.000000000","message":"Since GIT_TIMEOUT is only used in this function, check that it is set here and bail if not to protect the calls to git_clone() in other scripts.\n\nDo you think we\u0027d ever want to wait forever?","commit_id":"c5e355cc099253b0614f51141afc77a77def9e9d"},{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"7aefd0e488052ed15a8a0b5945c4d7f3a56d3816","unresolved":false,"context_lines":[{"line_number":469,"context_line":""},{"line_number":470,"context_line":"    # avoid running under timeout, even though \"timeout 0\" does wait"},{"line_number":471,"context_line":"    # forever..."},{"line_number":472,"context_line":"    if [[ $GIT_TIMEOUT \u003d\u003d 0 ]]; then"},{"line_number":473,"context_line":"\tgit \"$@\""},{"line_number":474,"context_line":"\treturn"},{"line_number":475,"context_line":"    fi"}],"source_content_type":"application/octet-stream","patch_set":1,"id":"AAAAUX%2F%2Bd4g%3D","line":472,"in_reply_to":"AAAAUX%2F%2BoIk%3D","updated":"2014-02-21 00:47:47.000000000","message":"OK I modified this as you\u0027ve suggested to be safe for external calls.\n\ntimeout(1) doesn\u0027t make specific mention of what happens with a zero timeout, but inspection of the source shows [1] it does a timer_settime() of zero as you\u0027d expect which just deletes the timer it created.  So it seems safe to just always run under timeout.\n\nI\u0027m not sure what a good default for GIT_TIMEOUT is other than 0 ... seems too dependent on expected connection speed \u0026 size of repos\n\n[1] http://git.savannah.gnu.org/gitweb/?p\u003dcoreutils.git;a\u003dblob;f\u003dsrc/timeout.c;h\u003d23d89415906e1010efe3c5ddea0f11986801b5b9;hb\u003dHEAD","commit_id":"c5e355cc099253b0614f51141afc77a77def9e9d"},{"author":{"_account_id":970,"name":"Dean Troyer","email":"dtroyer@gmail.com","username":"dtroyer"},"change_message_id":"6a03d5eb71cfe264dc2ff3ca17a3e72cdb2b1fd8","unresolved":false,"context_lines":[{"line_number":476,"context_line":""},{"line_number":477,"context_line":"    until timeout -s SIGINT ${GIT_TIMEOUT} git \"$@\"; do"},{"line_number":478,"context_line":"\tcount\u003d$(($count + 1))"},{"line_number":479,"context_line":"\techo \"timeout ${count} for git call: [git $@]\""},{"line_number":480,"context_line":"\tif [ $count -eq 3 ]; then"},{"line_number":481,"context_line":"\t    echo \"Maximum of 3 retries reached\""},{"line_number":482,"context_line":"\t    return 1"}],"source_content_type":"application/octet-stream","patch_set":1,"id":"AAAAUX%2F%2BoE0%3D","line":479,"updated":"2014-02-20 06:00:14.000000000","message":"use warn() here","commit_id":"c5e355cc099253b0614f51141afc77a77def9e9d"},{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"7aefd0e488052ed15a8a0b5945c4d7f3a56d3816","unresolved":false,"context_lines":[{"line_number":476,"context_line":""},{"line_number":477,"context_line":"    until timeout -s SIGINT ${GIT_TIMEOUT} git \"$@\"; do"},{"line_number":478,"context_line":"\tcount\u003d$(($count + 1))"},{"line_number":479,"context_line":"\techo \"timeout ${count} for git call: [git $@]\""},{"line_number":480,"context_line":"\tif [ $count -eq 3 ]; then"},{"line_number":481,"context_line":"\t    echo \"Maximum of 3 retries reached\""},{"line_number":482,"context_line":"\t    return 1"}],"source_content_type":"application/octet-stream","patch_set":1,"id":"AAAAUX%2F%2Be40%3D","line":479,"in_reply_to":"AAAAUX%2F%2BoE0%3D","updated":"2014-02-21 00:47:47.000000000","message":"Done","commit_id":"c5e355cc099253b0614f51141afc77a77def9e9d"},{"author":{"_account_id":970,"name":"Dean Troyer","email":"dtroyer@gmail.com","username":"dtroyer"},"change_message_id":"6a03d5eb71cfe264dc2ff3ca17a3e72cdb2b1fd8","unresolved":false,"context_lines":[{"line_number":478,"context_line":"\tcount\u003d$(($count + 1))"},{"line_number":479,"context_line":"\techo \"timeout ${count} for git call: [git $@]\""},{"line_number":480,"context_line":"\tif [ $count -eq 3 ]; then"},{"line_number":481,"context_line":"\t    echo \"Maximum of 3 retries reached\""},{"line_number":482,"context_line":"\t    return 1"},{"line_number":483,"context_line":"\tfi"},{"line_number":484,"context_line":"\tsleep 5"}],"source_content_type":"application/octet-stream","patch_set":1,"id":"AAAAUX%2F%2BoOQ%3D","line":481,"updated":"2014-02-20 06:00:14.000000000","message":"Use err() here, or if we\u0027re going to abort anyway, die()","commit_id":"c5e355cc099253b0614f51141afc77a77def9e9d"},{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"7aefd0e488052ed15a8a0b5945c4d7f3a56d3816","unresolved":false,"context_lines":[{"line_number":478,"context_line":"\tcount\u003d$(($count + 1))"},{"line_number":479,"context_line":"\techo \"timeout ${count} for git call: [git $@]\""},{"line_number":480,"context_line":"\tif [ $count -eq 3 ]; then"},{"line_number":481,"context_line":"\t    echo \"Maximum of 3 retries reached\""},{"line_number":482,"context_line":"\t    return 1"},{"line_number":483,"context_line":"\tfi"},{"line_number":484,"context_line":"\tsleep 5"}],"source_content_type":"application/octet-stream","patch_set":1,"id":"AAAAUX%2F%2Be4M%3D","line":481,"in_reply_to":"AAAAUX%2F%2BoOQ%3D","updated":"2014-02-21 00:47:47.000000000","message":"Changed to a \"die\" because things will not go well if the repo wasn\u0027t cloned","commit_id":"c5e355cc099253b0614f51141afc77a77def9e9d"},{"author":{"_account_id":970,"name":"Dean Troyer","email":"dtroyer@gmail.com","username":"dtroyer"},"change_message_id":"6a03d5eb71cfe264dc2ff3ca17a3e72cdb2b1fd8","unresolved":false,"context_lines":[{"line_number":486,"context_line":""},{"line_number":487,"context_line":"}"},{"line_number":488,"context_line":""},{"line_number":489,"context_line":""},{"line_number":490,"context_line":""},{"line_number":491,"context_line":"# Returns openstack release name for a given branch name"},{"line_number":492,"context_line":"# ``get_release_name_from_branch branch-name``"}],"source_content_type":"application/octet-stream","patch_set":1,"id":"AAAAUX%2F%2BoHA%3D","line":489,"updated":"2014-02-20 06:00:14.000000000","message":"only one blank line between functions","commit_id":"c5e355cc099253b0614f51141afc77a77def9e9d"},{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"7aefd0e488052ed15a8a0b5945c4d7f3a56d3816","unresolved":false,"context_lines":[{"line_number":486,"context_line":""},{"line_number":487,"context_line":"}"},{"line_number":488,"context_line":""},{"line_number":489,"context_line":""},{"line_number":490,"context_line":""},{"line_number":491,"context_line":"# Returns openstack release name for a given branch name"},{"line_number":492,"context_line":"# ``get_release_name_from_branch branch-name``"}],"source_content_type":"application/octet-stream","patch_set":1,"id":"AAAAUX%2F%2Be4E%3D","line":489,"in_reply_to":"AAAAUX%2F%2BoHA%3D","updated":"2014-02-21 00:47:47.000000000","message":"Done","commit_id":"c5e355cc099253b0614f51141afc77a77def9e9d"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"db0f9cb8a2055529de9509eb7425699f92a7c7bf","unresolved":false,"context_lines":[{"line_number":568,"context_line":"        if [ $count -eq 3 ]; then"},{"line_number":569,"context_line":"            die $LINENO \"Maximum of 3 git retries reached\""},{"line_number":570,"context_line":"        fi"},{"line_number":571,"context_line":"        sleep 5"},{"line_number":572,"context_line":"    done"},{"line_number":573,"context_line":"}"},{"line_number":574,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":4,"id":"AAAAVX%2F%2F%2F7s%3D","line":571,"updated":"2014-02-26 22:39:18.000000000","message":"Should this be a random sleep? (Thinking mostly about the gate and thundering herd issues)","commit_id":"d53ad0b07d3e7bdd2668c2d3f1815d95d4b8f532"},{"author":{"_account_id":970,"name":"Dean Troyer","email":"dtroyer@gmail.com","username":"dtroyer"},"change_message_id":"35e7097d30473aa3ea7931a02e9f878c5c803cf1","unresolved":false,"context_lines":[{"line_number":568,"context_line":"        if [ $count -eq 3 ]; then"},{"line_number":569,"context_line":"            die $LINENO \"Maximum of 3 git retries reached\""},{"line_number":570,"context_line":"        fi"},{"line_number":571,"context_line":"        sleep 5"},{"line_number":572,"context_line":"    done"},{"line_number":573,"context_line":"}"},{"line_number":574,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":4,"id":"AAAAVX%2F%2F%2FeI%3D","line":571,"in_reply_to":"AAAAVX%2F%2F%2F7s%3D","updated":"2014-02-26 23:45:52.000000000","message":"Will this even hit in the gate?  Two of the three branches above have a check for ERROR_ON_CLONE and the third is RECLONE\u003dTrue, which I didn\u0027t thing was set in the gate.","commit_id":"d53ad0b07d3e7bdd2668c2d3f1815d95d4b8f532"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"c6e828531df4a9a682f7266f7b809bdc160f8e65","unresolved":false,"context_lines":[{"line_number":568,"context_line":"        if [ $count -eq 3 ]; then"},{"line_number":569,"context_line":"            die $LINENO \"Maximum of 3 git retries reached\""},{"line_number":570,"context_line":"        fi"},{"line_number":571,"context_line":"        sleep 5"},{"line_number":572,"context_line":"    done"},{"line_number":573,"context_line":"}"},{"line_number":574,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":4,"id":"AAAAVX%2F%2F%2FcY%3D","line":571,"in_reply_to":"AAAAVX%2F%2F%2FeI%3D","updated":"2014-02-26 23:48:24.000000000","message":"Any of the git fetches will hit in the gate but no the git clones. Probably not terrible to just do fetches like this in the gate.","commit_id":"d53ad0b07d3e7bdd2668c2d3f1815d95d4b8f532"}],"stack.sh":[{"author":{"_account_id":970,"name":"Dean Troyer","email":"dtroyer@gmail.com","username":"dtroyer"},"change_message_id":"6a03d5eb71cfe264dc2ff3ca17a3e72cdb2b1fd8","unresolved":false,"context_lines":[{"line_number":322,"context_line":"#  for days."},{"line_number":323,"context_line":"#"},{"line_number":324,"context_line":"# Zero disables timeouts"},{"line_number":325,"context_line":"GIT_TIMEOUT\u003d${GIT_TIMEOUT:-0}"},{"line_number":326,"context_line":""},{"line_number":327,"context_line":""},{"line_number":328,"context_line":"# Configure Projects"}],"source_content_type":"text/x-sh","patch_set":1,"id":"AAAAUX%2F%2BoCo%3D","line":325,"updated":"2014-02-20 06:00:14.000000000","message":"This should be in stackrc as git_clone() is called from more than just stack.sh.","commit_id":"c5e355cc099253b0614f51141afc77a77def9e9d"},{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"7aefd0e488052ed15a8a0b5945c4d7f3a56d3816","unresolved":false,"context_lines":[{"line_number":322,"context_line":"#  for days."},{"line_number":323,"context_line":"#"},{"line_number":324,"context_line":"# Zero disables timeouts"},{"line_number":325,"context_line":"GIT_TIMEOUT\u003d${GIT_TIMEOUT:-0}"},{"line_number":326,"context_line":""},{"line_number":327,"context_line":""},{"line_number":328,"context_line":"# Configure Projects"}],"source_content_type":"text/x-sh","patch_set":1,"id":"AAAAUX%2F%2Bexg%3D","line":325,"in_reply_to":"AAAAUX%2F%2BoCo%3D","updated":"2014-02-21 00:47:47.000000000","message":"Done","commit_id":"c5e355cc099253b0614f51141afc77a77def9e9d"}]}
