Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pygit2 update #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions git_explode/exploder.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def explode(self, commits, deps_from, deps_on):

while todo:
commit = todo.pop(0)
sha = commit.hex
sha = str(commit.id)
self.logger.debug("Exploding %s" % GitUtils.commit_summary(commit))
if unexploded_deps_from[sha]:
abort("BUG: unexploded deps from %s" %
Expand Down Expand Up @@ -151,7 +151,7 @@ def queue_new_leaves(self, todo, exploded_commit, commits, deps_on,
added to the explode queue.

"""
sha1 = exploded_commit.hex
sha1 = str(exploded_commit.id)
for dependent in deps_on[sha1]:
del unexploded_deps_from[dependent][sha1]
if not unexploded_deps_from[dependent]:
Expand Down
6 changes: 3 additions & 3 deletions git_explode/listener.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ def __init__(self, options):
def new_commit(self, commit):
"""Adds the commit if it doesn't already exist.
"""
sha1 = commit.hex
sha1 = str(commit.id)
for d in (self._dependencies_from, self._dependencies_on):
if sha1 not in d:
d[sha1] = {}

def new_dependency(self, dependee, dependency, path, line_num):
src = dependee.hex
dst = dependency.hex
src = str(dependee.id)
dst = str(dependency.id)

cause = "%s:%d" % (path, line_num)
self._dependencies_from[src][dst] = cause
Expand Down