polygit 0.3.2__py3-none-any.whl → 0.3.4__py3-none-any.whl
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.
- polygit/repos.py +12 -16
- {polygit-0.3.2.dist-info → polygit-0.3.4.dist-info}/METADATA +3 -3
- polygit-0.3.4.dist-info/RECORD +10 -0
- polygit-0.3.2.dist-info/RECORD +0 -10
- {polygit-0.3.2.dist-info → polygit-0.3.4.dist-info}/WHEEL +0 -0
- {polygit-0.3.2.dist-info → polygit-0.3.4.dist-info}/entry_points.txt +0 -0
- {polygit-0.3.2.dist-info → polygit-0.3.4.dist-info}/licenses/LICENSE.txt +0 -0
polygit/repos.py
CHANGED
|
@@ -40,28 +40,24 @@ def del_nested(d, keys):
|
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
def _add_to_config(config, fs_platform, local_path, remote_url):
|
|
43
|
-
"""Insert a repo entry into the config data structure.
|
|
43
|
+
"""Insert a repo entry into the config data structure.
|
|
44
|
+
|
|
45
|
+
Always nests under the *local* namespace (the repo's actual directory
|
|
46
|
+
location), with a `{remote: ...}` override when the remote path differs
|
|
47
|
+
— e.g. a repo cloned under a local namespace unrelated to its remote
|
|
48
|
+
org/namespace.
|
|
49
|
+
"""
|
|
44
50
|
local_parts = local_path.split("/")
|
|
45
51
|
local_name = local_parts[-1]
|
|
52
|
+
local_ns = "/".join(local_parts[:-1])
|
|
46
53
|
_, remote_path = parse_remote_url(remote_url)
|
|
47
54
|
platform_data = config.setdefault(fs_platform, {})
|
|
55
|
+
ns_data = platform_data.setdefault(local_ns, {})
|
|
48
56
|
|
|
49
|
-
if remote_path:
|
|
50
|
-
|
|
51
|
-
r_name = r_parts[-1]
|
|
52
|
-
r_ns = "/".join(r_parts[:-1])
|
|
53
|
-
ns_data = platform_data.setdefault(r_ns, {})
|
|
54
|
-
if local_path == f"{r_ns}/{r_name}":
|
|
55
|
-
ns_data[r_name] = None
|
|
56
|
-
else:
|
|
57
|
-
sub = local_path[len(r_ns)+1:] if local_path.startswith(r_ns + "/") else local_name
|
|
58
|
-
node = ns_data
|
|
59
|
-
for part in sub.split("/")[:-1]:
|
|
60
|
-
node = node.setdefault(part, {})
|
|
61
|
-
node[sub.split("/")[-1]] = {"remote": remote_path}
|
|
57
|
+
if remote_path and remote_path != local_path:
|
|
58
|
+
ns_data[local_name] = {"remote": remote_path}
|
|
62
59
|
else:
|
|
63
|
-
|
|
64
|
-
platform_data.setdefault(local_ns, {})[local_name] = None
|
|
60
|
+
ns_data[local_name] = None
|
|
65
61
|
|
|
66
62
|
|
|
67
63
|
def cmd_repos(config, base, config_path):
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: polygit
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.4
|
|
4
4
|
Summary: Manage multiple git repos from a single .pgit config file.
|
|
5
|
-
Project-URL: Repository, https://
|
|
5
|
+
Project-URL: Repository, https://github.com/gschaetz/polygit
|
|
6
6
|
Author-email: Gary Schaetz <gary@schaetzkc.com>
|
|
7
7
|
License: MIT License
|
|
8
8
|
|
|
@@ -36,7 +36,7 @@ Description-Content-Type: text/markdown
|
|
|
36
36
|
Manage multiple git repos from a single `.pgit` config file.
|
|
37
37
|
|
|
38
38
|
```bash
|
|
39
|
-
|
|
39
|
+
uv tool install polygit
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
## Usage
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
polygit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
polygit/cli.py,sha256=t55G_27aWlqScA3mQeRVFg1HwitpzBYOATn3qVl7Ulk,2163
|
|
3
|
+
polygit/config.py,sha256=3lZCp073173cskTxXpqNjP8bk50QuYstz0zKLCEieQY,1378
|
|
4
|
+
polygit/repo.py,sha256=ZFXeE5YNygGTloyOPiOx_Q67-lqzZxN62nZI7HWfKWs,8945
|
|
5
|
+
polygit/repos.py,sha256=PGgO1Om9nItJEBc1LqWtbj_n9eVJieZzbNiaPP7QBc0,9417
|
|
6
|
+
polygit-0.3.4.dist-info/METADATA,sha256=ytB43uL28ldH30_NowocDtfDQO9PJ7ciTB1VrcI3SKw,3586
|
|
7
|
+
polygit-0.3.4.dist-info/WHEEL,sha256=lCkmxWfQsSc9CfIClYeavTdQeEX2toPqufh9gI35EQA,87
|
|
8
|
+
polygit-0.3.4.dist-info/entry_points.txt,sha256=hBPbWbQygzHXMfwect-YNoaVPFh1_9EMfIo4ec3EY_A,42
|
|
9
|
+
polygit-0.3.4.dist-info/licenses/LICENSE.txt,sha256=YxFgIp_vc7jYYhGaqNWuAcBNNenp4Kgnj622VLgew_U,1069
|
|
10
|
+
polygit-0.3.4.dist-info/RECORD,,
|
polygit-0.3.2.dist-info/RECORD
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
polygit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
polygit/cli.py,sha256=t55G_27aWlqScA3mQeRVFg1HwitpzBYOATn3qVl7Ulk,2163
|
|
3
|
-
polygit/config.py,sha256=3lZCp073173cskTxXpqNjP8bk50QuYstz0zKLCEieQY,1378
|
|
4
|
-
polygit/repo.py,sha256=ZFXeE5YNygGTloyOPiOx_Q67-lqzZxN62nZI7HWfKWs,8945
|
|
5
|
-
polygit/repos.py,sha256=1X4xpA7d32cdHt--v2-1yRjw4uiMxGRrWz-uMw27zfE,9602
|
|
6
|
-
polygit-0.3.2.dist-info/METADATA,sha256=B8HjmyZ5UJlANhuagBpoNTahAozrDIq0X1VCRLbDHx4,3593
|
|
7
|
-
polygit-0.3.2.dist-info/WHEEL,sha256=lCkmxWfQsSc9CfIClYeavTdQeEX2toPqufh9gI35EQA,87
|
|
8
|
-
polygit-0.3.2.dist-info/entry_points.txt,sha256=hBPbWbQygzHXMfwect-YNoaVPFh1_9EMfIo4ec3EY_A,42
|
|
9
|
-
polygit-0.3.2.dist-info/licenses/LICENSE.txt,sha256=YxFgIp_vc7jYYhGaqNWuAcBNNenp4Kgnj622VLgew_U,1069
|
|
10
|
-
polygit-0.3.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|