New issue
Advanced search Search tips

Issue 758428 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Aug 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

`git-map-branches --show-subject` crashes

Project Member Reported by lgar...@chromium.org, Aug 24 2017

Issue description

macOS 10.12

What steps will reproduce the problem?
(1) Run `git-map-branches --show-subject` in a Chrome checkout.

What is the expected result?
No crash.

What happens instead?
Traceback (most recent call last):
  File "/Users/lgarron/Code/depot_tools/git_map_branches.py", line 329, in <module>
    sys.exit(main(sys.argv[1:]))
  File "/Users/lgarron/Code/depot_tools/git_map_branches.py", line 323, in main
    mapper.start()
  File "/Users/lgarron/Code/depot_tools/git_map_branches.py", line 171, in start
    self.__append_branch(root)
  File "/Users/lgarron/Code/depot_tools/git_map_branches.py", line 272, in __append_branch
    line.append(run('log', '-n1', '--format=%s', branch, '--'))
  File "/Users/lgarron/Code/depot_tools/git_common.py", line 688, in run
    return run_with_stderr(*cmd, **kwargs)[0]
  File "/Users/lgarron/Code/depot_tools/git_common.py", line 757, in run_with_stderr
    raise subprocess2.CalledProcessError(retcode, cmd, os.getcwd(), ret, err)
subprocess2.CalledProcessError: Command 'git -c color.ui=never log -n1 --format=%s  --' returned non-zero exit status 128 in /Users/lgarron/chromium/src
fatal: bad revision ''
 

Comment 1 by aga...@chromium.org, Aug 28 2017

Owner: aga...@chromium.org
Status: Started (was: Untriaged)
https://chromium-review.googlesource.com/639190
Project Member

Comment 2 by bugdroid1@chromium.org, Aug 28 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/tools/depot_tools/+/6761b9df4ae2886ffa2e3045d708dc2a6e7ec3ff

commit 6761b9df4ae2886ffa2e3045d708dc2a6e7ec3ff
Author: Aaron Gable <agable@chromium.org>
Date: Mon Aug 28 20:36:44 2017

git-map-branches: support no-parent when showing subjects

If one of the "branches" being shown by 'git map-branches' is
the pseudo-branch "{NO_UPSTREAM}", and the user has asked the
command to print the subject line of each branch, it would
crash. This change causes it to gracefully handle that case.

R=lgarron@chromium.org

Bug:  758428 
Change-Id: Id0ff1c6fd90b5efbb07e118ae088e3999c234b67
Reviewed-on: https://chromium-review.googlesource.com/639190
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>

[modify] https://crrev.com/6761b9df4ae2886ffa2e3045d708dc2a6e7ec3ff/git_map_branches.py

Comment 3 by aga...@chromium.org, Aug 28 2017

Status: Fixed (was: Started)
Status: Verified (was: Fixed)
:-D

Sign in to add a comment