test(tooling): the repo-stats suite tells a sparse model from a padded one, and --out refuses a foreign CSV (improvise-1xfb.5.1)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VdfEGXA7aJ6ftMsCc9PJze
This commit is contained in:
committed by
Edward Langley
parent
3564410952
commit
4ef847ce30
@@ -302,6 +302,12 @@ def main():
|
||||
ap.add_argument("-C", dest="repo", default=".", help="the repository (default .)")
|
||||
a = ap.parse_args()
|
||||
os.makedirs(a.out, exist_ok=True)
|
||||
ours = {f"{n}.csv" for n in ["churn"] + ANALYSES}
|
||||
foreign = sorted(f for f in os.listdir(a.out) if f.lower().endswith(".csv") and f not in ours)
|
||||
if foreign:
|
||||
print(f"repo-stats: {a.out} holds CSVs this script did not write, and "
|
||||
f"`improvise import` would merge them: {', '.join(foreign)}", file=sys.stderr)
|
||||
return 2
|
||||
try:
|
||||
r = report(a.repo, a.ref, a.since, a.min_revs, os.path.abspath(a.out))
|
||||
except ImproviseFailed as e:
|
||||
|
||||
Reference in New Issue
Block a user