blob: 2c2f8461765de765bc8998792ec5f185b366808f [file] [log] [blame]
#!/bin/bash
#
# (Try to) Show the dependency list for applying a given commit on the current
# branch.
#
if [ $# -ne 1 ] && [ $# -ne 2 ]; then
echo "Usage: stable deps <commit sha1> [Max deps to show]"
exit 1
fi
set -x
maxdeps=$2
function handle_one {
((maxdeps--))
if [ $maxdeps -eq 0 ]; then
exit
fi
stable commit-in-tree $1
if [ $? -eq 1 ]; then
return
fi
echo $1
for i in $(stable-deps.py $1); do
handle_one $i
done
}
handle_one $1