)]}'
{"contrib/zuul_clear_refs.py":[{"author":{"_account_id":6987,"name":"Khai Do","email":"zaro0508@gmail.com","username":"zaro0508"},"change_message_id":"16f6081716f7d6cc556c838dd10aba64faaca55c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"9a80dd14_be79b183","updated":"2015-03-20 17:40:11.000000000","message":"was wondering why you created a contrib folder for this file?  Not that there\u0027s anything wrong with that but there is already a tools folder for this kinda stuff right?","commit_id":"ba76a075782c99ae89c81f87e43e810423b0503e"},{"author":{"_account_id":6987,"name":"Khai Do","email":"zaro0508@gmail.com","username":"zaro0508"},"change_message_id":"16f6081716f7d6cc556c838dd10aba64faaca55c","unresolved":false,"context_lines":[{"line_number":50,"context_line":"args \u003d parser.parse_args()"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"logging.basicConfig()"},{"line_number":53,"context_line":"log \u003d logging.getLogger()"},{"line_number":54,"context_line":"if args.verbose:"},{"line_number":55,"context_line":"    log.setLevel(logging.DEBUG)"},{"line_number":56,"context_line":"else:"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_9e514d10","line":53,"updated":"2015-03-20 17:40:11.000000000","message":"maybe give this logger a name?","commit_id":"ba76a075782c99ae89c81f87e43e810423b0503e"},{"author":{"_account_id":2475,"name":"Antoine Musso","email":"hashar@free.fr","username":"hashar"},"change_message_id":"543324790d9ef90d2cec361628262207749cbf9f","unresolved":false,"context_lines":[{"line_number":50,"context_line":"args \u003d parser.parse_args()"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"logging.basicConfig()"},{"line_number":53,"context_line":"log \u003d logging.getLogger()"},{"line_number":54,"context_line":"if args.verbose:"},{"line_number":55,"context_line":"    log.setLevel(logging.DEBUG)"},{"line_number":56,"context_line":"else:"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a0c5dc1_5b79ba92","line":53,"in_reply_to":"9a80dd14_9e514d10","updated":"2015-05-12 20:52:11.000000000","message":"Named it zuul_clear_refs :)","commit_id":"ba76a075782c99ae89c81f87e43e810423b0503e"},{"author":{"_account_id":2475,"name":"Antoine Musso","email":"hashar@free.fr","username":"hashar"},"change_message_id":"543324790d9ef90d2cec361628262207749cbf9f","unresolved":false,"context_lines":[{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    try:"},{"line_number":69,"context_line":"        commit_ts \u003d ref.commit.committed_date"},{"line_number":70,"context_line":"    except:"},{"line_number":71,"context_line":"        log.exception(\"Error in commit: %s, ref: %s. Type: %s\","},{"line_number":72,"context_line":"            ref.commit, ref.path, type(ref))"},{"line_number":73,"context_line":"        continue"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a0c5dc1_80bc636d","line":70,"updated":"2015-05-12 20:52:11.000000000","message":"Made it to only catch LookupError exceptions.","commit_id":"ba76a075782c99ae89c81f87e43e810423b0503e"},{"author":{"_account_id":6987,"name":"Khai Do","email":"zaro0508@gmail.com","username":"zaro0508"},"change_message_id":"16f6081716f7d6cc556c838dd10aba64faaca55c","unresolved":false,"context_lines":[{"line_number":70,"context_line":"    except:"},{"line_number":71,"context_line":"        log.exception(\"Error in commit: %s, ref: %s. Type: %s\","},{"line_number":72,"context_line":"            ref.commit, ref.path, type(ref))"},{"line_number":73,"context_line":"        continue"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    commit_age \u003d int((NOW - commit_ts) / 86400)  # days"},{"line_number":76,"context_line":"    log.debug("}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_be7ff115","line":73,"updated":"2015-03-20 17:40:11.000000000","message":"maybe add a comment on why you are ignoring this exception?","commit_id":"ba76a075782c99ae89c81f87e43e810423b0503e"},{"author":{"_account_id":2475,"name":"Antoine Musso","email":"hashar@free.fr","username":"hashar"},"change_message_id":"543324790d9ef90d2cec361628262207749cbf9f","unresolved":false,"context_lines":[{"line_number":70,"context_line":"    except:"},{"line_number":71,"context_line":"        log.exception(\"Error in commit: %s, ref: %s. Type: %s\","},{"line_number":72,"context_line":"            ref.commit, ref.path, type(ref))"},{"line_number":73,"context_line":"        continue"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    commit_age \u003d int((NOW - commit_ts) / 86400)  # days"},{"line_number":76,"context_line":"    log.debug("}],"source_content_type":"text/x-python","patch_set":3,"id":"9a0c5dc1_60c16fe4","line":73,"in_reply_to":"9a80dd14_be7ff115","updated":"2015-05-12 20:52:11.000000000","message":"Done","commit_id":"ba76a075782c99ae89c81f87e43e810423b0503e"},{"author":{"_account_id":6987,"name":"Khai Do","email":"zaro0508@gmail.com","username":"zaro0508"},"change_message_id":"16f6081716f7d6cc556c838dd10aba64faaca55c","unresolved":false,"context_lines":[{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    commit_age \u003d int((NOW - commit_ts) / 86400)  # days"},{"line_number":76,"context_line":"    log.debug("},{"line_number":77,"context_line":"        \"%s %3s days %s\","},{"line_number":78,"context_line":"        ref.commit,"},{"line_number":79,"context_line":"        commit_age,"},{"line_number":80,"context_line":"        ref.path,"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_deb66588","line":77,"updated":"2015-03-20 17:40:11.000000000","message":"might be nicer if it\u0027s \n  \n  log.debug(\"%s at %s is %3s days old\", ref.commit, ref.path, commit_age)","commit_id":"ba76a075782c99ae89c81f87e43e810423b0503e"},{"author":{"_account_id":2475,"name":"Antoine Musso","email":"hashar@free.fr","username":"hashar"},"change_message_id":"543324790d9ef90d2cec361628262207749cbf9f","unresolved":false,"context_lines":[{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    commit_age \u003d int((NOW - commit_ts) / 86400)  # days"},{"line_number":76,"context_line":"    log.debug("},{"line_number":77,"context_line":"        \"%s %3s days %s\","},{"line_number":78,"context_line":"        ref.commit,"},{"line_number":79,"context_line":"        commit_age,"},{"line_number":80,"context_line":"        ref.path,"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a0c5dc1_604f2f93","line":77,"in_reply_to":"9a80dd14_deb66588","updated":"2015-05-12 20:52:11.000000000","message":"That change it from:\n\n DEBUG:root:202b6a766525ccdebaef37c460383f79fee0fba3   5 days refs/zuul/REL1_25/Z68c1ae431aa549cd805dfce22178b161\n\nTo:\n\n DEBUG:zuul_clear_ref:93fdaac8690c832432ec00d6387b38c5e61cd7ff at refs/zuul/REL1_25/Z004a37930c254ccda7fcdd71b2836000 is  22 days old\n\nThat indeed make it easier to spot the commit age. Thanks!","commit_id":"ba76a075782c99ae89c81f87e43e810423b0503e"}],"doc/source/merger.rst":[{"author":{"_account_id":7069,"name":"Joshua Hesketh","email":"josh@nitrotech.org","username":"jhesketh"},"change_message_id":"0e3b69ac6f6e1247350c87d8facf00ef9b1c4d9f","unresolved":false,"context_lines":[{"line_number":66,"context_line":"git fetch send them all to Gerrit to sync the repositories, the time"},{"line_number":67,"context_line":"spent on merge will slightly grow overtime and start being noticeable."},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"To clean them you can use zuul-clear-refs.py tool script on each"},{"line_number":70,"context_line":"repositories. It will delete Zuul references that points to commit for"},{"line_number":71,"context_line":"which the commit date is older than a given amount of days (default"},{"line_number":72,"context_line":"360)::"}],"source_content_type":"text/x-rst","patch_set":6,"id":"ba3cc151_c6ffbda8","line":69,"updated":"2015-07-01 09:18:19.000000000","message":"(suggestion)\n\nreplace \u0027zuul-clear-refs.py tool script\u0027\n\nwith \u0027the tools/zuul-clear-refs.py script\u0027","commit_id":"3ee3fe9c1838d5cbbcb934e3bf131db5d26ca809"},{"author":{"_account_id":2475,"name":"Antoine Musso","email":"hashar@free.fr","username":"hashar"},"change_message_id":"2bb9ad6d3f213707083146bb83fbb62c068eb551","unresolved":false,"context_lines":[{"line_number":66,"context_line":"git fetch send them all to Gerrit to sync the repositories, the time"},{"line_number":67,"context_line":"spent on merge will slightly grow overtime and start being noticeable."},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"To clean them you can use zuul-clear-refs.py tool script on each"},{"line_number":70,"context_line":"repositories. It will delete Zuul references that points to commit for"},{"line_number":71,"context_line":"which the commit date is older than a given amount of days (default"},{"line_number":72,"context_line":"360)::"}],"source_content_type":"text/x-rst","patch_set":6,"id":"9a41bdd9_c1d05056","line":69,"in_reply_to":"ba3cc151_c6ffbda8","updated":"2015-07-13 08:55:43.000000000","message":"Done","commit_id":"3ee3fe9c1838d5cbbcb934e3bf131db5d26ca809"},{"author":{"_account_id":7069,"name":"Joshua Hesketh","email":"josh@nitrotech.org","username":"jhesketh"},"change_message_id":"0e3b69ac6f6e1247350c87d8facf00ef9b1c4d9f","unresolved":false,"context_lines":[{"line_number":67,"context_line":"spent on merge will slightly grow overtime and start being noticeable."},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"To clean them you can use zuul-clear-refs.py tool script on each"},{"line_number":70,"context_line":"repositories. It will delete Zuul references that points to commit for"},{"line_number":71,"context_line":"which the commit date is older than a given amount of days (default"},{"line_number":72,"context_line":"360)::"},{"line_number":73,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"ba3cc151_c651fdd9","line":70,"updated":"2015-07-01 09:18:19.000000000","message":"s/points/point\n\ns/commit/commits","commit_id":"3ee3fe9c1838d5cbbcb934e3bf131db5d26ca809"},{"author":{"_account_id":2475,"name":"Antoine Musso","email":"hashar@free.fr","username":"hashar"},"change_message_id":"2bb9ad6d3f213707083146bb83fbb62c068eb551","unresolved":false,"context_lines":[{"line_number":67,"context_line":"spent on merge will slightly grow overtime and start being noticeable."},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"To clean them you can use zuul-clear-refs.py tool script on each"},{"line_number":70,"context_line":"repositories. It will delete Zuul references that points to commit for"},{"line_number":71,"context_line":"which the commit date is older than a given amount of days (default"},{"line_number":72,"context_line":"360)::"},{"line_number":73,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"9a41bdd9_61c2a487","line":70,"in_reply_to":"ba3cc151_c651fdd9","updated":"2015-07-13 08:55:43.000000000","message":"Done","commit_id":"3ee3fe9c1838d5cbbcb934e3bf131db5d26ca809"}],"tools/zuul-clear-refs.py":[{"author":{"_account_id":6987,"name":"Khai Do","email":"zaro0508@gmail.com","username":"zaro0508"},"change_message_id":"2ef831e835b76dc2e34e80254034792a32909246","unresolved":false,"context_lines":[{"line_number":50,"context_line":"args \u003d parser.parse_args()"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"logging.basicConfig()"},{"line_number":53,"context_line":"log \u003d logging.getLogger(\u0027zuul-clear-ref\u0027)"},{"line_number":54,"context_line":"if args.verbose:"},{"line_number":55,"context_line":"    log.setLevel(logging.DEBUG)"},{"line_number":56,"context_line":"else:"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a41bdd9_c10fc7df","line":53,"updated":"2015-07-13 22:03:40.000000000","message":"nit: should this be \u0027zuul-clear-refs\u0027 (missing the \u0027s\u0027)?","commit_id":"dcf61e8a7eeff3ffd3d58292d97d60d1ef89f525"},{"author":{"_account_id":2475,"name":"Antoine Musso","email":"hashar@free.fr","username":"hashar"},"change_message_id":"994ca1ec16bbadf05530281b0b1f21a5e08537b3","unresolved":false,"context_lines":[{"line_number":50,"context_line":"args \u003d parser.parse_args()"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"logging.basicConfig()"},{"line_number":53,"context_line":"log \u003d logging.getLogger(\u0027zuul-clear-ref\u0027)"},{"line_number":54,"context_line":"if args.verbose:"},{"line_number":55,"context_line":"    log.setLevel(logging.DEBUG)"},{"line_number":56,"context_line":"else:"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a50d1a3_95ab6889","line":53,"in_reply_to":"9a41bdd9_c10fc7df","updated":"2015-07-20 16:57:01.000000000","message":"Done","commit_id":"dcf61e8a7eeff3ffd3d58292d97d60d1ef89f525"},{"author":{"_account_id":6987,"name":"Khai Do","email":"zaro0508@gmail.com","username":"zaro0508"},"change_message_id":"2ef831e835b76dc2e34e80254034792a32909246","unresolved":false,"context_lines":[{"line_number":56,"context_line":"else:"},{"line_number":57,"context_line":"    log.setLevel(logging.INFO)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"repo \u003d git.Repo(args.gitrepo)"},{"line_number":60,"context_line":"for ref in repo.references:"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    if not ref.path.startswith(ZUUL_REF_PREFIX):"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a41bdd9_4177373a","line":59,"updated":"2015-07-13 22:03:40.000000000","message":"maybe surround this in try/except to make sure it\u0027s a valid path and a valid Git repository?","commit_id":"dcf61e8a7eeff3ffd3d58292d97d60d1ef89f525"},{"author":{"_account_id":2475,"name":"Antoine Musso","email":"hashar@free.fr","username":"hashar"},"change_message_id":"994ca1ec16bbadf05530281b0b1f21a5e08537b3","unresolved":false,"context_lines":[{"line_number":56,"context_line":"else:"},{"line_number":57,"context_line":"    log.setLevel(logging.INFO)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"repo \u003d git.Repo(args.gitrepo)"},{"line_number":60,"context_line":"for ref in repo.references:"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    if not ref.path.startswith(ZUUL_REF_PREFIX):"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a50d1a3_95d128d0","line":59,"in_reply_to":"9a41bdd9_4177373a","updated":"2015-07-20 16:57:01.000000000","message":"Yup good point. Did it by catching git.exc.InvalidGitRepositoryError and doing a sys.exit(1).","commit_id":"dcf61e8a7eeff3ffd3d58292d97d60d1ef89f525"},{"author":{"_account_id":6987,"name":"Khai Do","email":"zaro0508@gmail.com","username":"zaro0508"},"change_message_id":"2ef831e835b76dc2e34e80254034792a32909246","unresolved":false,"context_lines":[{"line_number":82,"context_line":"    )"},{"line_number":83,"context_line":"    if commit_age \u003e args.days_ago:"},{"line_number":84,"context_line":"        if args.dryrun:"},{"line_number":85,"context_line":"            log.info(\"Would delete old ref: %s\", ref.path)"},{"line_number":86,"context_line":"        else:"},{"line_number":87,"context_line":"            log.info(\"Deleting old ref: %s\", ref.path)"},{"line_number":88,"context_line":"            ref.delete(repo, ref.path)"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a41bdd9_e1d44bbe","line":85,"updated":"2015-07-13 22:03:40.000000000","message":"should we maybe log the ref.commit as well? in here and in the else case?","commit_id":"dcf61e8a7eeff3ffd3d58292d97d60d1ef89f525"},{"author":{"_account_id":2475,"name":"Antoine Musso","email":"hashar@free.fr","username":"hashar"},"change_message_id":"994ca1ec16bbadf05530281b0b1f21a5e08537b3","unresolved":false,"context_lines":[{"line_number":82,"context_line":"    )"},{"line_number":83,"context_line":"    if commit_age \u003e args.days_ago:"},{"line_number":84,"context_line":"        if args.dryrun:"},{"line_number":85,"context_line":"            log.info(\"Would delete old ref: %s\", ref.path)"},{"line_number":86,"context_line":"        else:"},{"line_number":87,"context_line":"            log.info(\"Deleting old ref: %s\", ref.path)"},{"line_number":88,"context_line":"            ref.delete(repo, ref.path)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a50d1a3_7587bcb5","line":85,"in_reply_to":"9a41bdd9_e1d44bbe","updated":"2015-07-20 16:57:01.000000000","message":"Done","commit_id":"dcf61e8a7eeff3ffd3d58292d97d60d1ef89f525"},{"author":{"_account_id":6987,"name":"Khai Do","email":"zaro0508@gmail.com","username":"zaro0508"},"change_message_id":"2ef831e835b76dc2e34e80254034792a32909246","unresolved":false,"context_lines":[{"line_number":85,"context_line":"            log.info(\"Would delete old ref: %s\", ref.path)"},{"line_number":86,"context_line":"        else:"},{"line_number":87,"context_line":"            log.info(\"Deleting old ref: %s\", ref.path)"},{"line_number":88,"context_line":"            ref.delete(repo, ref.path)"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a41bdd9_9ce36205","line":88,"updated":"2015-07-13 22:03:40.000000000","message":"This does a git delete entire ref.path?  I\u0027m wondering if this needs to be more selective?  Can a ref.path contain multiple ref.commits where some would fall within the age range to delete and some fall outside of the range?","commit_id":"dcf61e8a7eeff3ffd3d58292d97d60d1ef89f525"},{"author":{"_account_id":2475,"name":"Antoine Musso","email":"hashar@free.fr","username":"hashar"},"change_message_id":"994ca1ec16bbadf05530281b0b1f21a5e08537b3","unresolved":false,"context_lines":[{"line_number":85,"context_line":"            log.info(\"Would delete old ref: %s\", ref.path)"},{"line_number":86,"context_line":"        else:"},{"line_number":87,"context_line":"            log.info(\"Deleting old ref: %s\", ref.path)"},{"line_number":88,"context_line":"            ref.delete(repo, ref.path)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a50d1a3_583bd7d1","line":88,"in_reply_to":"9a41bdd9_9ce36205","updated":"2015-07-20 16:57:01.000000000","message":"ref is yield by the iteration of all references (repo.references), and I don\u0027t think a ref can point to several commits.","commit_id":"dcf61e8a7eeff3ffd3d58292d97d60d1ef89f525"}]}
