)]}'
{"api-ref/source/conf.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"420765a1f64c2e8b4947af96410ef383f162e70b","unresolved":false,"context_lines":[{"line_number":161,"context_line":"git_cmd \u003d [\"git\", \"log\", \"--pretty\u003dformat:\u0027%ad, commit %h\u0027\", \"--date\u003dlocal\","},{"line_number":162,"context_line":"           \"-n1\"]"},{"line_number":163,"context_line":"try:"},{"line_number":164,"context_line":"    html_last_updated_fmt \u003d subprocess.check_output(git_cmd).decode(\u0027utf-8\u0027)"},{"line_number":165,"context_line":"except OSError:"},{"line_number":166,"context_line":"    warnings.warn(\u0027Cannot get last updated time from git repository. \u0027"},{"line_number":167,"context_line":"                  \u0027Not setting \"html_last_updated_fmt\".\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7ffa3b31_363c30c7","line":164,"updated":"2017-04-17 19:42:12.000000000","message":"Looks like we\u0027ve got similar version-grabbing in doc/source/conf.py -- let\u0027s update that one at the same time.","commit_id":"568583030bcec55e525bf4e95a9c1c4af53e582d"},{"author":{"_account_id":20764,"name":"Sachin","email":"psachin@redhat.com","username":"psachin"},"change_message_id":"4d709f5ab274101bbbb5992078028364ab7d1377","unresolved":false,"context_lines":[{"line_number":162,"context_line":"           \"-n1\"]"},{"line_number":163,"context_line":"try:"},{"line_number":164,"context_line":"    html_last_updated_fmt \u003d subprocess.check_output(git_cmd).decode(\u0027utf-8\u0027)"},{"line_number":165,"context_line":"except OSError:"},{"line_number":166,"context_line":"    warnings.warn(\u0027Cannot get last updated time from git repository. \u0027"},{"line_number":167,"context_line":"                  \u0027Not setting \"html_last_updated_fmt\".\u0027)"},{"line_number":168,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7f231b9d_bb68dab8","line":165,"updated":"2017-06-15 04:16:57.000000000","message":"I get following error if I try to run this code snippet when we have no commits\n\n~~~\nfatal: your current branch \u0027master\u0027 does not have any commits yet\nTraceback (most recent call last):\n  File \"../gerrit-review-472534.py\", line 8, in \u003cmodule\u003e\n    h \u003d subprocess.check_output(git_cmd).decode(\u0027utf-8\u0027)\n  File \"/usr/lib64/python3.5/subprocess.py\", line 316, in check_output\n    **kwargs).stdout\n  File \"/usr/lib64/python3.5/subprocess.py\", line 398, in run\n    output\u003dstdout, stderr\u003dstderr)\nsubprocess.CalledProcessError: Command \u0027[\u0027git\u0027, \u0027log\u0027, \"--pretty\u003dformat:\u0027%ad, commit %h\u0027\", \u0027--date\u003dlocal\u0027, \u0027-n1\u0027]\u0027 returned non-zero exit status 128\n~~~\n\nWhereas old code works just fine.\n\nSuggestion:\n~~~\ntry:\n    h \u003d subprocess.check_output(git_cmd).decode(\u0027utf-8\u0027)\nexcept subprocess.CalledProcessError:\n    warnings.warn(\"Cannot get..\")\n~~~","commit_id":"568583030bcec55e525bf4e95a9c1c4af53e582d"},{"author":{"_account_id":20764,"name":"Sachin","email":"psachin@redhat.com","username":"psachin"},"change_message_id":"2d0e1dc658b109008d8eb7c177386e712a3d1472","unresolved":false,"context_lines":[{"line_number":161,"context_line":"git_cmd \u003d [\"git\", \"log\", \"--pretty\u003dformat:\u0027%ad, commit %h\u0027\", \"--date\u003dlocal\","},{"line_number":162,"context_line":"           \"-n1\"]"},{"line_number":163,"context_line":"try:"},{"line_number":164,"context_line":"    html_last_updated_fmt \u003d subprocess.check_output(git_cmd).decode(\u0027utf-8\u0027)"},{"line_number":165,"context_line":"except OSError:"},{"line_number":166,"context_line":"    warnings.warn(\u0027Cannot get last updated time from git repository. \u0027"},{"line_number":167,"context_line":"                  \u0027Not setting \"html_last_updated_fmt\".\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f1a1f67_d92ca503","line":164,"updated":"2017-07-18 07:09:25.000000000","message":"I don\u0027t think we need this any more. Please refer this review: https://review.openstack.org/#/c/478402/","commit_id":"13c2d2d876f6278df09ec86feb582f2e3251270f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"2d6760c27e3f70026135ea39d39ff1eda4d5e626","unresolved":false,"context_lines":[{"line_number":160,"context_line":"# html_last_updated_fmt \u003d \u0027%b %d, %Y\u0027"},{"line_number":161,"context_line":"git_cmd \u003d [\"git\", \"log\", \"--pretty\u003dformat:\u0027%ad, commit %h\u0027\", \"--date\u003dlocal\","},{"line_number":162,"context_line":"           \"-n1\"]"},{"line_number":163,"context_line":"try:"},{"line_number":164,"context_line":"    html_last_updated_fmt \u003d subprocess.check_output(git_cmd).decode(\u0027utf-8\u0027)"},{"line_number":165,"context_line":"except (OSError, subprocess.CalledProcessError):"},{"line_number":166,"context_line":"    warnings.warn(\u0027Cannot get last updated time from git repository. \u0027"},{"line_number":167,"context_line":"                  \u0027Not setting \"html_last_updated_fmt\".\u0027)"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"# If true, SmartyPants will be used to convert quotes and dashes to"},{"line_number":170,"context_line":"# typographically correct entities."}],"source_content_type":"text/x-python","patch_set":4,"id":"9f436f4f_07d39305","line":167,"range":{"start_line":163,"start_character":0,"end_line":167,"end_character":57},"updated":"2017-08-17 08:59:32.000000000","message":"should we have this at all? in doc we got rid of this [1] in favour of a date format which is what the docs guidelines recommends [2]\n\n[1] https://review.openstack.org/#/c/478402/5/doc/source/conf.py\n[2] https://docs.openstack.org/contributor-guide/api-guides.html#how-to-document-your-openstack-api-service","commit_id":"e5a3994baac9adb47555e968f41562a90d7a0ddf"}],"doc/source/conf.py":[{"author":{"_account_id":20764,"name":"Sachin","email":"psachin@redhat.com","username":"psachin"},"change_message_id":"323ed010bd8f1aa7199732aaa27a519e7d42e530","unresolved":false,"context_lines":[{"line_number":162,"context_line":"git_cmd \u003d [\"git\", \"log\", \"--pretty\u003dformat:\u0027%ad, commit %h\u0027\", \"--date\u003dlocal\","},{"line_number":163,"context_line":"           \"-n1\"]"},{"line_number":164,"context_line":"try:"},{"line_number":165,"context_line":"    html_last_updated_fmt \u003d subprocess.check_output(git_cmd).decode(\u0027utf-8\u0027)"},{"line_number":166,"context_line":"except OSError:"},{"line_number":167,"context_line":"    warnings.warn(\u0027Cannot get last updated time from git repository. \u0027"},{"line_number":168,"context_line":"                  \u0027Not setting \"html_last_updated_fmt\".\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f231b9d_1e9d7c09","line":165,"updated":"2017-06-15 06:28:00.000000000","message":"This may be the corner case but a repo with no commits throw below error when building docs\n\n[vagrant@saio swift-457220]$ python setup.py build_sphinx\nrunning build_sphinx\nRunning Sphinx v1.3.6\nfatal: your current branch \u0027master\u0027 does not have any commits yet\nTraceback (most recent call last):\n  File \"setup.py\", line 30, in \u003cmodule\u003e\n    pbr\u003dTrue)\n  File \"/usr/lib64/python2.7/distutils/core.py\", line 151, in setup\n    dist.run_commands()\n  File \"/usr/lib64/python2.7/distutils/dist.py\", line 953, in run_commands\n    self.run_command(cmd)\n  File \"/usr/lib64/python2.7/distutils/dist.py\", line 972, in run_command\n    cmd_obj.run()\n  File \"/usr/lib/python2.7/site-packages/pbr/builddoc.py\", line 198, in run\n    setup_command.BuildDoc.run(self)\n  File \"/usr/lib64/python2.7/site-packages/sphinx/setup_command.py\", line 161, in run\n    freshenv\u003dself.fresh_env)\n  File \"/usr/lib64/python2.7/site-packages/sphinx/application.py\", line 128, in __init__\n    confoverrides or {}, self.tags)\n  File \"/usr/lib64/python2.7/site-packages/sphinx/config.py\", line 277, in __init__\n    execfile_(filename, config)\n  File \"/usr/lib64/python2.7/site-packages/sphinx/util/pycompat.py\", line 128, in execfile_\n    exec_(code, _globals)\n  File \"/usr/lib/python2.7/site-packages/six.py\", line 699, in exec_\n    exec(\"\"\"exec _code_ in _globs_, _locs_\"\"\")\n  File \"\u003cstring\u003e\", line 1, in \u003cmodule\u003e\n  File \"conf.py\", line 166, in \u003cmodule\u003e\n  File \"/usr/lib64/python2.7/subprocess.py\", line 574, in check_output\n    raise CalledProcessError(retcode, cmd, output\u003doutput)\nsubprocess.CalledProcessError: Command \u0027[\u0027git\u0027, \u0027log\u0027, \"--pretty\u003dformat:\u0027%ad, commit %h\u0027\", \u0027--date\u003dlocal\u0027, \u0027-n1\u0027]\u0027 returned non-zero exit status 128\n\n\nUnless proper exception is raised.\n\n[vagrant@saio swift-457220]$ python setup.py build_sphinx\nrunning build_sphinx\nRunning Sphinx v1.3.6\nfatal: your current branch \u0027master\u0027 does not have any commits yet\n\u003cstring\u003e:168: UserWarning: Cannot get last updated time from git repository. Not setting \"html_last_updated_fmt\".\nloading pickled environment... done\nUsing openstack theme from /usr/lib/python2.7/site-packages/oslosphinx/theme\nbuilding [mo]: all of 0 po files\nbuilding [html]: all source files\nupdating environment: 0 added, 0 changed, 0 removed\nlooking for now-outdated files... none found\npreparing documents... done\nwriting output... [100%] ring_background                                                                                                                                                                           \ngenerating indices... genindex py-modindex\nwriting additional pages... search\ncopying images... [100%] images/ec_overview.png                                                                                                                                                                    \ncopying downloadable files... [100%] /home/vagrant/swift-457220/etc/proxy-server.conf-sample                                                                                                                       \ncopying static files... done\ncopying extra files... done\ndumping search index in English (code: en) ... done\ndumping object inventory... done\nbuild succeeded.\nRunning Sphinx v1.3.6\nfatal: your current branch \u0027master\u0027 does not have any commits yet\n\u003cstring\u003e:168: UserWarning: Cannot get last updated time from git repository. Not setting \"html_last_updated_fmt\".\nloading pickled environment... done\nUsing openstack theme from /usr/lib/python2.7/site-packages/oslosphinx/theme\nbuilding [mo]: all of 0 po files\nbuilding [man]: all source files\nupdating environment: 0 added, 0 changed, 0 removed\nlooking for now-outdated files... none found\nwriting... swift.1 { getting_started api/object_api_v1_overview overview_architecture overview_ring overview_policies overview_reaper overview_auth overview_acl overview_replication ratelimit overview_large_objects overview_object_versioning overview_global_cluster overview_container_sync overview_expiring_objects cors crossdomain overview_erasure_code overview_encryption overview_backing_store ring_background associated_projects development_guidelines development_saio first_contribution_swift policies_saio development_auth development_middleware development_ondisk_backends howto_installmultinode deployment_guide apache_deployment_guide admin_guide replication_network logs ops_runbook/index ops_runbook/diagnose ops_runbook/procedures ops_runbook/maintenance ops_runbook/troubleshooting api/discoverability api/authentication api/container_quotas api/object_versioning api/large_objects api/temporary_url_middleware api/form_post_middleware api/use_content-encoding_metadata api/use_the_content-disposition_metadata ring proxy account container db object misc middleware } \nbuild succeeded.","commit_id":"065882f335a50b8f1c98a3890f1073af40812659"}]}
