Merge lp:~rockstar/launchpad/code-js-move into lp:launchpad

Proposed by Paul Hummer
Status: Merged
Approved by: Brad Crittenden
Approved revision: no longer in the source branch.
Merged at revision: not available
Proposed branch: lp:~rockstar/launchpad/code-js-move
Merge into: lp:launchpad
Prerequisite: lp:~rockstar/launchpad/code-js-file-reorg
Diff against target: 52 lines (+36/-0)
2 files modified
Makefile (+1/-0)
utilities/lp-deps.py (+35/-0)
To merge this branch: bzr merge lp:~rockstar/launchpad/code-js-move
Reviewer Review Type Date Requested Status
Brad Crittenden (community) code Approve
Review via email: mp+22656@code.launchpad.net

Description of the change

This branch moves lib/canonical/launchpad/javascript/code to
lib/lp/code/javascript. That's all, very mechanical.

To post a comment you must log in.
Revision history for this message
Brad Crittenden (bac) wrote :

Nice new script. As we discussed on IRC please chat with Curtis before landing this just to coordinate the new work he's done on javascript test discovery, as a courtesy.

review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'Makefile'
--- Makefile 2010-03-26 13:23:20 +0000
+++ Makefile 2010-04-05 17:14:33 +0000
@@ -149,6 +149,7 @@
149 -s lib/canonical/launchpad/javascript \149 -s lib/canonical/launchpad/javascript \
150 -b $(LP_BUILT_JS_ROOT) \150 -b $(LP_BUILT_JS_ROOT) \
151 $(shell $(HERE)/utilities/yui-deps.py) \151 $(shell $(HERE)/utilities/yui-deps.py) \
152 $(shell $(HERE)/utilities/lp-deps.py) \
152 lib/canonical/launchpad/icing/lazr/build/lazr.js153 lib/canonical/launchpad/icing/lazr/build/lazr.js
153 ${SHHH} bin/jssize154 ${SHHH} bin/jssize
154155
155156
=== renamed directory 'lib/canonical/launchpad/javascript/code' => 'lib/lp/code/javascript'
=== added file 'utilities/lp-deps.py'
--- utilities/lp-deps.py 1970-01-01 00:00:00 +0000
+++ utilities/lp-deps.py 2010-04-05 17:14:33 +0000
@@ -0,0 +1,35 @@
1#!/usr/bin/python
2#
3# Copyright 2010 Canonical Ltd. This software is licensed under the
4# GNU Affero General Public License version 3 (see the file LICENSE).
5
6"""Print the Launchpad javascript files we are using.
7
8The output of this script is meant to be given to the jsbuild script so that
9they are included in the launchpad.js file.
10"""
11
12__metaclass__ = type
13
14import os
15import sys
16
17TOP = os.path.abspath(
18 os.path.join(os.path.dirname(__file__), '..'))
19# JS_DIRSET is a tuple of the dir where the code exists, and the name of the
20# symlink it should be linked as in the icing build directory.
21JS_DIRSET = [
22 (os.path.join('lib', 'lp', 'code', 'javascript'), 'code'),]
23ICING_ROOT = os.path.join(TOP, 'lib', 'canonical', 'launchpad', 'icing')
24ICING_BUILD = os.path.join(ICING_ROOT, 'build')
25
26for DIRSET in JS_DIRSET:
27 full_dir = os.path.join(TOP, DIRSET[0])
28 # We don't want the tests to be included. If we want to nest the files in
29 # more folders though, this is where we change it.
30 for filename in os.listdir(full_dir):
31 if filename.endswith('.js'):
32 absolute_filename = os.path.join(full_dir, filename)
33 print absolute_filename
34
35 os.symlink(full_dir, os.path.join(ICING_BUILD, DIRSET[1]))