git-editlog 1.0.1__tar.gz → 1.0.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {git_editlog-1.0.1/git_editlog.egg-info → git_editlog-1.0.2}/PKG-INFO +1 -1
- {git_editlog-1.0.1 → git_editlog-1.0.2}/git_editlog/__init__.py +1 -1
- {git_editlog-1.0.1 → git_editlog-1.0.2}/git_editlog/__main__.py +34 -11
- {git_editlog-1.0.1 → git_editlog-1.0.2/git_editlog.egg-info}/PKG-INFO +1 -1
- {git_editlog-1.0.1 → git_editlog-1.0.2}/LICENSE +0 -0
- {git_editlog-1.0.1 → git_editlog-1.0.2}/MANIFEST.in +0 -0
- {git_editlog-1.0.1 → git_editlog-1.0.2}/README.md +0 -0
- {git_editlog-1.0.1 → git_editlog-1.0.2}/git_editlog/pyinotify.py +0 -0
- {git_editlog-1.0.1 → git_editlog-1.0.2}/git_editlog/pyinotify_watcher.py +0 -0
- {git_editlog-1.0.1 → git_editlog-1.0.2}/git_editlog/repo_watcher.py +0 -0
- {git_editlog-1.0.1 → git_editlog-1.0.2}/git_editlog/watchdog_watcher.py +0 -0
- {git_editlog-1.0.1 → git_editlog-1.0.2}/git_editlog.egg-info/SOURCES.txt +0 -0
- {git_editlog-1.0.1 → git_editlog-1.0.2}/git_editlog.egg-info/dependency_links.txt +0 -0
- {git_editlog-1.0.1 → git_editlog-1.0.2}/git_editlog.egg-info/entry_points.txt +0 -0
- {git_editlog-1.0.1 → git_editlog-1.0.2}/git_editlog.egg-info/requires.txt +0 -0
- {git_editlog-1.0.1 → git_editlog-1.0.2}/git_editlog.egg-info/top_level.txt +0 -0
- {git_editlog-1.0.1 → git_editlog-1.0.2}/pyproject.toml +0 -0
- {git_editlog-1.0.1 → git_editlog-1.0.2}/setup.cfg +0 -0
|
@@ -22,9 +22,36 @@ def setup_python_logging(verbose=False):
|
|
|
22
22
|
console_handler.setFormatter(log_formatter)
|
|
23
23
|
root.addHandler(console_handler)
|
|
24
24
|
|
|
25
|
+
|
|
26
|
+
def add_repo_list(fpath, repo_paths, seen_paths, limit):
|
|
27
|
+
cdir = fpath.parent
|
|
28
|
+
with fpath.open(encoding='utf8') as fp:
|
|
29
|
+
for line in fp:
|
|
30
|
+
line = line.strip()
|
|
31
|
+
if not line or line.startswith('#'):
|
|
32
|
+
continue
|
|
33
|
+
add_repo(cdir, line, repo_paths, seen_paths, limit - 1)
|
|
34
|
+
|
|
35
|
+
def add_repo(cdir, name, repo_paths, seen_paths, limit=10):
|
|
36
|
+
if is_list := name.startswith('@'):
|
|
37
|
+
name = name[1:].lstrip()
|
|
38
|
+
|
|
39
|
+
path = cdir / name
|
|
40
|
+
if path in seen_paths:
|
|
41
|
+
return
|
|
42
|
+
|
|
43
|
+
seen_paths.add(path)
|
|
44
|
+
|
|
45
|
+
if is_list:
|
|
46
|
+
if limit <= 0:
|
|
47
|
+
return
|
|
48
|
+
add_repo_list(path, repo_paths, seen_paths, limit)
|
|
49
|
+
else:
|
|
50
|
+
repo_paths.append(path)
|
|
51
|
+
|
|
25
52
|
def main():
|
|
26
53
|
p = argparse.ArgumentParser(description='')
|
|
27
|
-
p.add_argument('repos',
|
|
54
|
+
p.add_argument('repos', nargs='*')
|
|
28
55
|
p.add_argument('-l', '--repo-list', type=Path)
|
|
29
56
|
p.add_argument('-v', '--verbose', action='store_true', help='')
|
|
30
57
|
#p.add_argument(help='')
|
|
@@ -33,20 +60,16 @@ def main():
|
|
|
33
60
|
setup_python_logging(args.verbose)
|
|
34
61
|
|
|
35
62
|
repo_paths = []
|
|
63
|
+
seen_paths = set()
|
|
36
64
|
repo_watchers = []
|
|
65
|
+
|
|
66
|
+
cdir = Path('.')
|
|
67
|
+
|
|
37
68
|
for path in args.repos:
|
|
38
|
-
|
|
69
|
+
add_repo(cdir, path, repo_paths, seen_paths)
|
|
39
70
|
|
|
40
71
|
if args.repo_list:
|
|
41
|
-
|
|
42
|
-
with args.repo_list.open() as fp:
|
|
43
|
-
for line in fp:
|
|
44
|
-
line = line.strip()
|
|
45
|
-
if not line or line.startswith('#'):
|
|
46
|
-
continue
|
|
47
|
-
|
|
48
|
-
path = (base / line).absolute()
|
|
49
|
-
repo_paths.append(path)
|
|
72
|
+
add_repo_list(args.repo_list, repo_paths, seen_paths, 10)
|
|
50
73
|
|
|
51
74
|
for path in repo_paths:
|
|
52
75
|
try:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|