added, removed, modified, rebuilded = [], [], [], []
package_names = set(old.__dict__.keys() + new.__dict__.keys())
- def _get_commit_log_delta(old_proj, new_proj, old_commit_id, new_commit_id):
- cache_dir = os.getenv('GIT_CACHE_DIR')
+ def _get_commit_log_delta_internal(old_proj, new_proj, old_commit_id, new_commit_id, cache_dir):
+ if cache_dir is None:
+ cache_dir = os.getenv('GIT_CACHE_DIR')
git_dir = os.path.join(cache_dir, new_proj)
log_filename = 'git_log'
f.close()
return data
+ def _get_commit_log_delta(old_proj, new_proj, old_commit_id, new_commit_id):
+ cache_dir = os.getenv('GIT_CACHE_DIR')
+ logs = _get_commit_log_delta_internal(old_proj, new_proj, old_commit_id, new_commit_id, cache_dir)
+ if not logs or len(logs) <= 0:
+ cache_dir_public = os.getenv('PUBLIC_GIT_CACHE_DIR')
+ if cache_dir_public is None or cache_dir == cache_dir_public:
+ return logs
+ logs2 = _get_commit_log_delta_internal(old_proj, new_proj, old_commit_id, new_commit_id, cache_dir_public)
+ return logs2
+ return logs
+
def _get_git_web(url):
matchdomain = re.match(r"http[s]?://[a-z0-9\.]*", url)
if not matchdomain:
with io.open(os.path.join(dist_path, '%s.csv' % diff_name), 'w', encoding='utf-8', errors='ignore') as fname:
fname.write(output)
return dist_path
+