Skip to content
Snippets Groups Projects
Commit 1e9aa26a authored by Pierre-Yves David's avatar Pierre-Yves David :octopus:
Browse files

verbose delta-find

parent 890879da
No related tags found
No related merge requests found
......@@ -24,6 +24,7 @@
repo_path = data_env_directory / main_repo
print(' listing chain data')
cmd = [
"hg",
"--repository",
......@@ -36,6 +37,7 @@
proc = subprocess.run(cmd, stdout=subprocess.PIPE, encoding="utf8")
proc.check_returncode()
delta_chain_data = json.loads(proc.stdout)
print(' DONE')
all_info = {}
......@@ -43,6 +45,7 @@
some_snap = {}
all_merge = []
print(' aggregating chain data')
target_type = ("base", "snap")
for rev_info in delta_chain_data:
all_info[rev_info["rev"]] = rev_info
......@@ -51,5 +54,6 @@
if rev_info["deltatype"] not in target_type:
continue
all_snap_rev.append(rev_info["rev"])
print(' DONE')
......@@ -54,5 +58,7 @@
print(' testing last 100 snapshot')
count = 0
for rev in all_snap_rev[-100:]:
cmd = [
"hg",
......@@ -86,5 +92,7 @@
break
if data is not None:
some_snap[rev] = data
count += 1
print(' %3d%% (rev=%d)' % (count, rev))
items = list(some_snap.items())
......@@ -89,4 +97,5 @@
items = list(some_snap.items())
print(' DONE')
......@@ -91,5 +100,6 @@
print(' picking candidates')
def set_one(key, value):
cmd = [
"poulpe",
......@@ -136,3 +146,5 @@
for i, r in enumerate(max_merge):
c = chr(ord("a") + i)
set_one(f"merge.long-chain-both.{c}", r["rev"])
print(' DONE')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment