Commits

Anonymous committed 10d6567

Going top-down seems to be much faster than the opposite direction.

  • Participants
  • Parent commits 6048f94

Comments (0)

Files changed (1)

 
 
 def parenti(ui, repo, build_id, changeset_id):
-    target = repo[build_id];
+    target = repo[changeset_id];
     to_do = deque([]);
-    to_do.append(repo[changeset_id] );
+    to_do.append(repo[build_id] );
     done = set();
     
     while to_do:
             if target == current:
                 ui.write("build_id contains changeset_id\n");
                 return;
-            for c in current.children():
+            for c in current.parents():
                 to_do.append(c);
             done.add(current);