You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2017/10/26 00:53:08 UTC

[GitHub] ccollins476ad opened a new pull request #103: Newt - Generic git repositories

ccollins476ad opened a new pull request #103: Newt - Generic git repositories
URL: https://github.com/apache/mynewt-newt/pull/103
 
 
   This commit adds support for a new repository type, as specified in the `project.yml` file: "git".  Here is an example:
   
   ```
       repository.apache-mynewt-core:
           type: git
           vers: 0-latest
           url: 'git@github.com:apache/mynewt-core.git'
   ```
   
   Repositories of this type do not have any fields for credentials; security is handled by the `git` tool, not newt.  The example repo above would authenticate via ssh.
   
   In addition, this commit cleans up some inconsistent and unintuitive behavior in the following newt commands:
   
   * `install`
   * `upgrade`
   * `sync`
   
   The new behaviors of these commands are described below:
   
   * `install`:
       * For each repo in `project.yml`:
           * If `-f` (force) specified, delete repo's directory.
           * If repo doesn't exist:
               * Clone repo.
               * Checkout appropriate branch.
               * Populate `project.state` file.
   
   * `upgrade`:
       * For each repo in `project.yml`:
           * If repo doesn't exist:
               * Clone repo.
               * Checkout appropriate branch.
               * Populate `project.state` file.
           * Else:
               * If versions in `project.state` and `project.yml` don't match:
                   * Prompt user [Y/n]
                   * If any local changes:
                       * If !force:
                           * Print error and abort.
                   * Upgrade repo to correct branch.  If local changes, attempt merge.
                   * Populate `project.state` file.
   
   * `sync`:
       * For each repo in `project.yml`:
           * If repo not installed:
               * Print error message.
           * Else:
               * If remote contains changes not in local branch:
                   * If any local changes:
                       * Save `git diff` output to temp file.
                   * Replace repo contents with latest from remote.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services