~abentley/bzrtools/bzrtools.dev

147.1.3 by Robert Collins
test and deliver basic pending-merges into bzr so that merging is recorded
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
unset ABAFILTER
7
export ABAFILTER
8
9
. "$abadir/aba-lib"
10
cmd_exec()
11
{
12
  aba_merge_source $1
13
  aba_no_changes
14
  for source in $sourcever; do
15
  echo "* merge source $sourcetype: $source"
16
  tla star-merge $source;
17
  if [ $? -ne 0 ]; then 
18
    tla log-for-merge >> $(tla make-log)
19
    echo "Problems encountered during merge (see aba conflicts)" >&2
20
    exit 1;
21
  fi
22
  if ! tla changes > /dev/null; then
23
    aba emlog
24
    exit 0
25
  else
26
    echo "* tree is already up to date with $source"
27
  fi
28
  done
29
}
30
cmd_desc()
31
{
32
  echo '                       merge : star-merge with =partner-versions, then edit log'
33
}
34
cmd_help()
35
{
36
cat <<EOH
37
performs an automated star-merge
38
usage: $abaname merge [version]
39
40
Selects the source version from (in order of selection):
41
1. The supplied version
42
2. The contents of =partner-versions in {arch}
43
3. The contents of ++merge-source in the project tree root
44
4. The tag-source of the project tree, as determined from the patch-logs
45
46
It will not perform the merge if there are uncommitted changes in the tree.
47
48
If there are conflicts, it will warn that problems were encountered.
49
50
Otherwise, if the merge changed the tree, it will do $abaname emlog to produce
51
a log message.
52
53
If the merge was successfully applied, but did not change the tree, it will say so.
54
55
++merge-source or =partner-versions may contain multiple merge sources,
56
separated by whitespace.  In this case, each source will be tried in order,
57
stopping at the first merge that actually changes the tree.
58
59
EOH
60
}
61
cmd_ext_help()
62
{
63
  echo -n
64
}
65
aba_run "$@"
66
# arch-tag: merge by Aaron Bentley (11:15 Jan 26, 2004)