mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 18:51:29 +00:00
Support dormant branches in the git map-branches output.
This adds support in two ways:
1. Displays a "(dormant)" marker as part of each branch's line when the
verbosity level is four or above. ('git bmap -v -v -v -v ...'). It's
worth noting that, with verbosity level 4, each line is now 119
characters long; verbosity level 3 is 107.
2. Enables callers to hide dormant branches using a new '--hide-dormant'
option. If the dormant branch is the parent of non-dormant branches,
it's still shown, despite being dormant, so that it can continue to
serve as the parent line for non-dormant branches.
Change-Id: I0504419fd12357563288b5d53bc49ca68a876e8f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4654849
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
Commit-Queue: Orr Bernstein <orrb@google.com>
This commit is contained in:
@@ -821,12 +821,13 @@ def run_with_stderr(*cmd, **kwargs):
|
||||
autostrip = kwargs.pop('autostrip', True)
|
||||
indata = kwargs.pop('indata', None)
|
||||
decode = kwargs.pop('decode', True)
|
||||
accepted_retcodes = kwargs.pop('accepted_retcodes', [0])
|
||||
|
||||
cmd = (GIT_EXE, '-c', 'color.ui=never') + cmd
|
||||
proc = subprocess2.Popen(cmd, **kwargs)
|
||||
ret, err = proc.communicate(indata)
|
||||
retcode = proc.wait()
|
||||
if retcode != 0:
|
||||
if retcode not in accepted_retcodes:
|
||||
raise subprocess2.CalledProcessError(retcode, cmd, os.getcwd(), ret, err)
|
||||
|
||||
if autostrip:
|
||||
|
||||
Reference in New Issue
Block a user