~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to fai/aba/commands/rebase

  • Committer: Aaron Bentley
  • Date: 2005-06-07 18:52:04 UTC
  • Revision ID: abentley@panoramicfeedback.com-20050607185204-5fc1f0e3d393b909
Added NEWS, obsoleted bzr-pull

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
 
 
9
 
# executes the command ("$@" are the arguments after the command name)
10
 
cmd_exec()
11
 
{
12
 
    if [ -z "$1" ]; then
13
 
        echo "Please enter a target version"
14
 
        exit
15
 
    fi
16
 
    new_version=$1
17
 
    if [ -n "$2" ]; then
18
 
      old_version=$2
19
 
    else
20
 
      old_version=$(aba_fqversion $(aba_tree_source))
21
 
    fi
22
 
    delta_to=$(tla logs -f -r | head -n 1)
23
 
    delta_from=$(tla logs -f -r $old_version| head -n 1)
24
 
    tla tag -S --no-cacherev $old_version $new_version
25
 
    aba_change_version $new_version
26
 
    tla apply-delta $delta_from $delta_to
27
 
}
28
 
 
29
 
# one-liner description for aba help
30
 
cmd_desc()
31
 
{
32
 
    aba_desc $(basename $0) "Create a new version with a different tree-source"
33
 
}
34
 
 
35
 
# short help for aba command -h, --help
36
 
cmd_help()
37
 
{
38
 
    cat <<EOH
39
 
Create a new version with a different tree-source
40
 
usage: $abaname $(basename $0) TARGET-VERSION [BASIS]
41
 
 
42
 
If the basis is supplied, it may be a version or revision if not supplied, the
43
 
tag-source is used.
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
 
 
54
 
aba_run "$@"
55
 
#  arch-tag: rebase by Aaron Bentley  (23:06 Jun 05 2004)