forked from tinyprod/prod
-
Notifications
You must be signed in to change notification settings - Fork 37
/
Copy path00e_Upstream_Maintenance
123 lines (80 loc) · 3.84 KB
/
00e_Upstream_Maintenance
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
This file documents how to merge the TinyProd development trunk (tp-freeforall)
with the upstream tinyos-main trunk.
remote tos points at the tinyos development mainline gh:tinyos/tinyos-main
remote ffa points at the tp-freeforall repo: gh:tp-freeforall/prod
([email protected]:tp-freeforall/prod.git)
tp-freeforall actively tracks both the tinyprod trunk and the tinyos-main
(development) mainline. This is managed using various tags and branches.
Branches:
tos/master: master branch from tinyos-main.
ffa/tinyos-main/current: snapshot of tos/master in the ffa repo. Typically
becomes the new upstream-next.
ffa/tinyos-main/upstream: last merge point. TinyProd has included all tos changes (from
the trunk) up to this point on the tinyos-main trunk.
ffa/tinyprod-base: minimal base changes forming the TinyProd trunk.
ffa/upstream-next is merged into tinyprod-base to form the new
tinyprod-base-next (which will become the new tinyprod-base).
ffa/tp-master: working tinyprod master. Tracks tinyprod-base.
TinyProd Main (master)
ffa/msp430-int: integration branch for new msp430 code. Tracks
tinyprod-base. Example integration branch on tp-freeforall. Topic branch.
Tags:
upstream-<date>: marks state of upstream (tinyos-main) on said date.
tinyprod-base-<date>: marks state of tinyprod-base on said date.
Note: tinyprod-base-<date> is the point in the tinyprod repo where the
upstream at upstream-<date> was merged.
tos-2_1_2_<n>: a mainline tinyos maintanence release. ie. 2.1.2.0,
2.1.2.1, etc.
tpm-2_1_2-prod_<n>: a tinyprod main maintanence release. ie.
tpm-2.1.2-prod.1 etc.
All work is done on a local repository.
1) Fetch current state of ffa and tos.
git fetch ffa
git fetch tos
2) Advance ffa/tinyos-main/current <- tos/master (or other appropriate merge point)
git checkout -t tos/master
git push ffa master:tinyos-main/current (should be a fast-forward)
3) Determine appropriate upstream-next, typically will be ffa/tinyos-main/current.
This typically is the merge point. But you may go from a well defined release tag
(see below).
4) Create upstream-next branch from merge point.
git branch upstream-next ffa/tinyos-main/current (or appropriate commit, ie. rc_4_tinyos_2_1_2)
5) Create tinyprod-base-next and merge upstream-next.
git checkout -b tinyprod-base-next ffa/tinyprod-base
git merge -e upstream-next
<resolve conflicts>
<merge result>
-e makes sure that one can edit the commit message. You want to say something like:
Move tinyprod-base to new upstream-next
Merge branch 'upstream-next' into tinyprod-base-next
upstream-next: 0fe5e80 2012-04-17
6) Tag the new tinyprod-base and upstream. You want to use an annotated tag so that
it is stored as a full commit.
git tag -a -m"upstream movement" upstream-<date> upstream-next
git tag -a -m"tinyprod-base movement" tinyprod-base-<date> tinyprod-base-next
push new tags to the ffa repository:
git push ffa upstream-<date>
git push ffa tinyprod-base-<date>
7) Advance any main branches (such as tp-master).
git checkout -b tp-master-next tp-master
git merge tinyprod-base-next
<fix conflicts>
<commit result>
8) Advance any appropriate topic branches. ie msp430-int
It is assumed the topic branch is based off tp-master.
git checkout -b msp430-int-next msp430-int
git merge tp-master-next
<fix conflicts>
<commit result>
9) When happy, advance the branches.
ie. upstream, tinyprod-base, tp-master, msp430-int.
git branch -M upstream-next tinyos-main/upstream
git branch -M tinyprod-base-next tinyprod-base
git branch -M tp-master-next tp-master
git branch -M msp430-int-next msp430-int
git push ffa tinyos-main/upstream
git push ffa tinyprod-base
git push ffa tp-master
git push ffa msp430-int
10) Clean up
git b -d tinyprod-base master tinyos-main/upstream