Mercurial > hgrepos > Python > apps > py-cutils
comparison cutils/treesum.py @ 328:97bba2295eb3
treesum: parameter validation for "generator"
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Wed, 26 Mar 2025 23:44:03 +0100 |
| parents | 8e62738e7469 |
| children | e2ae72792f56 |
comparison
equal
deleted
inserted
replaced
| 327:8e62738e7469 | 328:97bba2295eb3 |
|---|---|
| 452 if f[0] not in ("exclude", "include"): | 452 if f[0] not in ("exclude", "include"): |
| 453 raise ValueError( | 453 raise ValueError( |
| 454 "every kind of every item in `fnmatch_filters' must be" | 454 "every kind of every item in `fnmatch_filters' must be" |
| 455 " \"include\", \"exclude\" or \"accept-treesum\"" | 455 " \"include\", \"exclude\" or \"accept-treesum\"" |
| 456 ) | 456 ) |
| 457 if generator not in ("normal", "full", "none"): | |
| 458 raise ValueError("given generator `%s' not allowed" % (generator, )) | |
| 457 if output_tyle not in ("tagged", "tag"): | 459 if output_tyle not in ("tagged", "tag"): |
| 458 raise ValueError( | 460 raise ValueError( |
| 459 "given output_style `%s' not allowed" % (output_style,)) | 461 "given output_style `%s' not allowed" % (output_style,)) |
| 460 | 462 |
| 461 # Not following symlinks to files is not yet supported: reset to True | 463 # Not following symlinks to files is not yet supported: reset to True |
