~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to fai/aba/commands/get-diff

  • Committer: Alexander Belchenko
  • Date: 2008-04-28 15:35:42 UTC
  • mto: This revision was merged to the branch mainline in revision 635.
  • Revision ID: bialix@ukr.net-20080428153542-x9noc2v7uxr5w1b0
properly using HardlinkFeature in tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/sh
2
 
# Copyright (C) 2004 Aaron Bentley
3
 
#
4
 
# See the file "COPYING" for further information about
5
 
# the copyright and warranty status of this work.
6
 
 
7
 
. "$abadir/aba-lib"
8
 
cmd_exec()
9
 
{
10
 
  TMPDIR=$(pwd)
11
 
  if [ -z "$2" ]; then
12
 
    echo Two arguments required
13
 
    exit 1
14
 
  fi
15
 
  dir=$(aba_mktempdir)
16
 
  if tla get --link $1 $dir/diff-old; then
17
 
    wd=$(pwd)
18
 
    cd $dir
19
 
    aba_try tla replay --dir $dir/diff-old --reverse $1 >/dev/null
20
 
    aba_try tla get --link $1 $dir/diff-new
21
 
    diff diff-old diff-new -r -u -N > $dir/tmp.diff
22
 
    cd $wd
23
 
    mv $dir/tmp.diff $2
24
 
  fi
25
 
  rm -Rf $dir
26
 
}
27
 
cmd_desc()
28
 
{
29
 
  echo '                    get-diff : produces a diff patch file for a revision'
30
 
}
31
 
 
32
 
# short help for aba command -h, --help
33
 
cmd_help()
34
 
{
35
 
    cat <<EOH
36
 
produces a standard diff for a revision
37
 
usage: $abaname $(basename $0) revision version
38
 
 
39
 
This command produces a diff in the standard format everyone knows.  Should be
40
 
useful when tracking a non-arch project with an arch tree.
41
 
 
42
 
Note: this command checks out the supplied revision temporarily.
43
 
 
44
 
EOH
45
 
}
46
 
 
47
 
# extended help for aba command -H or aba help command
48
 
cmd_ext_help()
49
 
{
50
 
    cat <<EOH
51
 
EOH
52
 
}       
53
 
aba_run "$@"
54
 
# arch-tag: get-diff by Aaron Bentley (23:15 Jan 18, 2004)