Commit Graph

2 Commits

Author SHA1 Message Date
Ulf Magnusson 4587ee1763 Add project commands for dealing with multiple repositories
Add simple Google repo-like functionality, for dealing with multiple Git
repositories.

The command set is mirrored after Git. All commands except
'list-projects' accept an optional list of projects, and default to all
(cloned) projects.

  - west list-projects

    Lists projects and their repositories

  - west fetch

    Clone/fetch projects. Supports 'clone-depth', for making shallow
    clones.

  - west rebase

    Rebase local branches to the revision specified in the manifest

  - west pull

    'west fetch' + 'west rebase' (similar to 'sync' in Google repo)

  - west branch

    Create a new branch in one or more repositories (for working on some
    issue)

  - west checkout

    Check out a branch in each repository that has it. Supports a -b
    flag for creating the branch first.

  - west diff

    Run 'git diff' in each repository

  - west status

    Run 'git status' in reach repository

There's no way to submit a multi-repository change for review yet.

Currently, a convenience branch 'manifest-rev' is created in each
project, which points to the revision specified for the project in the
manifest. 'manifest-rev' is updated by 'west fetch' and 'west pull'.

Local branches created with 'west branch' are set to track
'manifest-rev'. This makes e.g. a plain 'git status' or 'git pull' work
sensibly even when the manifest revision is an SHA.

We'll see if 'manifest-rev' is too magic later. It's explained in the
help texts of all the relevant commands at least.

It might be nicer to create 'manifest-rev' in e.g. refs/remotes instead
of refs/heads. Git doesn't seem to like trying to create a branch that
tracks a branch in refs/remotes unless it's a "proper" upstream branch
though.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-08-24 14:16:18 -05:00
Marti Bolivar 304776695b Move install_requires contents to requirements.txt
This makes it easier to do editable installs or work on West in a
virtualenv.

Signed-off-by: Marti Bolivar <marti@foundries.io>
2018-08-20 09:17:57 -07:00