blob: db64328c7fb1c46dd706bfb7840e3f298873262d [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
maxdeps=$2
function handle_one {
((maxdeps--))
if [ $maxdeps -eq 0 ]; then
exit 1
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
exit 0