Andrew Godwin  committed 9f110a0

Fix new branch calculator

  • Participants
  • Parent commits f298d8e
  • Branches default

Comments (0)

Files changed (1)

File heechee/repo/

         while int(changectx) + 1 > revision:
             # Add the parents of the current thing onto the queue
             for new_changectx in changectx.parents():
-                heapq.heappush((int(new_changectx), new_changectx))
+                heapq.heappush(queue, (int(new_changectx), new_changectx))
             # Get the next changectx
-                revno, changectx = queue.popleft()
+                revno, changectx = heapq.heappop(queue)
                 raise NoBranchError("Cannot find matching changeset for branch '%s'." % branch)
         return changectx
     def _tree_for_branch(self, branch, revision, name, parent):
         Returns the file tree for the given branch at the given revision.