~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
#! /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"

# executes the command ("$@" are the arguments after the command name)
cmd_exec()
{
   root=$(tla tree-root)
   if [ $? -ne 0 ]; then aba_panic "Can't find tree root!"; fi
   cd $root
   find -name '*.rej' -print0 |xargs -0r rm
   find -name '*.orig' -print0 |xargs -0r rm
   tla tree-lint -m|xargs -r rm
   tla undo $@
}

# one-liner description for aba help
cmd_desc()
{
    aba_desc $(basename $0) "Undo that almost always succeeds"
}

# short help for aba command -h, --help
cmd_help()
{
    cat <<EOH
Undo that almost always succeeds
usage: $abaname $(basename $0) [OPTIONS]

This undo will remove all .rej, .orig, and non-matching .id files before
undoing.  Its intended use is for undoing merges that produced too many
conflicts.

It takes the same parameters as 'undo'
EOH
}

# extended help for aba command -H or aba help command
cmd_ext_help()
{
    cat <<EOH
EOH
}	

aba_run "$@"
#  arch-tag: hardundo by Aaron Bentley  (10:42 May 12 2004)