Merge lp:~mwhudson/launchpad/bzr.dev-help into lp:launchpad/db-devel

Proposed by Michael Hudson-Doyle
Status: Merged
Approved by: Michael Hudson-Doyle
Approved revision: no longer in the source branch.
Merged at revision: not available
Proposed branch: lp:~mwhudson/launchpad/bzr.dev-help
Merge into: lp:launchpad/db-devel
Diff against target: None lines
To merge this branch: bzr merge lp:~mwhudson/launchpad/bzr.dev-help
Reviewer Review Type Date Requested Status
Tim Penhey (community) Approve
Review via email: mp+9234@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

Hi Tim,

This branch adds a way to test launchpad against a new bzr, in the form of a new buildbot configuration file (this will let me simplify a bit the configuration of the buildbot).

It also makes get_bzr_path() work when in this situation, i.e. when bzrlib doesn't come from an egg.

Cheers,
mwh

Revision history for this message
Tim Penhey (thumper) wrote :

I'm happy with the changes, just one question:

    return os.path.join(
        os.path.dirname(os.path.dirname(bzrlib.__file__)),
        'bzr')

Have you checked that this actually gets the bzr from the bzr branch?

review: Approve
Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

Tim Penhey wrote:
> Review: Approve
> I'm happy with the changes, just one question:
>
> return os.path.join(
> os.path.dirname(os.path.dirname(bzrlib.__file__)),
> 'bzr')
>
> Have you checked that this actually gets the bzr from the bzr branch?

Good question! Surprisingly though, it doesn't actually matter: we
don't actually ever run this command directly (at least, that I can
find), we always run "./bin/py <path-to-bzr> <args>".

I think the answer is yes, in any case.

Cheers,
mwh

Revision history for this message
Tim Penhey (thumper) wrote :

On Fri, 24 Jul 2009 16:12:08 Michael Hudson wrote:
> Tim Penhey wrote:
> > Review: Approve
> > I'm happy with the changes, just one question:
> >
> > return os.path.join(
> > os.path.dirname(os.path.dirname(bzrlib.__file__)),
> > 'bzr')
> >
> > Have you checked that this actually gets the bzr from the bzr branch?
>
> Good question! Surprisingly though, it doesn't actually matter: we
> don't actually ever run this command directly (at least, that I can
> find), we always run "./bin/py <path-to-bzr> <args>".
>
> I think the answer is yes, in any case.
>
> Cheers,
> mwh

ok

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Makefile'
2--- Makefile 2009-07-19 02:34:24 +0000
3+++ Makefile 2009-07-24 03:39:09 +0000
4@@ -6,6 +6,7 @@
5 WD:=$(shell pwd)
6 PY=$(WD)/bin/py
7 PYTHONPATH:=$(WD)/lib:$(WD)/lib/mailman:${PYTHONPATH}
8+BUILDOUT_CFG=buildout.cfg
9 VERBOSITY=-vv
10
11 TESTFLAGS=-p $(VERBOSITY)
12@@ -130,8 +131,8 @@
13 $(SHHH) $(PYTHON) bootstrap.py --ez_setup-source=ez_setup.py \
14 --download-base=download-cache/dist --eggs=eggs
15
16-$(PY): bin/buildout versions.cfg buildout.cfg setup.py
17- $(SHHH) ./bin/buildout configuration:instance_name=${LPCONFIG}
18+$(PY): bin/buildout versions.cfg $(BUILDOUT_CFG) setup.py
19+ $(SHHH) ./bin/buildout configuration:instance_name=${LPCONFIG} -c $(BUILDOUT_CFG)
20
21 compile: $(PY)
22 ${SHHH} $(MAKE) -C sourcecode build PYTHON=${PYTHON} \
23
24=== added file 'bzr-trunk-buildout.cfg'
25--- bzr-trunk-buildout.cfg 1970-01-01 00:00:00 +0000
26+++ bzr-trunk-buildout.cfg 2009-07-24 03:39:09 +0000
27@@ -0,0 +1,12 @@
28+# A custom buildout.cfg file for testing against a newer bzr.
29+# Checkout or symlink the new bzr as 'bzr.dev' in the root of the
30+# launchpad tree then run 'make BUILDOUT_CFG=bzr-trunk-buildout.cfg'.
31+
32+[buildout]
33+extends = buildout.cfg
34+
35+develop = .
36+ bzr.dev
37+
38+[versions]
39+bzr =
40
41=== modified file 'lib/lp/codehosting/__init__.py'
42--- lib/lp/codehosting/__init__.py 2009-07-21 16:57:47 +0000
43+++ lib/lp/codehosting/__init__.py 2009-07-24 03:39:09 +0000
44@@ -36,9 +36,15 @@
45
46 def get_bzr_path():
47 """Find the path to the copy of Bazaar for this rocketfuel instance"""
48- return os.path.join(
49+ bzr_in_egg_path = os.path.join(
50 os.path.dirname(os.path.dirname(bzrlib.__file__)),
51 'EGG-INFO/scripts/bzr')
52+ if os.path.exists(bzr_in_egg_path):
53+ return bzr_in_egg_path
54+ else:
55+ return os.path.join(
56+ os.path.dirname(os.path.dirname(bzrlib.__file__)),
57+ 'bzr')
58
59
60 def get_bzr_plugins_path():

Subscribers

People subscribed via source and target branches

to status/vote changes: