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

Side by Side Diff: appengine/third_party_local/depot_tools/git_common.py

Issue 2013943002: Changing license header, again! (Closed) Base URL: git@github.com:luci/luci-py.git@master
Patch Set: Created 4 years, 7 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 unified diff | Download patch
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # that can be found in the LICENSE file.
4 4
5 # Monkeypatch IMapIterator so that Ctrl-C can kill everything properly. 5 # Monkeypatch IMapIterator so that Ctrl-C can kill everything properly.
6 # Derived from https://gist.github.com/aljungberg/626518 6 # Derived from https://gist.github.com/aljungberg/626518
7 import multiprocessing.pool 7 import multiprocessing.pool
8 from multiprocessing.pool import IMapIterator 8 from multiprocessing.pool import IMapIterator
9 def wrapper(func): 9 def wrapper(func):
10 def wrap(self, timeout=None): 10 def wrap(self, timeout=None):
11 return func(self, timeout=timeout or 1e100) 11 return func(self, timeout=timeout or 1e100)
12 return wrap 12 return wrap
13 IMapIterator.next = wrapper(IMapIterator.next) 13 IMapIterator.next = wrapper(IMapIterator.next)
(...skipping 796 matching lines...) Expand 10 before | Expand all | Expand 10 after
810 hash=branch_hash, upstream=upstream_branch, ahead=ahead, behind=behind) 810 hash=branch_hash, upstream=upstream_branch, ahead=ahead, behind=behind)
811 811
812 # Set None for upstreams which are not branches (e.g empty upstream, remotes 812 # Set None for upstreams which are not branches (e.g empty upstream, remotes
813 # and deleted upstream branches). 813 # and deleted upstream branches).
814 missing_upstreams = {} 814 missing_upstreams = {}
815 for info in info_map.values(): 815 for info in info_map.values():
816 if info.upstream not in info_map and info.upstream not in missing_upstreams: 816 if info.upstream not in info_map and info.upstream not in missing_upstreams:
817 missing_upstreams[info.upstream] = None 817 missing_upstreams[info.upstream] = None
818 818
819 return dict(info_map.items() + missing_upstreams.items()) 819 return dict(info_map.items() + missing_upstreams.items())
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698