~linaro-toolchain-dev/cbuild/tools

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
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copies revisions from branches into the dev focus branch as it's
# also the stacked branch.  This speeds up branching when using a
# shared repo.
#
# Runs as a cron job
#
# Author:  Loïc Minier <loic.minier@linaro.org>
#

# took 6mn41s on the first run
# 18s on the second run
#

import sys

import bzrlib.repository
import bzrlib.plugin

#bzrlib.initialize()
bzrlib.plugin.load_plugins()

r_4_7 = bzrlib.repository.Repository.open('lp:gcc-linaro/4.7')
r_4_6 = bzrlib.repository.Repository.open('lp:gcc-linaro/4.6')
#r_4_5 = bzrlib.repository.Repository.open('lp:gcc-linaro/4.5')
#r_4_4 = bzrlib.repository.Repository.open('lp:gcc-linaro/4.4')
# copy revisions from 4.6 branches into 4.7 which is the devfocus
# branch because it's used as a stacked branch
# 4.4 and 4.5 aren't updated anymore
r_4_7.fetch(r_4_6)
#r_4_6.fetch(r_4_5)
#r_4_6.fetch(r_4_4)
# copy revisions from 4.6 into 4.4 and 4.5 once to workaround LP #388269; only
# needed once ever
# copying 4.5 into 4.4 took 52mn55s on the first run and 51s on second run
# (with three up-to-date enriching branches enabled)
# copying 4.5 into 4.6 took 1h45mn13s on the first run and 48s on second run
# (with three maybe not fully up-to-date enriching branches enabled)
#r_4_4.fetch(r_4_6)
#r_4_5.fetch(r_4_6)
r_4_6.fetch(r_4_7)

print sys.argv[0], 'done'