envsetup: Rework cmgerrit() - A Git wrapper

Usage:
    cmgerrit COMMAND [OPTIONS] CHANGE_ID[/PATCH_SET][{@|^|~|:}ARG] [-- ARGS]

Any Git command that with refname as its parameter should work. Basically,
this works as:
    git fetch PROJECT_URL refs/changes/HASH/CHANGE_ID/PATCH_SET \
    && git COMMAND OPTIONS FETCH_HEAD{@|^|~|:}ARG -- ARGS

Examples:
    cmgerrit pull 1234
    cmgerrit push my_patch:gingerbread
    cmgerrit checkout -B patch_1234 1234/5
    cmgerrit branch fix_xyz 1234/5 && git merge fix_xyz
    cmgerrit show 1234:file
    cmgerrit checkout 1234 -- file1 file2 && git diff --cached

Change-Id: Id85d58db79c010428e3aed0cc0f22e04f0963ac0
build: Implement cmrebase

This new shell function allows people to easily rebase their
Gerrit changes and push them back online, all with one command.

Change-Id: I6d85ec033812e84ebe70fe229883c914a81c82ec

Conflicts:

	envsetup.sh
Enable ICF link-time optimization and remove global inline options

Removing global inline options gives compiler the opportunity
to do inline optimizations and inline tunings for Android native
codes.

Benefit:
  - the size of almost all native libraries are reduced.

The reference code size experiment:
$ du -sb out/target/product/crespo/system/lib/
[before]
    20843959	lib/
[after]
    20726967	lib/

code size reduction: 20843959 - 20726967 = 116992 bytes

Backported from ICS

Change-Id: I36bf036d1571a58d2345f30c72e9667fcbba768c
Revert 'Change I36bf036d: Enable ICF link-time optimization'

In HTC Desire (Bravo) this change fails to record video in HIGH resolution: the resulting file isn't saved to the SD.
LOW resolution and MMS mode works normaly.

Change-Id: I764b454f0ba849669f2c78fd56bf1577be46b1d9
build: Backport CM product build changes from CM9

Open the requested product makefile directly instead of crawling
the entire product definition to cut down on setup times

Change-Id: Ied5ccc38fa1925341584d5ea227a9df6ae3a0843
build: Backport roomservice from CM9

Change-Id: I4cde09db8a4f946f17affd7c5894f97f9d1d6a1b
build: Fix omapmmlib dependency

omapmmlib is a java class used by OMAP devices, which was being included
in all the builds due to the old "parse all the devices" behavior.
Add it explicitly to the base frameworks, or else the current build setup
will fail on non-OMAPs

Change-Id: Id5efd17db65155d2c4245451e86d4e40c9cbde58
fix roomservice to handle pagination

Change-Id: I4923c2f768094dbad8e06a72d9f27d46414030ab
Add ro.cm.device to build.prop

For market filtering reasons on certain devices (particularly
Galaxy S and its variants), we need to override ro.product.device
as market checks for that when doing device filtering (our build
tree and our proper ro.produce.device name are different). arcee
then informed me that it would break the mirroring system and CMStats
and suggested an alternative property. I would like to begin the
effort by adding "ro.cm.device", which defaults to the same value
as ro.product.device and is not affected by the override.

Change-Id: Ifec746e88a95a039462d3f5750cd07a5f055ab67
build in colors: Install output in green, prefixes in yellow [enhanced]

 should be in a single command line else there are sync problems
 in multithread (-j X)

 Added all command prefixes in yellow

 This color can be tuned in core/Makefile if you use a white terminal.
 or disabled with "export BUILD_WITH_COLORS=0"

Change-Id: I620c88389ba021ba82fe9e542ba819873c7eb71f
switch to new file naming...

Change-Id: I5339c01077740a81f47f306b36458f04f4a88bf1
Note that update-api is a lie.

Change-Id: Idc2d92630e94ccbd60b5d5447c3762db8e5096f8
Fix build date info against locales
Explicitly provide the revision when modifying a local_manifest.xml via roomservice. Is there a way to figure out whether we are on gingerbread automagically?

Change-Id: I41fa997e276f4ed3e8749ba72efc75cea166fa5a
Fix python fail.

Change-Id: Ie0f802696f31d8d548a57b55cbe75846e37efc06
eat: Adapt to new file naming scheme

Change-Id: I101e333918bc215bebcc594c97bdd68307c90aaa
make compatible with github v3 api

Change-Id: Iff6f1f9099cdc5d2b49e04000b5fe3d04aa5d7e4
merge from CM7

Change-Id: Ieefbd5d5a707e75261fb081987a90d7448fa1022