Merge lp:~bac/lpsetup/initrepo into lp:lpsetup

Proposed by Brad Crittenden
Status: Merged
Approved by: Brad Crittenden
Approved revision: 44
Merged at revision: 43
Proposed branch: lp:~bac/lpsetup/initrepo
Merge into: lp:lpsetup
Diff against target: 462 lines (+86/-61)
13 files modified
lpsetup/cli.py (+2/-2)
lpsetup/handlers.py (+16/-3)
lpsetup/subcommands/inithost.py (+2/-2)
lpsetup/subcommands/initrepo.py (+33/-2)
lpsetup/subcommands/install.py (+11/-33)
lpsetup/subcommands/lxcinstall.py (+2/-4)
lpsetup/tests/subcommands/test_inithost.py (+1/-1)
lpsetup/tests/subcommands/test_initlxc.py (+1/-1)
lpsetup/tests/subcommands/test_initrepo.py (+10/-6)
lpsetup/tests/subcommands/test_install.py (+2/-2)
lpsetup/tests/subcommands/test_lxcinstall.py (+1/-3)
lpsetup/tests/test_handlers.py (+2/-2)
pre-commit.sh (+3/-0)
To merge this branch: bzr merge lp:~bac/lpsetup/initrepo
Reviewer Review Type Date Requested Status
Gary Poster (community) Approve
Review via email: mp+113625@code.launchpad.net

Commit message

Rename the 'get' subcommand to 'initrepo' as it is more descriptive. Move setup_bzr_locations to init_repo. Create handle_lp_user_from_login for use when inithost has already been run.

Description of the change

* Rename the 'get' subcommand to 'initrepo' as it is more descriptive.

* Move setup_bzr_locations to init_repo.

* Create handle_lp_user_from_login for use when inithost has already been run.

To post a comment you must log in.
Revision history for this message
Gary Poster (gary) :
review: Approve
Revision history for this message
Launchpad QA Bot (lpqabot) wrote :

The attempt to merge lp:~bac/lpsetup/initrepo into lp:lpsetup failed. Below is the output from the failed tests.

/bin/sh: 1: pre-commit.sh: not found

Revision history for this message
Launchpad QA Bot (lpqabot) wrote :

The attempt to merge lp:~bac/lpsetup/initrepo into lp:lpsetup failed. Below is the output from the failed tests.

/bin/sh: 1: pre-commit.sh: not found

Revision history for this message
Launchpad QA Bot (lpqabot) wrote :

The attempt to merge lp:~bac/lpsetup/initrepo into lp:lpsetup failed. Below is the output from the failed tests.

/bin/sh: 1: pre-commit.sh: not found

Revision history for this message
Launchpad QA Bot (lpqabot) wrote :

The attempt to merge lp:~bac/lpsetup/initrepo into lp:lpsetup failed. Below is the output from the failed tests.

/bin/sh: 1: pre-commit.sh: not found

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lpsetup/cli.py'
--- lpsetup/cli.py 2012-07-02 20:43:36 +0000
+++ lpsetup/cli.py 2012-07-06 11:32:19 +0000
@@ -16,9 +16,9 @@
16 exceptions,16 exceptions,
17 )17 )
18from lpsetup.subcommands import (18from lpsetup.subcommands import (
19 get,
20 inithost,19 inithost,
21 initlxc,20 initlxc,
21 initrepo,
22 install,22 install,
23 lxcinstall,23 lxcinstall,
24 version,24 version,
@@ -29,7 +29,7 @@
29 ('install', install.SubCommand),29 ('install', install.SubCommand),
30 ('inithost', inithost.SubCommand),30 ('inithost', inithost.SubCommand),
31 ('initlxc', initlxc.SubCommand),31 ('initlxc', initlxc.SubCommand),
32 ('get', get.SubCommand),32 ('initrepo', initrepo.SubCommand),
33 ('lxc-install', lxcinstall.SubCommand),33 ('lxc-install', lxcinstall.SubCommand),
34 ('version', version.SubCommand),34 ('version', version.SubCommand),
35 ]35 ]
3636
=== modified file 'lpsetup/handlers.py'
--- lpsetup/handlers.py 2012-07-02 20:43:36 +0000
+++ lpsetup/handlers.py 2012-07-06 11:32:19 +0000
@@ -7,7 +7,8 @@
7__metaclass__ = type7__metaclass__ = type
8__all__ = [8__all__ = [
9 'handle_directories',9 'handle_directories',
10 'handle_lpuser',10 'handle_lpuser_as_username',
11 'handle_lpuser_from_lplogin',
11 'handle_ssh_keys',12 'handle_ssh_keys',
12 'handle_testing',13 'handle_testing',
13 'handle_user',14 'handle_user',
@@ -16,10 +17,12 @@
1617
17import os18import os
18import pwd19import pwd
20import subprocess
1921
20from shelltoolbox import (22from shelltoolbox import (
21 bzr_whois,23 bzr_whois,
22 get_user_home,24 get_user_home,
25 run,
23 user_exists,26 user_exists,
24 )27 )
2528
@@ -60,7 +63,7 @@
60 namespace.home_dir = get_user_home(namespace.user)63 namespace.home_dir = get_user_home(namespace.user)
6164
6265
63def handle_lpuser(namespace):66def handle_lpuser_as_username(namespace):
64 """Handle lpuser argument.67 """Handle lpuser argument.
6568
66 If lpuser is not provided by namespace, the user name is used::69 If lpuser is not provided by namespace, the user name is used::
@@ -70,7 +73,7 @@
7073
71 >>> import argparse74 >>> import argparse
72 >>> namespace = argparse.Namespace(user=username, lpuser=None)75 >>> namespace = argparse.Namespace(user=username, lpuser=None)
73 >>> handle_lpuser(namespace)76 >>> handle_lpuser_as_username(namespace)
74 >>> namespace.lpuser == username77 >>> namespace.lpuser == username
75 True78 True
76 """79 """
@@ -78,6 +81,16 @@
78 namespace.lpuser = namespace.user81 namespace.lpuser = namespace.user
7982
8083
84def handle_lpuser_from_lplogin(namespace):
85 """Handle lpuser argument.
86 """
87 if getattr(namespace, 'lpuser', None) is None:
88 try:
89 namespace.lpuser = run('bzr', 'launchpad-login').strip()
90 except subprocess.CalledProcessError:
91 raise ValidationError("No bzr launchpad-login set.")
92
93
81def handle_userdata(namespace, whois=bzr_whois):94def handle_userdata(namespace, whois=bzr_whois):
82 """Handle full_name and email arguments.95 """Handle full_name and email arguments.
8396
8497
=== modified file 'lpsetup/subcommands/inithost.py'
--- lpsetup/subcommands/inithost.py 2012-07-03 18:18:24 +0000
+++ lpsetup/subcommands/inithost.py 2012-07-06 11:32:19 +0000
@@ -26,7 +26,7 @@
2626
27from lpsetup import argparser27from lpsetup import argparser
28from lpsetup.handlers import (28from lpsetup.handlers import (
29 handle_lpuser,29 handle_lpuser_as_username,
30 handle_ssh_keys,30 handle_ssh_keys,
31 handle_user,31 handle_user,
32 handle_userdata,32 handle_userdata,
@@ -166,7 +166,7 @@
166 needs_root = True166 needs_root = True
167 handlers = (167 handlers = (
168 handle_user,168 handle_user,
169 handle_lpuser,169 handle_lpuser_as_username,
170 handle_userdata,170 handle_userdata,
171 handle_ssh_keys,171 handle_ssh_keys,
172 )172 )
173173
=== renamed file 'lpsetup/subcommands/get.py' => 'lpsetup/subcommands/initrepo.py'
--- lpsetup/subcommands/get.py 2012-07-03 20:05:47 +0000
+++ lpsetup/subcommands/initrepo.py 2012-07-06 11:32:19 +0000
@@ -2,7 +2,7 @@
2# Copyright 2012 Canonical Ltd. This software is licensed under the2# Copyright 2012 Canonical Ltd. This software is licensed under the
3# GNU Affero General Public License version 3 (see the file LICENSE).3# GNU Affero General Public License version 3 (see the file LICENSE).
44
5"""get subcommand: prepare source code destinations and download it."""5"""initrepo subcommand: prepare source code destinations and download it."""
66
7__metaclass__ = type7__metaclass__ = type
8__all__ = [8__all__ = [
@@ -18,10 +18,15 @@
18from lpsetup.settings import (18from lpsetup.settings import (
19 CHECKOUT_DIR,19 CHECKOUT_DIR,
20 LP_BRANCH_NAME,20 LP_BRANCH_NAME,
21 LP_BZR_LOCATIONS,
21 LP_CHECKOUT_NAME,22 LP_CHECKOUT_NAME,
22 LP_SSH_REPO,23 LP_SSH_REPO,
23 )24 )
24from lpsetup.utils import call25from lpsetup.utils import (
26 call,
27 ConfigParser,
28 get_file_header,
29 )
2530
2631
27def fetch(source, repository, branch_name, checkout_name):32def fetch(source, repository, branch_name, checkout_name):
@@ -37,16 +42,42 @@
37 call('bzr', 'co', '--lightweight', branch_dir, checkout_dir)42 call('bzr', 'co', '--lightweight', branch_dir, checkout_dir)
3843
3944
45def setup_bzr_locations(lpuser, repository, template=LP_BZR_LOCATIONS):
46 """Set up bazaar locations."""
47 context = {
48 'checkout_dir': os.path.join(repository, LP_BRANCH_NAME),
49 'repository': repository,
50 'lpuser': lpuser,
51 }
52
53 bazaar_dir = os.path.expanduser('~/.bazaar')
54 mkdirs(bazaar_dir)
55 path = os.path.join(bazaar_dir, 'locations.conf')
56 parser = ConfigParser()
57 parser.read(path)
58 for section_template, options in template.items():
59 section = section_template.format(**context)
60 if not parser.has_section(section):
61 parser.add_section(section)
62 for option, value in options.items():
63 parser.set(section, option, value.format(**context))
64 with open(path, 'w') as f:
65 f.write(get_file_header() + '\n')
66 parser.write(f)
67
68
40class SubCommand(argparser.StepsBasedSubCommand):69class SubCommand(argparser.StepsBasedSubCommand):
41 """Get the Launchpad source"""70 """Get the Launchpad source"""
4271
43 steps = (72 steps = (
44 (fetch, 'source', 'repository', 'branch_name', 'checkout_name'),73 (fetch, 'source', 'repository', 'branch_name', 'checkout_name'),
74 (setup_bzr_locations, 'lpuser', 'repository'),
45 )75 )
4676
47 help = __doc__77 help = __doc__
48 handlers = (78 handlers = (
49 handlers.handle_user,79 handlers.handle_user,
80 handlers.handle_lpuser_from_lplogin,
50 handlers.handle_directories,81 handlers.handle_directories,
51 handlers.handle_source,82 handlers.handle_source,
52 )83 )
5384
=== modified file 'lpsetup/subcommands/install.py'
--- lpsetup/subcommands/install.py 2012-07-03 20:05:47 +0000
+++ lpsetup/subcommands/install.py 2012-07-06 11:32:19 +0000
@@ -6,7 +6,7 @@
66
7__metaclass__ = type7__metaclass__ = type
8__all__ = [8__all__ = [
9 'setup_bzr_locations',9 'setup_bzr_locations_as_root',
10 'setup_launchpad',10 'setup_launchpad',
11 'SubCommand',11 'SubCommand',
12 ]12 ]
@@ -24,7 +24,10 @@
24 )24 )
2525
26from lpsetup.handlers import handle_directories26from lpsetup.handlers import handle_directories
27from lpsetup.subcommands import inithost27from lpsetup.subcommands import (
28 inithost,
29 initrepo,
30 )
28from lpsetup.settings import (31from lpsetup.settings import (
29 CHECKOUT_DIR,32 CHECKOUT_DIR,
30 DEPENDENCIES_DIR,33 DEPENDENCIES_DIR,
@@ -32,14 +35,9 @@
32 HOSTS_FILE,35 HOSTS_FILE,
33 LP_APACHE_MODULES,36 LP_APACHE_MODULES,
34 LP_APACHE_ROOTS,37 LP_APACHE_ROOTS,
35 LP_BZR_LOCATIONS,
36 LP_BRANCH_NAME,38 LP_BRANCH_NAME,
37 )39 )
38from lpsetup.utils import (40from lpsetup.utils import call
39 call,
40 ConfigParser,
41 get_file_header,
42 )
4341
4442
45def make_launchpad(user, checkout_dir, install=False):43def make_launchpad(user, checkout_dir, install=False):
@@ -99,36 +97,15 @@
99 file_append(HOSTS_FILE, line)97 file_append(HOSTS_FILE, line)
10098
10199
102def setup_bzr_locations(user, lpuser, repository, template=LP_BZR_LOCATIONS):100def setup_bzr_locations_as_root(user, lpuser, repository):
103 """Set up bazaar locations."""101 with su(user):
104 context = {102 initrepo.setup_bzr_locations(lpuser, repository)
105 'checkout_dir': os.path.join(repository, LP_BRANCH_NAME),
106 'repository': repository,
107 'lpuser': lpuser,
108 }
109 with su(user) as env:
110 bazaar_dir = os.path.join(env.home, '.bazaar')
111 mkdirs(bazaar_dir)
112 path = os.path.join(bazaar_dir, 'locations.conf')
113 parser = ConfigParser()
114 parser.read(path)
115 for section_template, options in template.items():
116 section = section_template.format(**context)
117 if not parser.has_section(section):
118 parser.add_section(section)
119 for option, value in options.items():
120 parser.set(section, option, value.format(**context))
121 with open(path, 'w') as f:
122 f.write(get_file_header() + '\n')
123 parser.write(f)
124103
125104
126class SubCommand(inithost.SubCommand):105class SubCommand(inithost.SubCommand):
127 """Install the Launchpad environment."""106 """Install the Launchpad environment."""
128107
129 # The steps for "install" are a superset of the steps for "inithost".108 # The steps for "install" are a superset of the steps for "inithost".
130 setup_bzr_locations_step = (setup_bzr_locations,
131 'user', 'lpuser', 'repository')
132109
133 @property110 @property
134 def steps(self):111 def steps(self):
@@ -138,7 +115,8 @@
138 return (115 return (
139 inithost.SubCommand.initialize_step,116 inithost.SubCommand.initialize_step,
140 lxcinstall.SubCommand.fetch_step,117 lxcinstall.SubCommand.fetch_step,
141 self.setup_bzr_locations_step,118 (setup_bzr_locations_as_root,
119 'user', 'lpuser', 'repository'),
142 inithost.SubCommand.setup_apt_step,120 inithost.SubCommand.setup_apt_step,
143 (setup_launchpad,121 (setup_launchpad,
144 'user', 'dependencies_dir', 'repository', 'valid_ssh_keys'),122 'user', 'dependencies_dir', 'repository', 'valid_ssh_keys'),
145123
=== modified file 'lpsetup/subcommands/lxcinstall.py'
--- lpsetup/subcommands/lxcinstall.py 2012-07-03 20:05:47 +0000
+++ lpsetup/subcommands/lxcinstall.py 2012-07-06 11:32:19 +0000
@@ -37,7 +37,6 @@
37from lpsetup.subcommands import (37from lpsetup.subcommands import (
38 inithost,38 inithost,
39 initlxc,39 initlxc,
40 install,
41 )40 )
42from lpsetup.utils import (41from lpsetup.utils import (
43 call,42 call,
@@ -86,8 +85,8 @@
86 """Set up the Launchpad environment inside an LXC."""85 """Set up the Launchpad environment inside an LXC."""
87 # Use ssh to call this script from inside the container.86 # Use ssh to call this script from inside the container.
88 args = [87 args = [
89 'install', '-u', user, '-s', 'setup_apt', 'setup_launchpad',88 'install', '-u', user, '-s', 'setup_apt', 'setup_bzr_locatoins',
90 '-d', dependencies_dir, '-r', repository89 'setup_launchpad', '-d', dependencies_dir, '-r', repository,
91 ]90 ]
92 cmd = this_command(repository, args)91 cmd = this_command(repository, args)
93 ssh(lxc_name, cmd, key=ssh_key_path)92 ssh(lxc_name, cmd, key=ssh_key_path)
@@ -154,7 +153,6 @@
154 steps = (153 steps = (
155 inithost.SubCommand.initialize_step,154 inithost.SubCommand.initialize_step,
156 fetch_step,155 fetch_step,
157 install.SubCommand.setup_bzr_locations_step,
158 (create_scripts,156 (create_scripts,
159 'lxc_name', 'ssh_key_path', 'user'),157 'lxc_name', 'ssh_key_path', 'user'),
160 initlxc.SubCommand.create_lxc_step + ('install_subunit',),158 initlxc.SubCommand.create_lxc_step + ('install_subunit',),
161159
=== modified file 'lpsetup/tests/subcommands/test_inithost.py'
--- lpsetup/tests/subcommands/test_inithost.py 2012-06-26 18:20:23 +0000
+++ lpsetup/tests/subcommands/test_inithost.py 2012-07-06 11:32:19 +0000
@@ -40,7 +40,7 @@
40 expected_arguments = get_arguments()40 expected_arguments = get_arguments()
41 expected_handlers = (41 expected_handlers = (
42 handlers.handle_user,42 handlers.handle_user,
43 handlers.handle_lpuser,43 handlers.handle_lpuser_as_username,
44 handlers.handle_userdata,44 handlers.handle_userdata,
45 handlers.handle_ssh_keys,45 handlers.handle_ssh_keys,
46 )46 )
4747
=== modified file 'lpsetup/tests/subcommands/test_initlxc.py'
--- lpsetup/tests/subcommands/test_initlxc.py 2012-06-28 17:22:45 +0000
+++ lpsetup/tests/subcommands/test_initlxc.py 2012-07-06 11:32:19 +0000
@@ -46,7 +46,7 @@
46 expected_arguments = get_arguments()46 expected_arguments = get_arguments()
47 expected_handlers = (47 expected_handlers = (
48 handlers.handle_user,48 handlers.handle_user,
49 handlers.handle_lpuser,49 handlers.handle_lpuser_as_username,
50 handlers.handle_userdata,50 handlers.handle_userdata,
51 handlers.handle_ssh_keys,51 handlers.handle_ssh_keys,
52 )52 )
5353
=== renamed file 'lpsetup/tests/subcommands/test_get.py' => 'lpsetup/tests/subcommands/test_initrepo.py'
--- lpsetup/tests/subcommands/test_get.py 2012-07-02 19:53:45 +0000
+++ lpsetup/tests/subcommands/test_initrepo.py 2012-07-06 11:32:19 +0000
@@ -2,20 +2,22 @@
2# Copyright 2012 Canonical Ltd. This software is licensed under the2# Copyright 2012 Canonical Ltd. This software is licensed under the
3# GNU Affero General Public License version 3 (see the file LICENSE).3# GNU Affero General Public License version 3 (see the file LICENSE).
44
5"""Tests for the get sub command."""5"""Tests for the initrepo subcommand."""
66
7import unittest7import unittest
88
9from lpsetup import handlers9from lpsetup import handlers
10from lpsetup.subcommands import get10from lpsetup.subcommands import initrepo
11from lpsetup.tests.utils import (11from lpsetup.tests.utils import (
12 get_random_string,12 get_random_string,
13 StepsBasedSubCommandTestMixin,13 StepsBasedSubCommandTestMixin,
14 )14 )
1515
1616
17fetch_step = (get.fetch,17fetch_step = (initrepo.fetch,
18 ['source', 'repository', 'branch_name', 'checkout_name'])18 ['source', 'repository', 'branch_name', 'checkout_name'])
19setup_bzr_locations_step = (initrepo.setup_bzr_locations,
20 ['lpuser', 'repository'])
1921
2022
21def get_arguments():23def get_arguments():
@@ -26,17 +28,19 @@
26 )28 )
2729
2830
29class GetTest(StepsBasedSubCommandTestMixin, unittest.TestCase):31class InitrepoTest(StepsBasedSubCommandTestMixin, unittest.TestCase):
3032
31 sub_command_name = 'get'33 sub_command_name = 'initrepo'
32 sub_command_class = get.SubCommand34 sub_command_class = initrepo.SubCommand
33 expected_arguments = get_arguments()35 expected_arguments = get_arguments()
34 expected_handlers = (36 expected_handlers = (
35 handlers.handle_user,37 handlers.handle_user,
38 handlers.handle_lpuser_from_lplogin,
36 handlers.handle_directories,39 handlers.handle_directories,
37 handlers.handle_source,40 handlers.handle_source,
38 )41 )
39 expected_steps = (42 expected_steps = (
40 fetch_step,43 fetch_step,
44 setup_bzr_locations_step,
41 )45 )
42 needs_root = False46 needs_root = False
4347
=== modified file 'lpsetup/tests/subcommands/test_install.py'
--- lpsetup/tests/subcommands/test_install.py 2012-07-03 18:13:48 +0000
+++ lpsetup/tests/subcommands/test_install.py 2012-07-06 11:32:19 +0000
@@ -16,7 +16,7 @@
1616
1717
18setup_bzr_locations_step = (18setup_bzr_locations_step = (
19 install.setup_bzr_locations, ['user', 'lpuser', 'repository'])19 install.setup_bzr_locations_as_root, ['user', 'lpuser', 'repository'])
20setup_launchpad_step = (20setup_launchpad_step = (
21 install.setup_launchpad, ['user', 'dependencies_dir', 'repository',21 install.setup_launchpad, ['user', 'dependencies_dir', 'repository',
22 'valid_ssh_keys'])22 'valid_ssh_keys'])
@@ -35,7 +35,7 @@
35 expected_arguments = get_arguments()35 expected_arguments = get_arguments()
36 expected_handlers = (36 expected_handlers = (
37 handlers.handle_user,37 handlers.handle_user,
38 handlers.handle_lpuser,38 handlers.handle_lpuser_as_username,
39 handlers.handle_userdata,39 handlers.handle_userdata,
40 handlers.handle_ssh_keys,40 handlers.handle_ssh_keys,
41 handlers.handle_directories,41 handlers.handle_directories,
4242
=== modified file 'lpsetup/tests/subcommands/test_lxcinstall.py'
--- lpsetup/tests/subcommands/test_lxcinstall.py 2012-07-02 21:02:57 +0000
+++ lpsetup/tests/subcommands/test_lxcinstall.py 2012-07-06 11:32:19 +0000
@@ -11,7 +11,6 @@
11from lpsetup.tests.subcommands import (11from lpsetup.tests.subcommands import (
12 test_inithost,12 test_inithost,
13 test_initlxc,13 test_initlxc,
14 test_install,
15 )14 )
16from lpsetup.tests.utils import (15from lpsetup.tests.utils import (
17 get_random_string,16 get_random_string,
@@ -46,7 +45,7 @@
46 expected_arguments = get_arguments()45 expected_arguments = get_arguments()
47 expected_handlers = (46 expected_handlers = (
48 handlers.handle_user,47 handlers.handle_user,
49 handlers.handle_lpuser,48 handlers.handle_lpuser_as_username,
50 handlers.handle_userdata,49 handlers.handle_userdata,
51 handlers.handle_ssh_keys,50 handlers.handle_ssh_keys,
52 handlers.handle_directories,51 handlers.handle_directories,
@@ -55,7 +54,6 @@
55 expected_steps = (54 expected_steps = (
56 test_inithost.initialize_step,55 test_inithost.initialize_step,
57 fetch_step,56 fetch_step,
58 test_install.setup_bzr_locations_step,
59 create_scripts_step,57 create_scripts_step,
60 create_lxc_step,58 create_lxc_step,
61 test_initlxc.start_lxc_step,59 test_initlxc.start_lxc_step,
6260
=== modified file 'lpsetup/tests/test_handlers.py'
--- lpsetup/tests/test_handlers.py 2012-07-03 18:13:48 +0000
+++ lpsetup/tests/test_handlers.py 2012-07-06 11:32:19 +0000
@@ -13,7 +13,7 @@
13from lpsetup.exceptions import ValidationError13from lpsetup.exceptions import ValidationError
14from lpsetup.handlers import (14from lpsetup.handlers import (
15 handle_directories,15 handle_directories,
16 handle_lpuser,16 handle_lpuser_as_username,
17 handle_ssh_keys,17 handle_ssh_keys,
18 handle_testing,18 handle_testing,
19 handle_user,19 handle_user,
@@ -97,7 +97,7 @@
97 # If lpuser is not provided by namespace, the user name is used.97 # If lpuser is not provided by namespace, the user name is used.
98 username = getpass.getuser()98 username = getpass.getuser()
99 namespace = argparse.Namespace(user=username, lpuser=None)99 namespace = argparse.Namespace(user=username, lpuser=None)
100 handle_lpuser(namespace)100 handle_lpuser_as_username(namespace)
101 self.assertEqual(username, namespace.lpuser)101 self.assertEqual(username, namespace.lpuser)
102102
103103
104104
=== added file 'pre-commit.sh'
--- pre-commit.sh 1970-01-01 00:00:00 +0000
+++ pre-commit.sh 2012-07-06 11:32:19 +0000
@@ -0,0 +1,3 @@
1#!/bin/bash
2
3find . -name "*.py" | grep -v distribute_setup.py | xargs pocketlint && nosetests --with-doctest

Subscribers

People subscribed via source and target branches