Browse Source

git review -sv gets more verbose

Sometimes it's difficult to understand reason
why git review -s failed since error description
in code is not streamed to stdout.

Change-Id: I59c0deef5f32d10f9e3e7c50dbaffc6a9f59a466
Closes-Bug: #2000234
Dmitry Ratushnyy 4 years ago
parent
commit
fbdff3245e
1 changed files with 6 additions and 5 deletions
  1. 6
    5
      git_review/cmd.py

+ 6
- 5
git_review/cmd.py View File

@@ -331,7 +331,7 @@ def set_hooks_commit_msg(remote, target_file):
331 331
 
332 332
             if VERBOSE:
333 333
                 hook_url = 'scp://%s%s/hooks/commit-msg' \
334
-                    % (userhost, (":%s" % port) if port else "")
334
+                           % (userhost, (":%s" % port) if port else "")
335 335
                 print("Fetching commit hook from: %s" % hook_url)
336 336
             run_command_exc(CannotInstallHook, *cmd)
337 337
 
@@ -341,15 +341,16 @@ def set_hooks_commit_msg(remote, target_file):
341 341
 
342 342
 def test_remote_url(remote_url):
343 343
     """Tests that a possible gerrit remote url works."""
344
-    status, __ = run_command_status("git", "push", "--dry-run", remote_url,
345
-                                    "--all")
344
+    status, description = run_command_status("git", "push", "--dry-run",
345
+                                             remote_url, "--all")
346 346
     if status != 128:
347 347
         if VERBOSE:
348
-            print("%s worked." % remote_url)
348
+            print("%s worked. Description: %s" % (remote_url, description))
349 349
         return True
350 350
     else:
351 351
         if VERBOSE:
352
-            print("%s did not work." % remote_url)
352
+            print("%s did not work. Description: %s" % (
353
+                remote_url, description))
353 354
         return False
354 355
 
355 356
 

Loading…
Cancel
Save