Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(440)

Unified Diff: git_map_branches.py

Issue 536793002: Skip tracking status in map-branches when -v flag is not supplied. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« git_common.py ('K') | « git_common.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: git_map_branches.py
diff --git a/git_map_branches.py b/git_map_branches.py
index e18202b56349c9a406b10fe87c02a441911617b0..98134181ed80f0ab8eb4ba08cc0d057d540b4da8 100755
--- a/git_map_branches.py
+++ b/git_map_branches.py
@@ -110,9 +110,12 @@ class BranchMapper(object):
def __init__(self):
self.verbosity = 0
self.output = OutputManager()
- self.__tracking_info = get_all_tracking_info()
self.__gone_branches = set()
Matt Giuca 2014/09/03 03:21:55 Make sure all the fields are initialized in the co
calamity 2014/09/03 04:38:53 Done.
- self.__roots = set()
+
+ def start(self):
+ self.__tracking_info = get_all_tracking_info(
+ include_tracking_status=self.verbosity >= 1)
+ roots = set()
# A map of parents to a list of their children.
self.parent_map = collections.defaultdict(list)
@@ -129,7 +132,7 @@ class BranchMapper(object):
else:
self.__gone_branches.add(parent)
# A parent that isn't in the tracking info is a root.
- self.__roots.add(parent)
+ roots.add(parent)
self.parent_map[parent].append(branch)
@@ -137,8 +140,7 @@ class BranchMapper(object):
self.__current_hash = self.__tracking_info[self.__current_branch].hash
self.__tag_set = tags()
- def start(self):
- for root in sorted(self.__roots):
+ for root in sorted(roots):
self.__append_branch(root)
def __is_invalid_parent(self, parent):
« git_common.py ('K') | « git_common.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698