gitman 3.5.1__tar.gz → 3.5.2a1__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.
- {gitman-3.5.1 → gitman-3.5.2a1}/PKG-INFO +1 -1
- {gitman-3.5.1 → gitman-3.5.2a1}/gitman/commands.py +1 -3
- {gitman-3.5.1 → gitman-3.5.2a1}/gitman/models/config.py +0 -18
- {gitman-3.5.1 → gitman-3.5.2a1}/gitman/tests/test_models_config.py +1 -15
- {gitman-3.5.1 → gitman-3.5.2a1}/pyproject.toml +1 -1
- {gitman-3.5.1 → gitman-3.5.2a1}/LICENSE.md +0 -0
- {gitman-3.5.1 → gitman-3.5.2a1}/README.md +0 -0
- {gitman-3.5.1 → gitman-3.5.2a1}/gitman/__init__.py +0 -0
- {gitman-3.5.1 → gitman-3.5.2a1}/gitman/__main__.py +0 -0
- {gitman-3.5.1 → gitman-3.5.2a1}/gitman/cli.py +0 -0
- {gitman-3.5.1 → gitman-3.5.2a1}/gitman/common.py +0 -0
- {gitman-3.5.1 → gitman-3.5.2a1}/gitman/decorators.py +0 -0
- {gitman-3.5.1 → gitman-3.5.2a1}/gitman/exceptions.py +0 -0
- {gitman-3.5.1 → gitman-3.5.2a1}/gitman/git.py +0 -0
- {gitman-3.5.1 → gitman-3.5.2a1}/gitman/hook-gitman.py +0 -0
- {gitman-3.5.1 → gitman-3.5.2a1}/gitman/models/__init__.py +0 -0
- {gitman-3.5.1 → gitman-3.5.2a1}/gitman/models/group.py +0 -0
- {gitman-3.5.1 → gitman-3.5.2a1}/gitman/models/source.py +0 -0
- {gitman-3.5.1 → gitman-3.5.2a1}/gitman/plugin.py +0 -0
- {gitman-3.5.1 → gitman-3.5.2a1}/gitman/settings.py +0 -0
- {gitman-3.5.1 → gitman-3.5.2a1}/gitman/shell.py +0 -0
- {gitman-3.5.1 → gitman-3.5.2a1}/gitman/tests/__init__.py +0 -0
- {gitman-3.5.1 → gitman-3.5.2a1}/gitman/tests/conftest.py +0 -0
- {gitman-3.5.1 → gitman-3.5.2a1}/gitman/tests/files/gdm-custom.yml +0 -0
- {gitman-3.5.1 → gitman-3.5.2a1}/gitman/tests/files/gdm-default.yml +0 -0
- {gitman-3.5.1 → gitman-3.5.2a1}/gitman/tests/files/gitman.yml +0 -0
- {gitman-3.5.1 → gitman-3.5.2a1}/gitman/tests/files/subdir/gitman.yml +0 -0
- {gitman-3.5.1 → gitman-3.5.2a1}/gitman/tests/files/subdir/subsubdir/gitman.yml +0 -0
- {gitman-3.5.1 → gitman-3.5.2a1}/gitman/tests/files/subdir/subsubdir/skip/subsubsubsubdir/gitman.yml +0 -0
- {gitman-3.5.1 → gitman-3.5.2a1}/gitman/tests/test_cli.py +0 -0
- {gitman-3.5.1 → gitman-3.5.2a1}/gitman/tests/test_commands.py +0 -0
- {gitman-3.5.1 → gitman-3.5.2a1}/gitman/tests/test_common.py +0 -0
- {gitman-3.5.1 → gitman-3.5.2a1}/gitman/tests/test_git.py +0 -0
- {gitman-3.5.1 → gitman-3.5.2a1}/gitman/tests/test_models_group.py +0 -0
- {gitman-3.5.1 → gitman-3.5.2a1}/gitman/tests/test_models_source.py +0 -0
- {gitman-3.5.1 → gitman-3.5.2a1}/gitman/tests/test_plugin.py +0 -0
- {gitman-3.5.1 → gitman-3.5.2a1}/gitman/tests/test_shell.py +0 -0
- {gitman-3.5.1 → gitman-3.5.2a1}/gitman/tests/utils.py +0 -0
|
@@ -8,7 +8,6 @@ from startfile import startfile
|
|
|
8
8
|
from . import common
|
|
9
9
|
from .decorators import preserve_cwd
|
|
10
10
|
from .models import Config, Source, find_nested_configs, load_config
|
|
11
|
-
from .models.config import filter_nested_configs
|
|
12
11
|
|
|
13
12
|
|
|
14
13
|
def init(*, force: bool = False):
|
|
@@ -93,7 +92,6 @@ def install(
|
|
|
93
92
|
config = load_config(root)
|
|
94
93
|
configs = [config] if config else []
|
|
95
94
|
configs.extend(find_nested_configs(root, depth, []))
|
|
96
|
-
configs = filter_nested_configs(configs)
|
|
97
95
|
|
|
98
96
|
if configs:
|
|
99
97
|
count = 0
|
|
@@ -277,7 +275,7 @@ def lock(*names, depth=None, root=None):
|
|
|
277
275
|
config = load_config(root)
|
|
278
276
|
configs = [config] if config else []
|
|
279
277
|
configs.extend(find_nested_configs(root, depth, []))
|
|
280
|
-
|
|
278
|
+
|
|
281
279
|
if configs:
|
|
282
280
|
count = 0
|
|
283
281
|
common.newline()
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import os
|
|
2
2
|
import sys
|
|
3
|
-
from pathlib import Path
|
|
4
3
|
from typing import Iterator, List, Optional
|
|
5
4
|
|
|
6
5
|
import log
|
|
@@ -465,20 +464,3 @@ def _valid_filename(filename):
|
|
|
465
464
|
if name.startswith("."):
|
|
466
465
|
name = name[1:]
|
|
467
466
|
return name in {"gitman", "gdm"} and ext in {".yml", ".yaml"}
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
def filter_nested_configs(configs: List[Config]) -> List[Config]:
|
|
471
|
-
"""Filter subdirectories inside of parent config."""
|
|
472
|
-
filtered_configs = []
|
|
473
|
-
for config_a in configs:
|
|
474
|
-
is_nested = False
|
|
475
|
-
for config_b in configs:
|
|
476
|
-
if config_a == config_b:
|
|
477
|
-
continue
|
|
478
|
-
if Path(config_b.location_path) in Path(config_a.location_path).parents:
|
|
479
|
-
is_nested = True
|
|
480
|
-
break
|
|
481
|
-
if not is_nested:
|
|
482
|
-
filtered_configs.append(config_a)
|
|
483
|
-
|
|
484
|
-
return filtered_configs
|
|
@@ -5,8 +5,7 @@ import os
|
|
|
5
5
|
import pytest
|
|
6
6
|
from expecter import expect
|
|
7
7
|
|
|
8
|
-
from gitman.models import Config,
|
|
9
|
-
from gitman.models.config import filter_nested_configs
|
|
8
|
+
from gitman.models import Config, load_config
|
|
10
9
|
|
|
11
10
|
from .conftest import FILES
|
|
12
11
|
|
|
@@ -149,16 +148,3 @@ class TestLoad:
|
|
|
149
148
|
config = load_config()
|
|
150
149
|
|
|
151
150
|
assert None is config
|
|
152
|
-
|
|
153
|
-
@pytest.mark.integration
|
|
154
|
-
def test_filter_nested_config(self):
|
|
155
|
-
"""Verify that filter_nested_config removes nested configs"""
|
|
156
|
-
config = load_config(FILES)
|
|
157
|
-
assert None is not config
|
|
158
|
-
count = config.install_dependencies(depth=2)
|
|
159
|
-
assert 5 == count
|
|
160
|
-
configs = [config] if config else []
|
|
161
|
-
configs.extend(find_nested_configs(FILES, depth=2, skip_paths=[]))
|
|
162
|
-
assert 2 == len(configs)
|
|
163
|
-
configs = filter_nested_configs(configs)
|
|
164
|
-
assert 1 == len(configs)
|
|
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
|
|
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
|
{gitman-3.5.1 → gitman-3.5.2a1}/gitman/tests/files/subdir/subsubdir/skip/subsubsubsubdir/gitman.yml
RENAMED
|
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
|