Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • anlambert/swh-model
  • lunar/swh-model
  • franckbret/swh-model
  • douardda/swh-model
  • olasd/swh-model
  • swh/devel/swh-model
  • Alphare/swh-model
  • samplet/swh-model
  • marmoute/swh-model
  • rboyer/swh-model
10 results
Show changes
......@@ -25,8 +25,8 @@ def toposort(revision_log):
# Add the roots to the processing queue.
queue = collections.deque()
for rev in revision_log:
parents = rev['parents']
in_degree[rev['id']] = len(parents)
parents = rev["parents"]
in_degree[rev["id"]] = len(parents)
if not parents:
queue.append(rev)
for parent in parents:
......@@ -37,7 +37,7 @@ def toposort(revision_log):
while queue:
rev = queue.popleft()
yield rev
for child in children[rev['id']]:
in_degree[child['id']] -= 1
if in_degree[child['id']] == 0:
for child in children[rev["id"]]:
in_degree[child["id"]] -= 1
if in_degree[child["id"]] == 0:
queue.append(child)
This diff is collapsed.
This diff is collapsed.