How to check the diff between two branches across AOSP?

1,947 views
Skip to first unread message

Ehtesh Choudhury

unread,
Apr 23, 2012, 1:50:35 PM4/23/12
to android-...@googlegroups.com
I want to see the differences between `android-4.0.3_r1` and `android-4.0.4_r1.1`. Now I know I can do this under /frameworks/base, where I can check out both branches in `git`. But how can I do this using `repo`? 

Am I supposed to do the following:

repo init -b android-4.0.3_r1
repo sync
repo init -b android-4.0.4_r1.1
repo sync
repo forall -c "git diff android-4.0.3_r1..android-4.0.4_r1.1"
 
This works, but sometimes I just want to see all the changes, and not package by package.

And `repo diff` isn't quite what I want, either.

Clearly, I've got this hammer and I think everything is a nail. But is there a better way to do this?

Magnus Bäck

unread,
Apr 23, 2012, 2:28:03 PM4/23/12
to android-...@googlegroups.com
On Monday, April 23, 2012 at 13:50 EDT,
Ehtesh Choudhury <merloc...@gmail.com> wrote:

> I want to see the differences between `android-4.0.3_r1` and
> `android-4.0.4_r1.1`. Now I know I can do this under /frameworks/base,
> where I can check out both branches in `git`. But how can I do this
> using `repo`?
>
> Am I supposed to do the following:
>
> repo init -b android-4.0.3_r1
> > repo sync
> > repo init -b android-4.0.4_r1.1
> > repo sync
> > repo forall -c "git diff android-4.0.3_r1..android-4.0.4_r1.1"

Git fetches the history of all branches right away, so there's no point
in syncing for each manifest branch. Once you've synced an Android
workspace the last command is fine.

However, if the set of gits available in the two releases you're
comparing is different (i.e. gits have been added or removed) you'll
have to do something a bit more complicated to get the results you
want (whatever that may be -- under some circumstances it might be
alright to just ignore the fact that a git only occurs in one of
the branches).

[...]

--
Magnus B�ck
ba...@google.com

mark gross

unread,
Apr 23, 2012, 2:07:03 PM4/23/12
to android-...@googlegroups.com
http://groups.google.com/group/repo-discuss?hl=en may be a better place for this question.
--mark

--
You received this message because you are subscribed to the "Android Building" mailing list.
To post to this group, send email to android-...@googlegroups.com
To unsubscribe from this group, send email to
android-buildi...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en



--
create interesting things.

Manuel Garcia

unread,
Apr 23, 2012, 3:25:42 PM4/23/12
to Android Building
I think you need something like this :

git log --abbrev-commit --pretty=oneline --no-merges --cherry-pick --
left-only NewerBranch...OlderBranch

This will give you only the commit messages and if you have cherry
picked changes from the newer branch already it won't show them on the
diff . If you want to do it for all projects just do repo forall -c
".."

Regards.

On Apr 23, 11:28 am, Magnus Bäck <ba...@google.com> wrote:
> On Monday, April 23, 2012 at 13:50 EDT,
Reply all
Reply to author
Forward
0 new messages