Add remote alias support in manifest

The `alias` is an optional attribute in element `remote`. It can be
used to override attibute `name` to be set as the remote name in each
project's .git/config. Its value can be duplicated while attribute
`name` has to be unique across the manifest file. This helps each
project to be able to have same remote name which actually points
to different remote url.

It eases some automation scripts to be able to checkout/push to same
remote name but actually different remote url, like:

repo forall -c "git checkout -b work same_remote/work"
repo forall -c "git push same_remote work:work"

for example:
The manifest with 'alias' will look like:

<?xml version='1.0' encoding='UTF-8'?>
  <remote alias="same_alias" fetch="git://" name="ext1"
  <remote alias="same_alias" fetch="git://" name="ext2"
  <remote alias="same_alias" fetch="ssh://" name="int"
  <default remote="int" revision="int-branch" sync-j="2"/>
  <project name="path/to/project1" path="project1" remote="ext1"/>
  <project name="path/to/project2" path="project2" remote="ext2"/>
  <project name="path/to/project3" path="project3"/>

In each project, use command "git remote -v"

same_alias  git:// (fetch)
same_alias  git:// (push)

same_alias  git:// (fetch)
same_alias  git:// (push)

same_alias  ssh:// (fetch)
same_alias  ssh:// (push)

Change-Id: I2c48263097ff107f0c978f3e83966ae71d06cb90
2 files changed