~launchpad-pqm/launchpad/devel

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
#! /bin/sh

# update the code that is brought directly into the tree
cd ~/projects/ubuntu
baz cat-config configs/canonical.com/launchpad/development | xargs -n 2 baz update -d

# then check if there are unmerged changes
cd ~/projects/ubuntu/launchpad
baz diff -q
if [ $? -gt 0 ]; then
    echo "You've got changes! Please commit them before refueling"
    exit 1
fi;

# check for loose files
baz status --lint --untagged-files --strict
if [ $? -gt 0 ]; then
  echo "You have untagged files. Please add them and commit before refueling."
  exit 1
fi

# now merge launchpad with the rocketfuel repo
baz star-merge --two-way rocketfuel@canonical.com/launchpad--devel--0

# check for conflicts, and if none exist, commit the merge
FILELIST=$(find . -name "*.orig" -or -name "*.rej" -print)
if [ ! -z "$FILELIST" ]; then
  echo "WARNING: You have conflicts. Please resolve them and commit before doing"
  echo "         any additional work."
  exit 1
else
  baz diff --quiet
  if [ $? -gt 0 ]; then
    # commit the merged changes
    baz commit -s "merge rocketfuel"
    # show the commited star-merge delta
    baz delta --diffs $(baz logs -f | tail -2) | less
  fi
fi