p4submodule
A tool for managing git repositories inside of Perforce depots.
This tool was built for managing Unreal Engine plugins that are distributed via GitHub, but it may have other uses as well.
Installation
- Ensure you have python3 & pipx installed
- Run
pipx install p4submodule - Tada!
LFS Repositories
If the repository you're cloning or updating uses git LFS, you'll need to run some additional commands immediately after a create or update.
git lfs fetch: Caches the LFS data on your local machine.git lfs checkout: Replaces the contents of the files with the cached LFS data.
Note: If you do not have git LFS installed on your local machine, run git lfs install first.
CLI Documentation
p4submodule
A tool for managing git repositories inside of Perforce depots.
Usage: p4submodule [OPTIONS] COMMAND [ARGS]...
--p4-port TEXT: P4 server address to use intead of inferring from p4 set
--p4-user TEXT: P4 username to use intead of inferring from p4 set
--p4-client TEXT: P4 workspace to use intead of inferring from p4 set
create
Creates a new submodule.
Usage: p4submodule create [OPTIONS] [PATH TO submodule.toml]
--name NAME: (defaults to the checkout directory name) A name used to refer to the submodule
--remote URL: The URL for the remote repository to track
--tracking BRANCH: The branch to track from the remote
--path PATH: The optional relative path from the config file to the checkout directory
--no-sync: Create the submodule config file, but don't clone it
-c, --changelist CHANGELIST: (Defaults to creating a new CL) The P4 changelist to place changes in
update
Fetch & update submodules in config to the latest revision of their tracking branches.
This command will do it's best to preserve your local/p4 changes to directories by commiting them to the local git repository, fetching the remote, and rebasing your change on top of the newest tracking version, but it is possible that conflicts may arise.
If no config is specified, p4submodule will search the working directory for the default submodule.toml file.
Usage: p4submodule update [OPTIONS] [CONFIGS]...
-m, --message TEXT (Defaults to [p4submodule] updating repo): The commit message to use when converting local changes to the target repository type
-c, --changelist CHANGELIST: (Defaults to creating a new CL) The P4 changelist to place changes in
submodule.toml Format
Editing this file by hand should not be required, as all modifications should be covered by the above commands.
submodule.[NAME] sections (optional) (NAME default: file directory name)
You may use this section to optionally define multiple submodules in the same file. Example:
[Submodule.ModuleA]
...
[Submodule.ModuleB]
...
path (optional) (default: file directory)
You may use this field to specify the path to the git repository checkout root.
remote
The path to the git remote to checkout/clone from.
tracking
The remote branch to track when updating.
current_ref
The OID of the git commit currently in use by the submodule.
Metadata
Release files for p4submodule 1.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| p4submodule-1.1.1.tar.gz | 13.2 kB | Without provenance | Details for p4submodule-1.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| p4submodule-1.1.1-py3-none-any.whl | Python 3 | none | any | Details for p4submodule-1.1.1-py3-none-any.whl |
Total release size: 29.2 kB
Release files / p4submodule-1.1.1.tar.gz
| Download URL | p4submodule-1.1.1.tar.gz |
|---|---|
| Size | 13.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
116f7ceeab1cf20fa51d3d039376e7303f7f136c3cc86dde4587916efe93ba9d
|
|
BLAKE2b-256 checksum How to use checksums |
66622e714faaa57d11d63dbe84a1d554dafe055a39d741025cdbc421a8c7fcfa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.3.4 CPython/3.12.3 Linux/6.17.0-1010-azure
|
Release files / p4submodule-1.1.1-py3-none-any.whl
| Download URL | p4submodule-1.1.1-py3-none-any.whl |
|---|---|
| Size | 16.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7a2013949eb6060ae77c3201bcca8c0b268fe13604aae614872192a721951a85
|
|
BLAKE2b-256 checksum How to use checksums |
c56d329a36ee105b54b814cbbb839f9eefb96ae2e831be18310174c92dd7e4e3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.3.4 CPython/3.12.3 Linux/6.17.0-1010-azure
|
Security for p4submodule 1.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.