git-project-core-plugins 0.1__tar.gz → 0.1.1__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_project_core_plugins-0.1.0 → git_project_core_plugins-0.1.1}/PKG-INFO +2 -2
- {git_project_core_plugins-0.1.0 → git_project_core_plugins-0.1.1}/_version.py +2 -2
- {git_project_core_plugins-0.1.0 → git_project_core_plugins-0.1.1}/docs/changelog.rst +8 -1
- {git_project_core_plugins-0.1.0 → git_project_core_plugins-0.1.1}/requirements.txt +1 -1
- {git_project_core_plugins-0.1.0 → git_project_core_plugins-0.1.1}/src/git_project_core_plugins/branch.py +6 -1
- {git_project_core_plugins-0.1.0 → git_project_core_plugins-0.1.1}/src/git_project_core_plugins/clone.py +4 -1
- {git_project_core_plugins-0.1.0 → git_project_core_plugins-0.1.1}/src/git_project_core_plugins/worktree.py +15 -3
- {git_project_core_plugins-0.1.0 → git_project_core_plugins-0.1.1}/tests/test_branch.py +17 -0
- {git_project_core_plugins-0.1.0 → git_project_core_plugins-0.1.1}/tests/test_clone.py +10 -0
- {git_project_core_plugins-0.1.0 → git_project_core_plugins-0.1.1}/tests/test_worktree.py +25 -0
- {git_project_core_plugins-0.1.0 → git_project_core_plugins-0.1.1}/.gitignore +0 -0
- {git_project_core_plugins-0.1.0 → git_project_core_plugins-0.1.1}/COPYING +0 -0
- {git_project_core_plugins-0.1.0 → git_project_core_plugins-0.1.1}/MANIFEST.in +0 -0
- {git_project_core_plugins-0.1.0 → git_project_core_plugins-0.1.1}/changelog.d/README.rst +0 -0
- {git_project_core_plugins-0.1.0 → git_project_core_plugins-0.1.1}/changelog.py +0 -0
- {git_project_core_plugins-0.1.0 → git_project_core_plugins-0.1.1}/docs/Makefile +0 -0
- {git_project_core_plugins-0.1.0 → git_project_core_plugins-0.1.1}/docs/authors.rst +0 -0
- {git_project_core_plugins-0.1.0 → git_project_core_plugins-0.1.1}/docs/commands.rst +0 -0
- {git_project_core_plugins-0.1.0 → git_project_core_plugins-0.1.1}/docs/conf.py +0 -0
- {git_project_core_plugins-0.1.0 → git_project_core_plugins-0.1.1}/docs/contributing.rst +0 -0
- {git_project_core_plugins-0.1.0 → git_project_core_plugins-0.1.1}/docs/index.rst +0 -0
- {git_project_core_plugins-0.1.0 → git_project_core_plugins-0.1.1}/docs/intro.rst +0 -0
- {git_project_core_plugins-0.1.0 → git_project_core_plugins-0.1.1}/docs/license.rst +0 -0
- {git_project_core_plugins-0.1.0 → git_project_core_plugins-0.1.1}/docs/make.bat +0 -0
- {git_project_core_plugins-0.1.0 → git_project_core_plugins-0.1.1}/hatch_build.py +0 -0
- {git_project_core_plugins-0.1.0 → git_project_core_plugins-0.1.1}/pyproject.toml +0 -0
- {git_project_core_plugins-0.1.0 → git_project_core_plugins-0.1.1}/src/git_project_core_plugins/__init__.py +0 -0
- {git_project_core_plugins-0.1.0 → git_project_core_plugins-0.1.1}/src/git_project_core_plugins/_commanddocs.py +0 -0
- {git_project_core_plugins-0.1.0 → git_project_core_plugins-0.1.1}/src/git_project_core_plugins/artifact.py +0 -0
- {git_project_core_plugins-0.1.0 → git_project_core_plugins-0.1.1}/src/git_project_core_plugins/common.py +0 -0
- {git_project_core_plugins-0.1.0 → git_project_core_plugins-0.1.1}/src/git_project_core_plugins/config.py +0 -0
- {git_project_core_plugins-0.1.0 → git_project_core_plugins-0.1.1}/src/git_project_core_plugins/help.py +0 -0
- {git_project_core_plugins-0.1.0 → git_project_core_plugins-0.1.1}/src/git_project_core_plugins/init.py +0 -0
- {git_project_core_plugins-0.1.0 → git_project_core_plugins-0.1.1}/src/git_project_core_plugins/multirepo.py +0 -0
- {git_project_core_plugins-0.1.0 → git_project_core_plugins-0.1.1}/src/git_project_core_plugins/run.py +0 -0
- {git_project_core_plugins-0.1.0 → git_project_core_plugins-0.1.1}/tests/common.py +0 -0
- {git_project_core_plugins-0.1.0 → git_project_core_plugins-0.1.1}/tests/conftest.py +0 -0
- {git_project_core_plugins-0.1.0 → git_project_core_plugins-0.1.1}/tests/test_artifact.py +0 -0
- {git_project_core_plugins-0.1.0 → git_project_core_plugins-0.1.1}/tests/test_changelog.py +0 -0
- {git_project_core_plugins-0.1.0 → git_project_core_plugins-0.1.1}/tests/test_config.py +0 -0
- {git_project_core_plugins-0.1.0 → git_project_core_plugins-0.1.1}/tests/test_help.py +0 -0
- {git_project_core_plugins-0.1.0 → git_project_core_plugins-0.1.1}/tests/test_init.py +0 -0
- {git_project_core_plugins-0.1.0 → git_project_core_plugins-0.1.1}/tests/test_multirepo.py +0 -0
- {git_project_core_plugins-0.1.0 → git_project_core_plugins-0.1.1}/tests/test_run.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: git-project-core-plugins
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.1
|
|
4
4
|
Summary: The extensible stupid project manager - core functionality
|
|
5
5
|
Author-email: "David A. Greene" <dag@obbligato.org>
|
|
6
6
|
License-Expression: AGPL-3.0-or-later
|
|
@@ -14,7 +14,7 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.11
|
|
15
15
|
Classifier: Topic :: Software Development :: Version Control :: Git
|
|
16
16
|
Requires-Python: >=3.10
|
|
17
|
-
Requires-Dist: git-project>=0.1.
|
|
17
|
+
Requires-Dist: git-project>=0.1.1
|
|
18
18
|
Requires-Dist: pygit2>=1.18.2
|
|
19
19
|
Requires-Dist: pytest-console-scripts
|
|
20
20
|
Provides-Extra: test
|
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '0.1.
|
|
22
|
-
__version_tuple__ = version_tuple = (0, 1,
|
|
21
|
+
__version__ = version = '0.1.1'
|
|
22
|
+
__version_tuple__ = version_tuple = (0, 1, 1)
|
|
23
23
|
|
|
24
24
|
__commit_id__ = commit_id = None
|
|
@@ -31,6 +31,12 @@ ChangeLog
|
|
|
31
31
|
`Unreleased`_
|
|
32
32
|
-------------
|
|
33
33
|
|
|
34
|
+
`0.1.1`_ - 2026-10-19
|
|
35
|
+
---------------------
|
|
36
|
+
Added
|
|
37
|
+
.....
|
|
38
|
+
- ``--menu=json`` hints worktree, branch and clone arguments with ``complete``, and offers the recorded worktree names as ``candidates`` for ``worktree rm``. Needs git-project 0.1.1.
|
|
39
|
+
|
|
34
40
|
`0.1.0`_ - 2026-10-15
|
|
35
41
|
---------------------
|
|
36
42
|
Changed
|
|
@@ -281,7 +287,8 @@ Fixed
|
|
|
281
287
|
404. Issues named ``unknown/greened``, a leftover from hatch's project
|
|
282
288
|
template, and Documentation misspelled the package name.
|
|
283
289
|
|
|
284
|
-
.. _Unreleased: https://github.com/greened/git-project-core-plugins/compare/v0.1.
|
|
290
|
+
.. _Unreleased: https://github.com/greened/git-project-core-plugins/compare/v0.1.1...HEAD
|
|
291
|
+
.. _0.1.1: https://github.com/greened/git-project-core-plugins/compare/v0.1.0...v0.1.1
|
|
285
292
|
.. _0.1.0: https://github.com/greened/git-project-core-plugins/compare/v0.0.33...v0.1.0
|
|
286
293
|
.. _0.0.33: https://github.com/greened/git-project-core-plugins/compare/v0.0.32...v0.0.33
|
|
287
294
|
.. _0.0.32: https://github.com/greened/git-project-core-plugins/compare/v0.0.31...v0.0.32
|
|
@@ -263,10 +263,14 @@ class BranchPlugin(Plugin):
|
|
|
263
263
|
branch_status_parser.add_argument(
|
|
264
264
|
"name_or_ref",
|
|
265
265
|
nargs="?",
|
|
266
|
+
complete="branch",
|
|
266
267
|
help="Branch or pattern to filter branches",
|
|
267
268
|
)
|
|
268
269
|
branch_status_parser.add_argument(
|
|
269
|
-
"target",
|
|
270
|
+
"target",
|
|
271
|
+
nargs="?",
|
|
272
|
+
complete="branch",
|
|
273
|
+
help="Target branch to check against",
|
|
270
274
|
)
|
|
271
275
|
branch_status_parser.add_argument(
|
|
272
276
|
"--all", action="store_true", help="Show all branches"
|
|
@@ -288,6 +292,7 @@ class BranchPlugin(Plugin):
|
|
|
288
292
|
branch_prune_parser.add_argument(
|
|
289
293
|
"name_or_ref",
|
|
290
294
|
nargs="?",
|
|
295
|
+
complete="branch",
|
|
291
296
|
help="Branch name or pattern to filter branches",
|
|
292
297
|
)
|
|
293
298
|
branch_prune_parser.add_argument(
|
|
@@ -93,7 +93,10 @@ class ClonePlugin(Plugin):
|
|
|
93
93
|
clone_parser.add_argument("url", help="URL to clone")
|
|
94
94
|
|
|
95
95
|
clone_parser.add_argument(
|
|
96
|
-
"path",
|
|
96
|
+
"path",
|
|
97
|
+
nargs="?",
|
|
98
|
+
complete="directory",
|
|
99
|
+
help="Local repository location",
|
|
97
100
|
)
|
|
98
101
|
|
|
99
102
|
clone_parser.add_argument(
|
|
@@ -2284,10 +2284,13 @@ class WorktreePlugin(Plugin):
|
|
|
2284
2284
|
worktree_add_parser.set_defaults(func=command_worktree_add)
|
|
2285
2285
|
|
|
2286
2286
|
worktree_add_parser.add_argument(
|
|
2287
|
-
"path", help="Path for worktree checkout"
|
|
2287
|
+
"path", complete="directory", help="Path for worktree checkout"
|
|
2288
2288
|
)
|
|
2289
2289
|
worktree_add_parser.add_argument(
|
|
2290
|
-
"committish",
|
|
2290
|
+
"committish",
|
|
2291
|
+
nargs="?",
|
|
2292
|
+
complete="committish",
|
|
2293
|
+
help="Branch point for worktree",
|
|
2291
2294
|
)
|
|
2292
2295
|
worktree_add_parser.add_argument(
|
|
2293
2296
|
"-b",
|
|
@@ -2313,7 +2316,16 @@ class WorktreePlugin(Plugin):
|
|
|
2313
2316
|
|
|
2314
2317
|
worktree_rm_parser.set_defaults(func=command_worktree_rm)
|
|
2315
2318
|
|
|
2316
|
-
worktree_rm_parser.add_argument(
|
|
2319
|
+
worktree_rm_parser.add_argument(
|
|
2320
|
+
"name",
|
|
2321
|
+
complete="worktree",
|
|
2322
|
+
candidates=sorted(
|
|
2323
|
+
ConfigObject.iter_idents(
|
|
2324
|
+
git, project.get_section(), Worktree.subsection()
|
|
2325
|
+
)
|
|
2326
|
+
),
|
|
2327
|
+
help="Worktree to remove",
|
|
2328
|
+
)
|
|
2317
2329
|
worktree_rm_parser.add_argument(
|
|
2318
2330
|
"-f",
|
|
2319
2331
|
"--force",
|
|
@@ -22,6 +22,8 @@
|
|
|
22
22
|
# with git-project. If not, see <https://www.gnu.org/licenses/>.
|
|
23
23
|
|
|
24
24
|
|
|
25
|
+
import json
|
|
26
|
+
|
|
25
27
|
import common
|
|
26
28
|
|
|
27
29
|
from git_project_core_plugins import BranchPlugin
|
|
@@ -279,3 +281,18 @@ def test_branch_status_target(
|
|
|
279
281
|
assert lines["refs/heads/master"] == "yes"
|
|
280
282
|
assert lines["refs/heads/unmerged"] == "no"
|
|
281
283
|
assert lines["refs/heads/notpushed"] == "no"
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
def test_branch_menu_hints(reset_directory, git, script_runner):
|
|
287
|
+
def positionals(command):
|
|
288
|
+
ret = script_runner.run(
|
|
289
|
+
"git-project", "branch", command, "--menu=json"
|
|
290
|
+
)
|
|
291
|
+
assert ret.success
|
|
292
|
+
return json.loads(ret.stdout)["positionals"]
|
|
293
|
+
|
|
294
|
+
assert [pos["complete"] for pos in positionals("status")] == [
|
|
295
|
+
"branch",
|
|
296
|
+
"branch",
|
|
297
|
+
]
|
|
298
|
+
assert [pos["complete"] for pos in positionals("prune")] == ["branch"]
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
# You should have received a copy of the GNU Affero General Public License along
|
|
22
22
|
# with git-project. If not, see <https://www.gnu.org/licenses/>.
|
|
23
23
|
|
|
24
|
+
import json
|
|
24
25
|
import os
|
|
25
26
|
from pathlib import Path
|
|
26
27
|
|
|
@@ -137,3 +138,12 @@ def test_clone_path(
|
|
|
137
138
|
assert os.path.exists(gitdir)
|
|
138
139
|
assert os.path.exists(Path(gitdir) / ".git")
|
|
139
140
|
assert gitdir == str(clone_path)
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
def test_clone_menu_hints(reset_directory, script_runner):
|
|
144
|
+
ret = script_runner.run("git-project", "clone", "--menu=json")
|
|
145
|
+
assert ret.success
|
|
146
|
+
|
|
147
|
+
url, path = json.loads(ret.stdout)["positionals"]
|
|
148
|
+
assert url["complete"] is None
|
|
149
|
+
assert path["complete"] == "directory"
|
|
@@ -3339,3 +3339,28 @@ def test_worktree_rm_check_changes_nothing(git, gitproject, project):
|
|
|
3339
3339
|
)
|
|
3340
3340
|
|
|
3341
3341
|
assert _repo_state(git) == before
|
|
3342
|
+
|
|
3343
|
+
|
|
3344
|
+
def test_worktree_menu_hints(git, git_project_runner, script_runner):
|
|
3345
|
+
workarea = git.get_working_copy_root()
|
|
3346
|
+
os.chdir(workarea)
|
|
3347
|
+
git_project_runner.chdir(workarea)
|
|
3348
|
+
|
|
3349
|
+
git_project_runner.run(
|
|
3350
|
+
".*", "", "worktree", "add", "../user/test_hints", "master"
|
|
3351
|
+
)
|
|
3352
|
+
|
|
3353
|
+
def menu(*args):
|
|
3354
|
+
result = script_runner.run(
|
|
3355
|
+
["git-project", *args, "--menu=json"], cwd=workarea
|
|
3356
|
+
)
|
|
3357
|
+
assert result.success
|
|
3358
|
+
return json.loads(result.stdout)
|
|
3359
|
+
|
|
3360
|
+
[path, committish] = menu("worktree", "add")["positionals"]
|
|
3361
|
+
assert path["complete"] == "directory"
|
|
3362
|
+
assert committish["complete"] == "committish"
|
|
3363
|
+
|
|
3364
|
+
[name] = menu("worktree", "rm")["positionals"]
|
|
3365
|
+
assert name["complete"] == "worktree"
|
|
3366
|
+
assert name["candidates"] == ["test_hints"]
|
|
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
|
|
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
|