~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to fai/aba/commands/revert

  • Committer: Robert Collins
  • Date: 2005-09-13 15:11:39 UTC
  • mto: (147.2.6) (364.1.3 bzrtools)
  • mto: This revision was merged to the branch mainline in revision 324.
  • Revision ID: robertc@robertcollins.net-20050913151139-9ac920fc9d7bda31
TODOification

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
# Copyright (C) 2004 Robin Green
 
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
# I think it's a good idea to avoid accidentally blowing away wanted changes
 
11
  aba_no_changes
 
12
 
 
13
# aba_tree_revision doesn't require an archive access
 
14
  latest_rev=$(aba_tree_revision)
 
15
  latest_ver=$(tla tree-version)
 
16
 
 
17
  aba_try tla undo -n $1
 
18
  aba_try tla sync-tree $latest_rev
 
19
  aba_try tla set-tree-version $latest_ver
 
20
}
 
21
cmd_desc()
 
22
{
 
23
  echo '                      revert : reverts tree to the specified revision'
 
24
}
 
25
cmd_help()
 
26
{
 
27
    cat <<EOH
 
28
reverts tree to the specified revision
 
29
usage: $abaname $(basename $0) [version/revision]
 
30
 
 
31
This reverts to the specified revision or version while retaining the
 
32
patch-logs, so that you can successfully run tla commit afterwards.
 
33
 
 
34
EOH
 
35
}
 
36
cmd_ext_help()
 
37
{
 
38
    cat <<EOH
 
39
EOH
 
40
}
 
41
aba_run "$@"
 
42
# arch-tag: revert by Robin Green (11:14 Mar 26, 2004)