vcs.py
Utilities related to VCS.
checkout_latest_tag(local_repo, use_prereleases=False)
¶
Checkout latest git tag and check it out, sorted by PEP 440.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
local_repo |
StrOrPath
|
A git repository in the local filesystem. |
required |
use_prereleases |
OptBool
|
If |
False
|
Source code in copier/vcs.py
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 |
|
clone(url, ref=None)
¶
Clone repo into some temporary destination.
Includes dirty changes for local templates by copying into a temp directory and applying a wip commit there.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
url |
str
|
Git-parseable URL of the repo. As returned by get_repo. |
required |
ref |
OptStr
|
Reference to checkout. For Git repos, defaults to |
None
|
Source code in copier/vcs.py
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 |
|
get_repo(url)
¶
Transforms url
into a git-parseable origin URL.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
url |
str
|
Valid examples:
|
required |
Source code in copier/vcs.py
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
|
is_git_bundle(path)
¶
Indicate if a path is a valid git bundle.
Source code in copier/vcs.py
47 48 49 50 51 52 |
|
is_git_repo_root(path)
¶
Indicate if a given path is a git repo root directory.
Source code in copier/vcs.py
29 30 31 32 33 34 35 |
|
is_in_git_repo(path)
¶
Indicate if a given path is in a git repo directory.
Source code in copier/vcs.py
38 39 40 41 42 43 44 |
|