~abentley/bzrtools/bzrtools.dev

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/sh
# Copyright (C) 2004 Aaron Bentley
#
# See the file "COPYING" for further information about
# the copyright and warranty status of this work.

. "$abadir/aba-lib"
cmd_exec()
{
  TMPDIR=$(pwd)
  if [ -z "$2" ]; then
    echo Two arguments required
    exit 1
  fi
  dir=$(aba_mktempdir)
  if tla get --link $1 $dir/diff-old; then
    wd=$(pwd)
    cd $dir
    aba_try tla replay --dir $dir/diff-old --reverse $1 >/dev/null
    aba_try tla get --link $1 $dir/diff-new
    diff diff-old diff-new -r -u -N > $dir/tmp.diff
    cd $wd
    mv $dir/tmp.diff $2
  fi
  rm -Rf $dir
}
cmd_desc()
{
  echo '                    get-diff : produces a diff patch file for a revision'
}

# short help for aba command -h, --help
cmd_help()
{
    cat <<EOH
produces a standard diff for a revision
usage: $abaname $(basename $0) revision version

This command produces a diff in the standard format everyone knows.  Should be
useful when tracking a non-arch project with an arch tree.

Note: this command checks out the supplied revision temporarily.

EOH
}

# extended help for aba command -H or aba help command
cmd_ext_help()
{
    cat <<EOH
EOH
}	
aba_run "$@"
# arch-tag: get-diff by Aaron Bentley (23:15 Jan 18, 2004)