fr = FileRevs(db, connection, read_cursor, repo_id) i = 0 # Loop through each file and its revision for revision, commit_id, file_id, action_type, composed in fr: if action_type == "D": continue # loop_start = datetime.now() if file_id not in code_files: continue if (file_id, commit_id) in existing_content: continue try: relative_path = fr.get_path(repo, path or repo.get_uri()) except TypeError as e: printerr("No path found for file %d at commit %d", (file_id, commit_id)) continue if composed: rev = revision.split("|")[0] else: rev = revision printdbg("Path for %d at %s -> %s", (file_id, rev, relative_path)) # Ignore SVN tags if repo.get_type() == "svn" and relative_path == "tags": printdbg("Skipping file %s", (relative_path,)) continue
n_blames = 0 fr = FileRevs (db, cnn, read_cursor, repoid) for revision, commit_id, file_id, action_type, composed in fr: if file_id not in code_files: continue if (file_id, commit_id) in blames: printdbg ("%d@%d is already in the database, skip it", (file_id, commit_id)) continue if composed: rev = revision.split ("|")[0] else: rev = revision relative_path = fr.get_path () printdbg ("Path for %d at %s -> %s", (file_id, rev, relative_path)) if repo.get_type () == 'svn' and relative_path == 'tags': printdbg ("Skipping file %s", (relative_path,)) continue job = BlameJob (file_id, commit_id, relative_path, rev) job_pool.push (job) n_blames += 1 if n_blames >= self.MAX_BLAMES: job_pool.join() self.process_finished_jobs (job_pool, write_cursor) n_blames = 0 job_pool.join ()
fr = FileRevs(db, connection, read_cursor, repo_id) i = 0 # Loop through each file and its revision for revision, commit_id, file_id, action_type, composed in fr: if action_type == 'D': continue # loop_start = datetime.now() if file_id not in code_files: continue if (file_id, commit_id) in existing_content: continue try: relative_path = fr.get_path(repo, path or repo.get_uri()) except TypeError as e: printerr("No path found for file %d at commit %d", (file_id, commit_id)) continue if composed: rev = revision.split("|")[0] else: rev = revision printdbg("Path for %d at %s -> %s", (file_id, rev, relative_path)) # Ignore SVN tags if repo.get_type() == 'svn' and relative_path == 'tags': printdbg("Skipping file %s", (relative_path,)) continue