Re: [repo] diff/changelog between two manifests

3,401 views
Skip to first unread message

msm...@mcclintock.net

unread,
May 13, 2013, 4:24:53 PM5/13/13
to repo-d...@googlegroups.com
This is what I ended up with:

#!/bin/sh

old_manifest=$1
new_manifest=$2
[ -z "$3" ] && diff_cmd="git --no-pager log --pretty=oneline --abbrev-commit"

xmlstarlet sel -t -m "//project" -v "@name" -o " " -v "@path" -o " " -v "@revision" -n $old_manifest |
while read name path old_rev; do
    new_rev=$(xmlstarlet sel -t -m "//project[@path='$path']" -v "@revision" $new_manifest)
    dir=$PWD
    cd $path
    $diff_cmd $old_rev...$new_rev | while read line; do
        echo -n "$name: "
        echo $line
    done
    cd $dir
done

On Thursday, March 14, 2013 11:31:19 AM UTC-5, msm...@mcclintock.net wrote:
Hello,

Is there a way to create a change log between two manifest files (or between two branches in your manifest repo) in a standard way with repo? I realize I could write a fairly simple script to do this, but I'd like to adopt a more standard method if possible. E.g.

$ repo changelog manifestA.xml manifestB.xml

[compenentA] this changed
[componentB] that changed
[componentC] foo

or

$ repo changelog manifestA.xml manifestB.xml
warning: manifest files are not explict SHAs, using branches instead
[...]

-M

pragya rana

unread,
Mar 4, 2016, 10:44:44 AM3/4/16
to Repo and Gerrit Discussion
There's already a command in repo that shows the differences between any two manifests

repo diffmanifests manifest1.xml manifest2.xml

It's pretty cool. Shows statuses like Added/Removed/Changed project as well as Added/Removed commit between two manifests.

Pragya
Reply all
Reply to author
Forward
0 new messages