TP 1: repo and manifest

Instructions

  • Subject tag: TP1
  • Deadline: 17/06/2018 23h42

Subject objectives

  • Be able to create a valid repo manifest with many remotes and revisions.
  • Be able to use repo: initialization, synchronization and patch uploads.
  • Get used to AOSP review process.

Subject

You are going to create a Vim configuration.

Note

From parts 1. to 5., you are allowed to bypass the review system.

At this end of this practical work, your sync directory must look like this:

├── .vim
│   ├── autoload
│   │   └── pathogen.vim
│   ├── bundle
│   │   └── hemisu
│   │       ├── colors
|   │       │   └── hemisu.vim
│   │       └── README.md
│   ├── CONTRIBUTING.markdown
│   └── README.markdown
├── vimrc
│   └── vimrc
└── .vimrc

Documentation:

  1. Manifest documentation
  2. A manifest example

1. Create a valid manifest for our vim configuration environment

Git repository name:
vimconfig-manifest-<login>
  1. Create a basic manifest.
  2. Add a github remote with a default revision set to master.
  3. Add pathogen.vim project with its path sets to .vim.

Warning

You need to have a Github account and an associated SSH key in order to be able to use SSH protocol.

Hint

In order to test your modifications, you must commit them first. Create a test directory. In this directory, run a repo init -u <URL> where URL can be a local path and then, a repo sync.

In order to ease your tests without breaking your local vim configuration, you can use this Dockerfile.

docker build -t sand-tp1 .
docker run -u=`id -u $USER` -v <your sync directory>:/home/gistre \
 -v <some tests>:/home/gistre/tests -t -i sand-tp1

Question 1

What does repo init command generate ? Identity the root elements.

Question 2

What does repo sync command generate ? Identity the new root elements.

2. Add a .vimrc configuration file

Git repository name:
vimrc-<login>
  1. Add a vimrc file into vimrc repository. Add the following lines:
    • execute pathogen#infect('$HOME/.vim/bundle/{}')

In your manifest:

  1. Add a sand remote without any default revision pointing to Gerrit URL.
  2. Add vimrc project.

Question 3

Why does this configuration fail ?

  1. Fix the project declaration.
  2. From your local sync directory, add the following line to your vimrc file:
    • syntax on
  3. Run repo status.
  4. Run repo diff.
  5. Push your modifications.
  6. Using project configuration in the manifest, put the .vimrc file at the root of your sync directory.

3. Add a vim bundle

  1. Add Hemisu project. Add project configurations if needed.
  2. Follow Github instructions for the bundle installation. Do not forget to update your .vimrc file.
  3. Set project group to bundle.

4. Add a default manifest remote

Question 4

Which remote remote should be the default one ? Why ?

  1. Add a default remote with a default revision, with a synchronization only on the revision, using two threads.

5. Add an optional bundle

  1. Add vim-gitgutter bundle to your vim configuration environment.
  2. Set the project group to bundle and notdefault.
  3. Run repo list.

Question 5

What is happening here ?

6. Fill up your vimrc

Now, you will respect AOSP submission process, so follow the instructions given in the submissions documentation.

  1. Go to vimrc directory.
  2. Your branch must be called vimrc_update.
  3. Add some configurations in your .vimrc file.
  4. Upload your modifications.

Question 6

Explain the errors you are facing.

  1. Fix up your manifest and re-try to upload your change.