[gnome-continuous-yocto/gnomeostree-3.28-rocko: 6073/8267] classes/buildhistory: make a single commit per build



commit 04292b815cb1fdad777e83bfcb65712609c946df
Author: Paul Eggleton <paul eggleton linux intel com>
Date:   Thu Jun 1 13:42:25 2017 +1200

    classes/buildhistory: make a single commit per build
    
    Way back in OE-Core commit fba198ac7efe476a25c5761878ef2fcee97bf9f1 in
    2012 we split committing to the repository, making a commit per
    top-level directory. However, as we add more information it becomes
    harder to see which commits belong to which build. Switch back to a
    single commit per build to keep the history tidier.
    
    To address the original concern, if you do want to see just the changes
    for a particular subdirectory, git can filter that for you - just
    specify that subdirectory as the last parameter on the git show / git
    diff command line and that's all you will see.
    
    (From OE-Core rev: b49a4a47783609fe9161fbc11cc7c7ff3ff4b6bb)
    
    Signed-off-by: Paul Eggleton <paul eggleton linux intel com>
    Signed-off-by: Ross Burton <ross burton intel com>
    Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>

 meta/classes/buildhistory.bbclass |   12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)
---
diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
index f543bb7..3e907fc 100644
--- a/meta/classes/buildhistory.bbclass
+++ b/meta/classes/buildhistory.bbclass
@@ -706,10 +706,10 @@ def buildhistory_get_cmdline(d):
 buildhistory_single_commit() {
        if [ "$3" = "" ] ; then
                commitopts="${BUILDHISTORY_DIR}/ --allow-empty"
-               item="No changes"
+               shortlogprefix="No changes: "
        else
-               commitopts="$3 metadata-revs"
-               item="$3"
+               commitopts=""
+               shortlogprefix=""
        fi
        if [ "${BUILDHISTORY_BUILD_FAILURES}" = "0" ] ; then
                result="succeeded"
@@ -726,7 +726,7 @@ buildhistory_single_commit() {
        esac
        commitmsgfile=`mktemp`
        cat > $commitmsgfile << END
-$item: Build ${BUILDNAME} of ${DISTRO} ${DISTRO_VERSION} for machine ${MACHINE} on $2
+${shortlogprefix}Build ${BUILDNAME} of ${DISTRO} ${DISTRO_VERSION} for machine ${MACHINE} on $2
 
 cmd: $1
 
@@ -770,9 +770,7 @@ END
                        git add -A .
                        # porcelain output looks like "?? packages/foo/bar"
                        # Ensure we commit metadata-revs with the first commit
-                       for entry in `echo "$repostatus" | awk '{print $2}' | awk -F/ '{print $1}' | sort | 
uniq` ; do
-                               buildhistory_single_commit "$CMDLINE" "$HOSTNAME" "$entry"
-                       done
+                       buildhistory_single_commit "$CMDLINE" "$HOSTNAME" dummy
                        git gc --auto --quiet
                else
                        buildhistory_single_commit "$CMDLINE" "$HOSTNAME"


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]