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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
#! /bin/sh
# Find the location of your Launchpad
if [ ! -f ~/.rocketfuel ]; then
echo "You need a file called ~/.rocketfuel containing a single line"
echo "like:"
echo " LAUNCHPAD=~/projects/ubuntu"
echo "This line should give the location of the top level directory"
echo "containing your launchpad and config checkouts."
exit 1
fi
source ~/.rocketfuel
# check that your .rocketfuel file included a line giving the launchpad
# checkout location
if [ ! $LAUNCHPAD ]; then
echo "Your ~/.rocketfuel file must include a line giving the location"
echo "of your launchpad directory, of the form"
echo "LAUNCHPAD=~/projects/ubuntu"
echo
echo "Of course, use the correct location for your setup. The"
echo "directory you specify should at least contain your configs"
echo "(in a directory called configs) and your launchpad checkout"
echo "in a directory called launchpad."
exit 1
fi
ssh-add -l
if [ $? -gt 0 ]; then
ssh-add
fi
# update the code that is brought directly into the tree
cd $LAUNCHPAD
baz cat-config configs/canonical.com/launchpad/development | while read dirname branch; do baz tree-version -d $dirname; baz update -d $dirname; done
# then check if there are unmerged changes
cd 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 merge 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"
echo " doing 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
|