##// END OF EJS Templates
revlog: subclass the new `repository.iverifyproblem` Protocol class...
revlog: subclass the new `repository.iverifyproblem` Protocol class This is the same transformation as 3a90a6fd710d did for dirstate, but the CamelCase naming was already cleaned up here. We shouldn't have to explicitly subclass, but I'm doing so to test the interplay of regular attributes and the `attrs` class. Also, PyCharm has a nifty feature that puts a jump point in the gutter to navigate back and forth between the base class and subclasses (and override functions and base class functions) when there's an explicit subclassing. Additionally, PyCharm will immediately flag signature mismatches without a 40m pytype run.

File last commit:

r49730:6000f5b2 default
r53365:4ef6dbc2 default
Show More
list-tree.py
24 lines | 617 B | text/x-python | PythonLexer
Augie Fackler
tests: write and use a custom helper script to avoid find's -printf...
r35250 import argparse
import os
ap = argparse.ArgumentParser()
ap.add_argument('path', nargs='+')
opts = ap.parse_args()
Augie Fackler
formatting: blacken the codebase...
r43346
Augie Fackler
tests: write and use a custom helper script to avoid find's -printf...
r35250 def gather():
for p in opts.path:
if not os.path.exists(p):
return
if os.path.isdir(p):
yield p + os.path.sep
for dirpath, dirs, files in os.walk(p):
for d in dirs:
yield os.path.join(dirpath, d) + os.path.sep
for f in files:
yield os.path.join(dirpath, f)
else:
yield p
Augie Fackler
formatting: blacken the codebase...
r43346
Matt Harbison
tests: stabilize the sorted output of list-tree.py on Windows...
r35381 print('\n'.join(sorted(gather(), key=lambda x: x.replace(os.path.sep, '/'))))