Changelog between to android builds

627 views
Skip to first unread message

Christian Zimmermann

unread,
Feb 19, 2014, 7:10:16 AM2/19/14
to repo-d...@googlegroups.com
Hey all, currently ia am building aospal-remix for mako and deb and i dont know how to track the changes between the the existing build and the build i will do then.
Of course i know what i changed for example the msn kernel or device tree so i can write that down, but i dont know how to track the changes from aospal and pa.

can someone help me?

something like:
repo sync -j16
[get changes between last sync and this sync] > changes.log
./rom-build.sh mako

thanks :) 

Christian Zimmermann

unread,
Feb 19, 2014, 7:34:10 AM2/19/14
to repo-d...@googlegroups.com
edit: try´d this: repo forall -pc ' git log --since=last-release'  > change.txt but it semm to get a lot of old commits from 2013

Christian Zimmermann

unread,
Feb 19, 2014, 9:24:29 AM2/19/14
to repo-d...@googlegroups.com
Okay i coded a script that do it for me ... anyway thank you all :D

if some on is interested in:

#!/bin/bash
# Script to build aospal on chaos-dev
#
# init
function pause(){
   read -p "$*"
}
while :
do
clear
echo -e '\E[37;40m'"\033[1m
                                ChaOS-DEV: AOSPAL-REMIX - Device Menu.
\033[0m"     
echo "* [m] mako *"
echo "* [d] deb *"
echo "* [0] Exit/Stop *"
echo -e "\033[1;36m ================================= \033[0m"
echo -n "Enter your menu choice [a-0]: "
read yourch2
case $yourch2 in
m) 
echo -e '\E[37;40m'"\033[1m
                                ChaOS-DEV: syncing repo....
\033[0m"     
    cd /home/chaos/Schreibtisch/workspace/KK/AOSPAL
repo sync -j16 
echo -e '\E[37;40m'"\033[1m
                                ChaOS-DEV: building for mako....
\033[0m"     
./rom-build.sh mako
echo -e '\E[37;40m'"\033[1m
                                ChaOS-DEV: generating changelog for mako....
\033[0m"     
repo forall -pc ' git log --since=$(cat /home/chaos/aospal_chaos_changelog/lastbuild_mako.txt) --date-order '  >  /home/chaos/aospal_chaos_changelog/mako-changelog-$(date +%Y-%m-%d).txt
date +%d.%m.%Y > /home/chaos/aospal_chaos_changelog/lastbuild_mako.txt
pause 'Press [Enter] key to continue...'
;;
d) 
echo -e '\E[37;40m'"\033[1m
                                ChaOS-DEV: syncing repo...
\033[0m"     
    cd /home/chaos/Schreibtisch/workspace/KK/AOSPAL
repo sync -j16 
echo -e '\E[37;40m'"\033[1m
                                ChaOS-DEV: building for deb....
\033[0m"     
./rom-build.sh deb
echo -e '\E[37;40m'"\033[1m
                                ChaOS-DEV: generating changelog for deb....
\033[0m"     
repo forall -pc ' git log --since=$(cat /home/chaos/aospal_chaos_changelog/lastbuild_deb.txt) --date-order '  >  /home/chaos/aospal_chaos_changelog/deb-changelog-$(date +%Y-%m-%d).txt
date +%d.%m.%Y > /home/chaos/aospal_chaos_changelog/lastbuild_deb.txt
pause 'Press [Enter] key to continue...'
;;

0) exit 0;;
*) echo "Oopps!!! Please select choice m,d or 0";
echo "Press Enter to continue. . ." ; read ;;
esac
done

Magnus Bäck

unread,
Feb 27, 2014, 10:56:20 AM2/27/14
to repo-d...@googlegroups.com
On Wednesday, February 19, 2014 at 09:24 EST,
Christian Zimmermann <chaos...@gmail.com> wrote:

[...]

> > repo forall -pc ' git log --since=$(cat
> >> /home/chaos/aospal_chaos_changelog/lastbuild_mako.txt) --date-order ' >
> >> /home/chaos/aospal_chaos_changelog/mako-changelog-$(date +%Y-%m-%d).txt
> >
> > date +%d.%m.%Y > /home/chaos/aospal_chaos_changelog/lastbuild_mako.txt

This might be an acceptable approximation, but it's broken. I'm not
sure whether --since looks at the author date or the commit date, but
regardless you can't rely on it. For example, consider what happens
when your new build includes a merge commit that introduces tons of
old commits to the branch.

To get correct results you must let Git traverse the commit graph
between your current position and your last position. To do that
you could save the head SHA-1 of each Git before you sync so that
you can run 'git log <old sha1>' to find all commits that have been
introduced. You can also set a tag to avoid having to deal with
SHA-1s more than necessary. Something like this:

repo forall -c "git tag sync-$(date +%Y%m%d%H%M)"
repo sync
repo forall -c "git log $(git tag -l sync-* | tail -n 1)"

Not sure if the tag list provided by 'git tag' is sorted, so you
might want to throw in a sort command in the pipeline.

Oh, and assuming it's the newly introduced upstream commits you
want to track you shouldn't tag the head commits; tag the upstream
branch(es) you're interested in. The $REPO_RREV variable (available
in 'repo forall commands) will be helpful there.

[...]

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

Ulrich Ölmann

unread,
Mar 1, 2014, 5:45:13 AM3/1/14
to repo-d...@googlegroups.com
Nearly two weeks ago Julien Campergue comitted revision dd65422 to the master branch of the git-repo repository. It adds the new "diffmanifests" command to "repo". You could exploit it in combination with the "manifest" command and its "--revision-as-HEAD" option like this:

repo manifest --revision-as-HEAD > manifest_before_sync.xml
repo sync -j16
repo manifest --revision-as-HEAD > manifest_after_sync.xml
repo diffmanifests $PWD/manifest_before_sync.xml $PWD/manifest_after_sync.xml

You have to use the cumbersome notation $PWD/... because in the "diffmanifests" command relative paths start from project's
".repo/manifests" folder.

Of course you have to switch to repo's master branch before you are able to utilize the "diffmanifests" command (be aware of it not being a stable branch for production use):

cd .repo
git checkout -b my_master origin/master


Best regards
Ulrich




--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en
 
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages