Merge lp:~jameinel/bzr/1.17-build-updates into lp:~bzr/bzr/trunk-old

Proposed by John A Meinel
Status: Merged
Approved by: Ian Clatworthy
Approved revision: no longer in the source branch.
Merged at revision: not available
Proposed branch: lp:~jameinel/bzr/1.17-build-updates
Merge into: lp:~bzr/bzr/trunk-old
Diff against target: 177 lines (has conflicts)
Text conflict in NEWS
To merge this branch: bzr merge lp:~jameinel/bzr/1.17-build-updates
Reviewer Review Type Date Requested Status
Ian Clatworthy Approve
Review via email: mp+8753@code.launchpad.net
To post a comment you must log in.
Revision history for this message
John A Meinel (jameinel) wrote :

I'd actually like to propose that this gets merged into bzr.1.17, however that doesn't seem to be mirrored yet on Launchpad.

Anyway, when going to build the win32 installers, I updated build_release.py and ran into some problems with make and generate_docs.py

Martin recently moved the file from . into ./tools, and then updated the Makefile to set PYTHONPATH so that it could still find bzrlib.

However, on Windows you have to do:
  PYTHONPATH=.;$$PYTHONPATH
versus
  PYTHONPATH=.:$$PYTHONPATH

(semicolon versus colon for those who have trouble distinguishing those 2 pixels.)

Anyway, generate_docs.py knows where it exists in the hierarchy, so rather than trying to work out how to write portable Make, I just went ahead and wrote portable python.

I need this on the 1.17 branch in order to build the installers, so it is somewhat time critical.

Revision history for this message
John A Meinel (jameinel) wrote :

Take that back. I'm going to just force this for the 1.17rc1 installer, but we can address this however we want for 1.17 final.

Revision history for this message
Ian Clatworthy (ian-clatworthy) :
review: Approve

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-14 07:04:15 +0000
3+++ Makefile 2009-07-20 08:36:57 +0000
4@@ -176,14 +176,14 @@
5 $(wildcard $(addsuffix /*.txt, bzrlib/help_topics/en))
6
7 doc/en/user-reference/bzr_man.txt: $(MAN_DEPENDENCIES)
8- PYTHONPATH=.:$$PYTHONPATH $(PYTHON) tools/generate_docs.py -o $@ rstx
9+ $(PYTHON) tools/generate_docs.py -o $@ rstx
10
11 doc/en/release-notes/NEWS.txt: NEWS
12 $(PYTHON) -c "import shutil; shutil.copyfile('$<', '$@')"
13
14 MAN_PAGES = man1/bzr.1
15 man1/bzr.1: $(MAN_DEPENDENCIES)
16- PYTHONPATH=.:$$PYTHONPATH $(PYTHON) tools/generate_docs.py -o $@ man
17+ $(PYTHON) tools/generate_docs.py -o $@ man
18
19 upgrade_guide_dependencies = $(wildcard $(addsuffix /*.txt, doc/en/upgrade-guide))
20
21
22=== modified file 'NEWS'
23--- NEWS 2009-07-20 06:58:15 +0000
24+++ NEWS 2009-07-20 08:36:57 +0000
25@@ -6,6 +6,7 @@
26 .. contents:: List of Releases
27 :depth: 1
28
29+<<<<<<< TREE
30
31 In Development
32 ##############
33@@ -76,6 +77,23 @@
34 *********
35
36
37+=======
38+bzr 1.17
39+########
40+
41+Bug Fixes
42+*********
43+
44+* Change an extension to call the python ``frozenset()`` rather than the C
45+ api ``PyFrozenSet_New``. It turns out that python2.4 did not expose the
46+ C api. (John Arbash Meinel, #399366)
47+
48+* Fixes for the Makefile and the rename of ``generate_docs.py`` to
49+ ``tools/generate_docs.py`` to allow everything to be built on Windows.
50+ (John Arbash Meinel, #399356)
51+
52+
53+>>>>>>> MERGE-SOURCE
54 bzr 1.17rc1 "So late it's brunch" 2009-07-13
55 ############################################
56
57
58=== modified file 'bzrlib/_known_graph_pyx.pyx'
59--- bzrlib/_known_graph_pyx.pyx 2009-06-19 20:35:35 +0000
60+++ bzrlib/_known_graph_pyx.pyx 2009-07-20 08:36:57 +0000
61@@ -25,8 +25,6 @@
62 ctypedef struct PyObject:
63 pass
64
65- object PyFrozenSet_New(object)
66-
67 object PyTuple_New(Py_ssize_t n)
68 Py_ssize_t PyTuple_GET_SIZE(object t)
69 PyObject * PyTuple_GET_ITEM(object t, Py_ssize_t o)
70@@ -267,7 +265,7 @@
71 cdef Py_ssize_t pos, last_item
72 cdef long min_gdfo
73
74- heads_key = PyFrozenSet_New(keys)
75+ heads_key = frozenset(keys)
76 maybe_heads = PyDict_GetItem(self._known_heads, heads_key)
77 if maybe_heads != NULL:
78 return <object>maybe_heads
79@@ -285,7 +283,7 @@
80 if not candidate_nodes:
81 return frozenset([NULL_REVISION])
82 # The keys changed, so recalculate heads_key
83- heads_key = PyFrozenSet_New(candidate_nodes)
84+ heads_key = frozenset(candidate_nodes)
85 if PyDict_Size(candidate_nodes) < 2:
86 return heads_key
87
88@@ -330,7 +328,7 @@
89 node = <_KnownGraphNode>temp_node
90 if not node.seen:
91 PyList_Append(heads, node.key)
92- heads = PyFrozenSet_New(heads)
93+ heads = frozenset(heads)
94 for pos from 0 <= pos < PyList_GET_SIZE(cleanup):
95 node = _get_list_node(cleanup, pos)
96 node.seen = 0
97
98=== modified file 'tools/generate_docs.py'
99--- tools/generate_docs.py 2009-06-19 09:27:13 +0000
100+++ tools/generate_docs.py 2009-07-20 08:36:57 +0000
101@@ -32,12 +32,13 @@
102
103 Run "%(prog)s --help" for the option reference.
104 """
105-
106-import bzrlib.commands
107+import os
108 import sys
109 from optparse import OptionParser
110
111-from bzrlib import doc_generate
112+sys.path.insert(0, os.path.dirname(os.path.dirname(__file__)))
113+
114+from bzrlib import commands, doc_generate
115
116 def main(argv):
117 parser = OptionParser(usage="""%prog [options] OUTPUT_FORMAT
118@@ -69,8 +70,8 @@
119 if len(args) != 2:
120 parser.print_help()
121 sys.exit(1)
122-
123- bzrlib.commands.install_bzr_command_hooks()
124+
125+ commands.install_bzr_command_hooks()
126
127 infogen_type = args[1]
128 infogen_mod = doc_generate.get_module(infogen_type)
129
130=== modified file 'tools/win32/build_release.py'
131--- tools/win32/build_release.py 2009-06-17 18:11:58 +0000
132+++ tools/win32/build_release.py 2009-07-20 08:36:57 +0000
133@@ -4,12 +4,12 @@
134 # When preparing a new release, make sure to set all of these to the latest
135 # values.
136 VERSIONS = {
137- 'bzr': '1.16',
138- 'qbzr': '0.11.0',
139- 'bzrtools': '1.16.0',
140- 'bzr-svn': '0.6.1',
141- 'bzr-rebase': '0.5.0',
142- 'subvertpy': '0.6.7',
143+ 'bzr': '1.17',
144+ 'qbzr': '0.12',
145+ 'bzrtools': '1.17.0',
146+ 'bzr-svn': '0.6.3-win32-1',
147+ 'bzr-rewrite': '0.5.1',
148+ 'subvertpy': '0.6.8',
149 }
150
151 # This will be passed to 'make' to ensure we build with the right python
152@@ -125,7 +125,7 @@
153
154
155 def _plugin_tag_name(plugin_name):
156- if plugin_name in ('bzr-svn', 'bzr-rebase', 'subvertpy'):
157+ if plugin_name in ('bzr-svn', 'bzr-rewrite', 'subvertpy'):
158 return '%s-%s' % (plugin_name, VERSIONS[plugin_name])
159 # bzrtools and qbzr use 'release-X.Y.Z'
160 return 'release-' + VERSIONS[plugin_name]
161@@ -134,7 +134,7 @@
162 def update_plugin(plugin_name):
163 release_dir = get_plugin_release_dir(plugin_name)
164 if not os.path.isdir(plugin_name):
165- if plugin_name in ('bzr-svn', 'bzr-rebase'):
166+ if plugin_name in ('bzr-svn', 'bzr-rewrite'):
167 # bzr-svn uses a different repo format
168 call_or_fail([bzr(), 'init-repo', '--rich-root-pack', plugin_name])
169 else:
170@@ -195,7 +195,7 @@
171 install_plugin('bzrtools')
172 install_plugin('qbzr')
173 install_plugin('bzr-svn')
174- install_plugin('bzr-rebase')
175+ install_plugin('bzr-rewrite')
176
177 build_installer()
178