git-project-core-plugins 0.0.29__tar.gz → 0.0.31__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.0.29 → git_project_core_plugins-0.0.31}/PKG-INFO +64 -7
- {git_project_core_plugins-0.0.29 → git_project_core_plugins-0.0.31}/_version.py +2 -2
- {git_project_core_plugins-0.0.29 → git_project_core_plugins-0.0.31}/docs/changelog.rst +47 -1
- {git_project_core_plugins-0.0.29 → git_project_core_plugins-0.0.31}/requirements.txt +1 -1
- {git_project_core_plugins-0.0.29 → git_project_core_plugins-0.0.31}/src/git_project_core_plugins/worktree.py +621 -88
- {git_project_core_plugins-0.0.29 → git_project_core_plugins-0.0.31}/tests/conftest.py +55 -0
- {git_project_core_plugins-0.0.29 → git_project_core_plugins-0.0.31}/tests/test_worktree.py +967 -16
- {git_project_core_plugins-0.0.29 → git_project_core_plugins-0.0.31}/.gitignore +0 -0
- {git_project_core_plugins-0.0.29 → git_project_core_plugins-0.0.31}/COPYING +0 -0
- {git_project_core_plugins-0.0.29 → git_project_core_plugins-0.0.31}/MANIFEST.in +0 -0
- {git_project_core_plugins-0.0.29 → git_project_core_plugins-0.0.31}/docs/Makefile +0 -0
- {git_project_core_plugins-0.0.29 → git_project_core_plugins-0.0.31}/docs/authors.rst +0 -0
- {git_project_core_plugins-0.0.29 → git_project_core_plugins-0.0.31}/docs/commands.rst +0 -0
- {git_project_core_plugins-0.0.29 → git_project_core_plugins-0.0.31}/docs/conf.py +0 -0
- {git_project_core_plugins-0.0.29 → git_project_core_plugins-0.0.31}/docs/index.rst +0 -0
- {git_project_core_plugins-0.0.29 → git_project_core_plugins-0.0.31}/docs/intro.rst +0 -0
- {git_project_core_plugins-0.0.29 → git_project_core_plugins-0.0.31}/docs/license.rst +0 -0
- {git_project_core_plugins-0.0.29 → git_project_core_plugins-0.0.31}/docs/make.bat +0 -0
- {git_project_core_plugins-0.0.29 → git_project_core_plugins-0.0.31}/hatch_build.py +0 -0
- {git_project_core_plugins-0.0.29 → git_project_core_plugins-0.0.31}/pyproject.toml +0 -0
- {git_project_core_plugins-0.0.29 → git_project_core_plugins-0.0.31}/src/git_project_core_plugins/__init__.py +0 -0
- {git_project_core_plugins-0.0.29 → git_project_core_plugins-0.0.31}/src/git_project_core_plugins/_commanddocs.py +0 -0
- {git_project_core_plugins-0.0.29 → git_project_core_plugins-0.0.31}/src/git_project_core_plugins/artifact.py +0 -0
- {git_project_core_plugins-0.0.29 → git_project_core_plugins-0.0.31}/src/git_project_core_plugins/branch.py +0 -0
- {git_project_core_plugins-0.0.29 → git_project_core_plugins-0.0.31}/src/git_project_core_plugins/clone.py +0 -0
- {git_project_core_plugins-0.0.29 → git_project_core_plugins-0.0.31}/src/git_project_core_plugins/common.py +0 -0
- {git_project_core_plugins-0.0.29 → git_project_core_plugins-0.0.31}/src/git_project_core_plugins/config.py +0 -0
- {git_project_core_plugins-0.0.29 → git_project_core_plugins-0.0.31}/src/git_project_core_plugins/help.py +0 -0
- {git_project_core_plugins-0.0.29 → git_project_core_plugins-0.0.31}/src/git_project_core_plugins/init.py +0 -0
- {git_project_core_plugins-0.0.29 → git_project_core_plugins-0.0.31}/src/git_project_core_plugins/run.py +0 -0
- {git_project_core_plugins-0.0.29 → git_project_core_plugins-0.0.31}/tests/common.py +0 -0
- {git_project_core_plugins-0.0.29 → git_project_core_plugins-0.0.31}/tests/test_artifact.py +0 -0
- {git_project_core_plugins-0.0.29 → git_project_core_plugins-0.0.31}/tests/test_branch.py +0 -0
- {git_project_core_plugins-0.0.29 → git_project_core_plugins-0.0.31}/tests/test_clone.py +0 -0
- {git_project_core_plugins-0.0.29 → git_project_core_plugins-0.0.31}/tests/test_config.py +0 -0
- {git_project_core_plugins-0.0.29 → git_project_core_plugins-0.0.31}/tests/test_help.py +0 -0
- {git_project_core_plugins-0.0.29 → git_project_core_plugins-0.0.31}/tests/test_init.py +0 -0
- {git_project_core_plugins-0.0.29 → git_project_core_plugins-0.0.31}/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.0.
|
|
3
|
+
Version: 0.0.31
|
|
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.0.
|
|
17
|
+
Requires-Dist: git-project>=0.0.43
|
|
18
18
|
Requires-Dist: pytest-console-scripts
|
|
19
19
|
Provides-Extra: test
|
|
20
20
|
Requires-Dist: git-project; extra == 'test'
|
|
@@ -589,9 +589,7 @@ directory, to the worktree layout. Every branch, ref, stash and config
|
|
|
589
589
|
value stays. Each linked worktree moves into the top-level directory. The
|
|
590
590
|
files of the main worktree, ignored ones too, move into a worktree named
|
|
591
591
|
for the main branch. Without ``--apply`` it prints each step and changes
|
|
592
|
-
nothing.
|
|
593
|
-
command runs, git-project may set ``<project>.branch`` and
|
|
594
|
-
``<project>.remote`` when they are unset.
|
|
592
|
+
nothing.
|
|
595
593
|
|
|
596
594
|
The main branch is the first branch the project configures that exists
|
|
597
595
|
locally. Failing that, it is ``main``, then ``master``, then the only
|
|
@@ -626,14 +624,58 @@ warning does not stop the migration, so fix the value by hand. A tool
|
|
|
626
624
|
that records absolute paths, such as a Python virtualenv, may need to be
|
|
627
625
|
made again.
|
|
628
626
|
|
|
627
|
+
``worktree migrate`` also converts a store that is already bare at
|
|
628
|
+
<top>/.git, with its worktrees inside <top>. It renames the store to the
|
|
629
|
+
hidden name, writes the ``.git`` file and repairs each worktree. A
|
|
630
|
+
worktree's ``commondir`` file that holds an absolute path is rewritten
|
|
631
|
+
as ``../..``, because the repair leaves it naming the old store. No
|
|
632
|
+
worktree moves and no config changes. The checks above apply to each
|
|
633
|
+
worktree, except the sparse checkout, assume-unchanged, skip-worktree and
|
|
634
|
+
filesystem checks. Those matter only when files move or an index is
|
|
635
|
+
reset. It also refuses a worktree outside <top> or inside the store, and
|
|
636
|
+
a store with no worktrees. It refuses a store with an index. It looks in
|
|
637
|
+
<top> and in each directory between <top> and a worktree, and refuses
|
|
638
|
+
an entry there that holds no worktree, unless its name starts with
|
|
639
|
+
``.``. An index or such an entry can mean a checkout that ``core.bare``
|
|
640
|
+
hides. It refuses a ``commondir`` that names another repository. A
|
|
641
|
+
``core.bare`` in the store's ``config.worktree`` is allowed, since
|
|
642
|
+
``git sparse-checkout`` puts it there.
|
|
643
|
+
|
|
644
|
+
For a flat clone or a bare store, the plan lists each local branch
|
|
645
|
+
with commits its upstream lacks, and how many. A commit the upstream
|
|
646
|
+
has under another id, as after a rebase or cherry-pick, does not count.
|
|
647
|
+
A branch with no upstream, or an upstream that is gone, is compared
|
|
648
|
+
with the main branch. A bare store with no main branch lists only
|
|
649
|
+
branches with an upstream. The list is for information and does not
|
|
650
|
+
stop the migration.
|
|
651
|
+
|
|
652
|
+
After a successful ``--apply`` of either kind, migrate runs the
|
|
653
|
+
command in ``<project>.postmigrate``, if it is set, in <top>. The value
|
|
654
|
+
is split into words as a shell would split it, but no shell runs it, so
|
|
655
|
+
pipes, redirections and variables do not work. The command runs in its
|
|
656
|
+
own session and gets no standard input. It has the number of seconds in
|
|
657
|
+
``<project>.postmigratetimeout`` to finish, 600 when that is unset. On
|
|
658
|
+
a timeout or a Ctrl-C, migrate sends SIGTERM to the command's process
|
|
659
|
+
group, then SIGKILL after five seconds. A process that starts its own
|
|
660
|
+
session or process group is not stopped. Only a Ctrl-C or the timeout
|
|
661
|
+
stops the command. A hangup or a SIGTERM to migrate does not reach it.
|
|
662
|
+
The result goes in ``post.status`` in the manifest, ``ok`` or the
|
|
663
|
+
reason it failed. When the command fails or is interrupted, the
|
|
664
|
+
migration stays done and migrate exits with a failure status. The dry
|
|
665
|
+
run shows the step and the config file that sets the command, but does
|
|
666
|
+
not run it. Migrate refuses a command it cannot split, an empty one,
|
|
667
|
+
and a timeout that is not a whole number from 1 to 86400.
|
|
668
|
+
|
|
629
669
|
``--apply`` writes the plan to ``git-project-migrate.json`` in the git
|
|
630
670
|
directory. Before each step runs, its name goes in ``current_step``.
|
|
631
671
|
When the step finishes, it is added to the ``steps_done`` list. The
|
|
632
672
|
migration stops at the first failure and names the step in
|
|
633
673
|
``failed_step``. A hard stop, such as a kill, leaves no
|
|
634
674
|
``failed_step``, so read ``current_step``. The error names the
|
|
635
|
-
manifest. After a stop in
|
|
636
|
-
<top>/.git or <store_new>.
|
|
675
|
+
failed step, its reason and the manifest. After a stop in
|
|
676
|
+
``rename_store`` the manifest is at either <top>/.git or <store_new>.
|
|
677
|
+
When ``verify`` finds a worktree that is not clean, it names the first
|
|
678
|
+
10 changed or untracked paths and counts the rest.
|
|
637
679
|
|
|
638
680
|
Manual rollback. Undo the steps that ``steps_done`` lists, in the order
|
|
639
681
|
below. The failed step, or the current step after a hard stop, may be
|
|
@@ -674,6 +716,21 @@ nothing::
|
|
|
674
716
|
rm -f <top>/.git/git-project-migrate.json
|
|
675
717
|
rm -f <top>/.git/git-project-migrate.json.tmp
|
|
676
718
|
|
|
719
|
+
A bare store at <top>/.git has a manifest with ``form`` set to
|
|
720
|
+
``bare_at_root``. Each <path> is a ``linked`` entry. The ``verify`` step
|
|
721
|
+
needs no undo. The repair command below undoes ``repair``. The
|
|
722
|
+
``rewrite_commondir`` steps need no undo, since ``../..`` names the store
|
|
723
|
+
at either path::
|
|
724
|
+
|
|
725
|
+
# write_pointer: done when <top>/.git is a file
|
|
726
|
+
rm <top>/.git
|
|
727
|
+
# rename_store: done when <store_new> exists
|
|
728
|
+
mv <store_new> <top>/.git
|
|
729
|
+
git --git-dir=<top>/.git worktree repair <path>...
|
|
730
|
+
# last, remove the manifest
|
|
731
|
+
rm -f <top>/.git/git-project-migrate.json
|
|
732
|
+
rm -f <top>/.git/git-project-migrate.json.tmp
|
|
733
|
+
|
|
677
734
|
See also::
|
|
678
735
|
|
|
679
736
|
artifact
|
|
@@ -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.0.
|
|
22
|
-
__version_tuple__ = version_tuple = (0, 0,
|
|
21
|
+
__version__ = version = '0.0.31'
|
|
22
|
+
__version_tuple__ = version_tuple = (0, 0, 31)
|
|
23
23
|
|
|
24
24
|
__commit_id__ = commit_id = None
|
|
@@ -31,6 +31,50 @@ ChangeLog
|
|
|
31
31
|
`Unreleased`_
|
|
32
32
|
-------------
|
|
33
33
|
|
|
34
|
+
`0.0.31`_ - 2026-10-07
|
|
35
|
+
----------------------
|
|
36
|
+
Changed
|
|
37
|
+
.......
|
|
38
|
+
- core-plugins now needs git-project 0.0.43 or later. With it,
|
|
39
|
+
``worktree rm`` and ``branch prune`` delete the remote branch on a
|
|
40
|
+
remote whose URL names a host alias from ``~/.ssh/config``. The delete
|
|
41
|
+
runs the ``pre-push`` hook.
|
|
42
|
+
|
|
43
|
+
`0.0.30`_ - 2026-10-07
|
|
44
|
+
----------------------
|
|
45
|
+
Added
|
|
46
|
+
.....
|
|
47
|
+
- ``worktree migrate`` converts a store already bare at ``<top>/.git``
|
|
48
|
+
with its worktrees inside ``<top>``. It renames the store to the hidden
|
|
49
|
+
name, writes the ``.git`` file and repairs each worktree. An absolute
|
|
50
|
+
``commondir`` becomes ``../..``, so each worktree finds the renamed
|
|
51
|
+
store. Worktrees may be nested, such as ``<top>/x/b1``. A file or
|
|
52
|
+
directory on the way to a worktree that holds no worktree is refused,
|
|
53
|
+
unless its name starts with ``.``. Sparse checkouts and skip-worktree
|
|
54
|
+
files are allowed in this form.
|
|
55
|
+
- ``worktree migrate`` lists each local branch with commits that its
|
|
56
|
+
upstream lacks. A branch with no upstream, or one that is gone, is
|
|
57
|
+
compared with the main branch.
|
|
58
|
+
- ``worktree migrate --apply`` runs the command in
|
|
59
|
+
``<project>.postmigrate`` in the top-level directory after a successful
|
|
60
|
+
migration. ``<project>.postmigratetimeout`` sets its time limit in
|
|
61
|
+
seconds, 600 by default and 86400 at most. The manifest records the result.
|
|
62
|
+
|
|
63
|
+
Changed
|
|
64
|
+
.......
|
|
65
|
+
- A ``worktree migrate --apply`` failure prints the reason as well as the
|
|
66
|
+
step. When ``verify`` finds a worktree that is not clean, it names up to
|
|
67
|
+
10 of the changed or untracked paths. Like the precheck, it ignores
|
|
68
|
+
``status.showUntrackedFiles`` and ``submodule.<name>.ignore``.
|
|
69
|
+
- core-plugins now needs git-project 0.0.42 or later. That release lets a
|
|
70
|
+
command turn off its writes of the project defaults.
|
|
71
|
+
|
|
72
|
+
Fixed
|
|
73
|
+
.....
|
|
74
|
+
- A ``worktree migrate`` dry run wrote ``<project>.branch`` and
|
|
75
|
+
``<project>.remote`` when they were unset. Now it writes nothing to the
|
|
76
|
+
config. It needs git-project 0.0.42 or later.
|
|
77
|
+
|
|
34
78
|
`0.0.29`_ - 2026-10-06
|
|
35
79
|
----------------------
|
|
36
80
|
Added
|
|
@@ -168,7 +212,9 @@ Fixed
|
|
|
168
212
|
404. Issues named ``unknown/greened``, a leftover from hatch's project
|
|
169
213
|
template, and Documentation misspelled the package name.
|
|
170
214
|
|
|
171
|
-
.. _Unreleased: https://github.com/greened/git-project-core-plugins/compare/v0.0.
|
|
215
|
+
.. _Unreleased: https://github.com/greened/git-project-core-plugins/compare/v0.0.31...HEAD
|
|
216
|
+
.. _0.0.31: https://github.com/greened/git-project-core-plugins/compare/v0.0.30...v0.0.31
|
|
217
|
+
.. _0.0.30: https://github.com/greened/git-project-core-plugins/compare/v0.0.29...v0.0.30
|
|
172
218
|
.. _0.0.29: https://github.com/greened/git-project-core-plugins/compare/v0.0.28...v0.0.29
|
|
173
219
|
.. _0.0.28: https://github.com/greened/git-project-core-plugins/compare/v0.0.27...v0.0.28
|
|
174
220
|
.. _0.0.27: https://github.com/greened/git-project-core-plugins/compare/v0.0.26...v0.0.27
|