~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to fai/aba/commands/conflicts

  • 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
 
 
9
 
# executes the command ("$@" are the arguments after the command name)
10
 
cmd_exec()
11
 
{
12
 
   root=$(tla tree-root) || exit 2;
13
 
   cd $root
14
 
 
15
 
   rej=$(find -regex '.*\.rej$');
16
 
   orig=$(find -regex '.*\.orig$');
17
 
   if [ -n "$rej" ]; then rej="$rej\n"; fi
18
 
#      echo $rej;
19
 
   if [ -n "$rej" ] || [ -n "$orig" ]; then
20
 
     echo -e -n "$rej$orig"|sed -e "s/^\.\//C   /" -e "s/\.rej$//" -e "s/\.orig$//"|sort|uniq
21
 
     exit 1;
22
 
   fi
23
 
   exit 0;
24
 
}
25
 
 
26
 
# one-liner description for aba help
27
 
cmd_desc()
28
 
{
29
 
    aba_desc $(basename $0) "Displays a list of files with conflicts"
30
 
}
31
 
 
32
 
# short help for aba command -h, --help
33
 
cmd_help()
34
 
{
35
 
    cat <<EOH
36
 
Displays a list of files with conflicts
37
 
usage: $abaname $(basename $0)
38
 
 
39
 
Lists all files for which .rej or .orig files exist.  This is not necessarily
40
 
complete, because some commands produce inline conflict markers, e.g. 
41
 
"star-merge--three-way"
42
 
 
43
 
Returns 0 if no conflicts are detected, 1 if conflicts are detected, 2 on error.
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: conflicts by Aaron Bentley  (14:53 Mar 04 2004)