pmbootstrap pull: new action (!1848)

Add a shortcut for "git pull --ff-only" in all repositories cloned by
pmbootstrap (currently pmaports and aports_upstream, new pmdevices
repository coming soon).

'pmbootstrap pull' will only update the repositories, if:
* they are on an officially supported branch (e.g. master)
* the history is not conflicting (fast-forward is possible)
* the git workdirs are clean

Otherwise it shows the user a descriptive message about what to do. The
list of supported branches is only "master" right now, and will be
extended in later commits, so we can have a stable branch for pmaports
based on Alpine's releases. More about that in the project direction
2020 issue.

Closes: #1858
This commit is contained in:
Oliver Smith 2020-01-06 06:39:57 +01:00 committed by Alexey Min
parent 16e2d3c77c
commit e04712a636
No known key found for this signature in database
GPG key ID: EBF5ECFFFEE34DED
5 changed files with 283 additions and 3 deletions

View file

@ -552,6 +552,10 @@ def arguments():
help="force even if the file seems to be"
" invalid")
# Action: pull
sub.add_parser("pull", help="update all git repositories that pmbootstrap"
" cloned (pmaports, etc.)")
if argcomplete:
argcomplete.autocomplete(parser, always_complete_options="long")