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. Create a valid manifest for our vim configuration environment¶
- Git repository name:
- vimconfig-manifest-<login>
- Create a basic manifest.
- Add a
github
remote with a default revision set tomaster
. - 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>
- Add a
vimrc
file into vimrc repository. Add the following lines:execute pathogen#infect('$HOME/.vim/bundle/{}')
In your manifest:
- Add a
sand
remote without any default revision pointing to Gerrit URL. - Add
vimrc
project.
Question 3
Why does this configuration fail ?
- Fix the project declaration.
- From your local sync directory, add the following line to your
vimrc
file:syntax on
- Run
repo status
. - Run
repo diff
. - Push your modifications.
- Using project configuration in the manifest, put the .vimrc file at the root of your sync directory.
3. Add a vim bundle¶
- Add Hemisu project. Add project configurations if needed.
- Follow Github instructions for the bundle installation. Do not forget to update your .vimrc file.
- Set project group to
bundle
.
4. Add a default manifest remote¶
Question 4
Which remote remote should be the default one ? Why ?
- Add a default remote with a default revision, with a synchronization only on the revision, using two threads.
5. Add an optional bundle¶
- Add vim-gitgutter bundle to your vim configuration environment.
- Set the project group to
bundle
andnotdefault
. - 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.
- Go to
vimrc
directory. - Your branch must be called
vimrc_update
. - Add some configurations in your
.vimrc
file. - Upload your modifications.
Question 6
Explain the errors you are facing.
- Fix up your manifest and re-try to upload your change.