vcspull migrate¶
vcspull migrate rewrites configuration files into
checkout targets, backend options, and entry policy. It previews changes by
default; --write saves them.
Command¶
Separate checkout targets, backend options, and entry policy.
Moves legacy tuning into working_copy and git/hg/svn blocks, with pin policy at the entry level. Preview changes by default; –write saves them.
Usage¶
usage: vcspull migrate [-h] [--trust-project] [--no-project] [-f FILE] [--write] [--all]
Examples¶
$ vcspull migrate
$ vcspull migrate -f ./myrepos.yaml
$ vcspull migrate --write
$ vcspull migrate --all --write
Options¶
- --trust-project¶
load project configs that check repositories out beyond their own directory (also VCSPULL_YES=1)
- --no-project¶
skip .vcspull.* files found above the working directory
- -f, --file FILE¶
path to config file (default: ~/.vcspull.yaml, else ./.vcspull.yaml)
- --write, -w¶
Write migrated configuration back to file
- --all¶
Migrate all discovered config files across system, user, and project scopes
What gets migrated¶
Legacy setting |
Destination |
|---|---|
|
|
|
|
|
|
|
|
|
Entry level |
Canonical values win over legacy values. Within legacy settings, backend
blocks win over options, which wins over top-level tuning. An explicit
depth wins over shallow cloning. A canonical target replaces the legacy
target as a whole, so migration cannot add a second ref selector.
Unknown options keys stop migration and name the configuration file,
workspace root, repository entry, and key. The file remains unchanged. Legacy
shallow: true settings on Mercurial (hg) and Subversion (svn) entries
(which earlier releases accepted as no-ops) are stripped with a warning so
large manifests migrate in one pass.
Given:
~/code/:
flask:
repo: git+https://github.com/pallets/flask.git
rev: v3.0.0
shallow: true
vcspull migrate --write produces:
~/code/:
flask:
repo: git+https://github.com/pallets/flask.git
working_copy:
rev: v3.0.0
git:
depth: 1
Writing changes¶
Preview the rewrite first:
$ vcspull migrate --file ~/.vcspull.yaml
Then add --write (-w) to persist it:
$ vcspull migrate \
--file ~/.vcspull.yaml \
--write
Use --all to migrate every configuration file across the active
configuration scopes, weakest to strongest:
/etc/vcspull/*.{yaml,yml,json}, your user configuration directory,
~/.vcspull.{yaml,json}, and ancestor .vcspull.{yaml,yml,json} project
files:
$ vcspull migrate --all --write
Pass --no-project (VCSPULL_NO_PROJECT=1) to skip ancestor project files, or
--trust-project (VCSPULL_YES=1) to authorize discovered project files whose
destinations escape their directory without prompting:
$ vcspull migrate --all --no-project --write
One pass rewrites every legacy location, including entries pinned against fmt
or import. Repeating migration makes no changes.
See also¶
Configuration — checkout targets and backend options.
Migration notes — upgrade examples.