Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5e772074 authored by Tanguy Pruvot's avatar Tanguy Pruvot Committed by Steve Kondik
Browse files

env: implement the repodiff command



 sample usage:
   repodiff ics
   repodiff github/ics --numstat
   repodiff android-4.0.4_r1.2 android-4.0.4_r2

Change-Id: Id1c1e504c75676707e59f051fd5ff9ce748d4297
Signed-off-by: default avatarTanguy Pruvot <tanguy.pruvot@gmail.com>

build: Add repodiff to list of commands
parent f70cd991
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ Invoke ". build/envsetup.sh" from your shell to add the following functions to y
- cmrebase:  Rebase a Gerrit change and push it again
- mka:       Builds using SCHED_BATCH on all processors
- reposync:  Parallel repo sync using ionice and SCHED_BATCH
- repodiff:  Diff 2 different branches or tags within the same repo

Environment options:
- SANITIZE_HOST: Set to 'true' to use ASAN for all host modules. Note that
@@ -1960,6 +1961,15 @@ function reposync() {
    esac
}

function repodiff() {
    if [ -z "$*" ]; then
        echo "Usage: repodiff <ref-from> [[ref-to] [--numstat]]"
        return
    fi
    diffopts=$* repo forall -c \
      'echo "$REPO_PATH ($REPO_REMOTE)"; git diff ${diffopts} 2>/dev/null ;'
}

# Force JAVA_HOME to point to java 1.7/1.8 if it isn't already set.
function set_java_home() {
    # Clear the existing JAVA_HOME value if we set it ourselves, so that