Merge "repo_pull: Refactor error handling" am: d3639deadf am: 38629e4d29 am: 33e1ca8aab

Change-Id: I7f6ae17b665f90fc9235b30a4dbbc7aeaaedd62c