The unified diff between revisions [45753667..] and [b6fdb89f..] is displayed below. It can also be downloaded as a raw diff.
#
#
# patch "on_the_fly.py"
# from [654e1723b44e434d2cf6a3838aafb345a069beb0]
# to [1642fa6940d505fd021081a6eed9f5a93d4dc7cd]
#
============================================================
--- on_the_fly.py 654e1723b44e434d2cf6a3838aafb345a069beb0
+++ on_the_fly.py 1642fa6940d505fd021081a6eed9f5a93d4dc7cd
@@ -92,10 +92,6 @@ def get_rev_graph(db):
for t in lines:
rev = t[0]
pars = t[1:]
- if rev in graph:
- print rev
- print pars
- assert rev not in graph
if not len(pars):
roots.append(rev)
@@ -118,7 +114,7 @@ def cert_leaf_rev(db, graph, frontier):
def cert_leaf_rev(db, graph, frontier):
- rev = frontier.pop(randint(len(frontier)))
+ rev = frontier.pop(randint(0,len(frontier)-1))
assert len(frontier)
monotone(db, "automate cert %s branch %s" % (rev, TEST_BRANCH))
if rev in graph:
@@ -127,7 +123,7 @@ def cert_leaf_revs(db, graph, frontier,
def cert_leaf_revs(db, graph, frontier, revs_per_ns):
- for i in range(num):
+ for i in range(revs_per_ns):
cert_leaf_rev(db, graph, frontier)
def serve(db, branch):
@@ -183,7 +179,7 @@ def main():
print '\r%d' % num_to_go
- cert_leaf_revs(SERVE_DB, graph, frontier, revs_per_ns)
+ cert_leaf_revs(SERVE_DB, graph, roots, revs_per_ns)
serve_pull(SERVE_DB, PULL_DB)