Skip to main content

A tool for managing git repositories inside of Perforce depots

Project description

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

  1. Ensure you have python3 & pipx installed
  2. Run pipx install p4submodule
  3. Tada!

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.

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

p4submodule-1.0.3.tar.gz (12.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

p4submodule-1.0.3-py3-none-any.whl (15.6 kB view details)

Uploaded Python 3

File details

Details for the file p4submodule-1.0.3.tar.gz.

File metadata

  • Download URL: p4submodule-1.0.3.tar.gz
  • Upload date:
  • Size: 12.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.4 CPython/3.12.3 Linux/6.11.0-1018-azure

File hashes

Hashes for p4submodule-1.0.3.tar.gz
Algorithm Hash digest
SHA256 f3e786f867d3b9a328cae5ec875a38fab89f3be30472ac979fa6eee3308cb10e
MD5 7a03881125c6fba456684394fcbb37f9
BLAKE2b-256 9a27aa9c9ee609c76b13d9e0d2fe62ec8d9a138023b2d71f89aa870fc61b1870

See more details on using hashes here.

File details

Details for the file p4submodule-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: p4submodule-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 15.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.4 CPython/3.12.3 Linux/6.11.0-1018-azure

File hashes

Hashes for p4submodule-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 0365e33f9f0e597afeefe57eab05f760f2a32ae0364e9fabae86cbaad368d7cb
MD5 1fe433b04dc0b1c234af9f96a53124ef
BLAKE2b-256 9612b2586ea0a09625c9a6317c45032b0ec39c96749b98ed82de870f042f3e59

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page