2
## Copyright (C) 2004 Aaron Bentley
4
## See the file "COPYING" for further information about
5
## the copyright and warranty status of this work.
9
# this command works by attempting to remove revisions. Any revision that
10
# cannot be removed without producing conflicts is a dependency.
12
# executes the command ("$@" are the arguments after the command name)
16
gooddir=$abadir/gooddir
17
testdir=$abadir/testdir
21
version="$(tla parse-package-name -a $1)/$(tla parse-package-name --package-version $1)"
22
supplied="$version--$(tla parse-package-name -l $1)"
24
tla get $supplied $gooddir > /dev/null
25
cp -a $gooddir testdir
27
patches=$(tla logs --reverse --dir $gooddir)
28
for patch in $patches;
30
revision="$version--$patch"
31
if [ $revision = $supplied ]; then
32
# echo "skipping: $patch"
34
elif tla replay --dir $testdir --reverse "$version--$patch" > /dev/null 2>/dev/null; then
35
# echo "not required: $patch"
36
tla replay --dir $gooddir --reverse "$version--$patch" > /dev/null;
38
# echo "required: $patch"
39
required="$required $patch"
41
cp -a $gooddir testdir
47
# echo Required revisions:
48
oneperline $required|sort -t - -k 2 -n
58
# one-liner description for aba help
61
aba_desc $(basename $0) "Determines a revision's dependencies"
64
# short help for aba command -h, --help
68
determines a revision's dependencies
69
usage: $abaname $(basename $0) revision
71
Determines the textual dependencies of a revision by removing everything which
72
can be removed without producing conflicts.
77
# extended help for aba command -H or aba help command
81
The guarantee provided by this command is that list of patches can be applied
82
to the base revision without producing conflicts. No guarantee can be provided
83
that the resulting tree is usable.
89
# arch-tag: rev-depends by Aaron Bentley (16:53 Feb 15 2004)