Merge lp:~hazmat/pyjuju/custom-branch-fix-path into lp:pyjuju

Proposed by Kapil Thangavelu
Status: Merged
Approved by: Gustavo Niemeyer
Approved revision: 344
Merged at revision: 352
Proposed branch: lp:~hazmat/pyjuju/custom-branch-fix-path
Merge into: lp:pyjuju
Diff against target: 96 lines (+11/-10)
7 files modified
bin/close-port (+1/-1)
bin/config-get (+2/-1)
bin/ensemble-log (+3/-4)
bin/open-port (+1/-1)
bin/relation-get (+2/-1)
bin/relation-list (+1/-1)
bin/relation-set (+1/-1)
To merge this branch: bzr merge lp:~hazmat/pyjuju/custom-branch-fix-path
Reviewer Review Type Date Requested Status
Gustavo Niemeyer Approve
Review via email: mp+75298@code.launchpad.net

Description of the change

extend sys.path instead of replacing to preserve setuptools magic, else we get breakage on hook cli api with custom branches.

To post a comment you must log in.
Revision history for this message
Gustavo Niemeyer (niemeyer) wrote :

Looks good, thanks. Please go ahead and merge it.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'bin/close-port'
--- bin/close-port 2011-08-15 23:56:17 +0000
+++ bin/close-port 2011-09-14 03:48:23 +0000
@@ -3,7 +3,7 @@
3# We avoid using PYTHONPATH because it can cause side effects on hook execution3# We avoid using PYTHONPATH because it can cause side effects on hook execution
4import os, sys4import os, sys
5if "ENSEMBLE_PYTHONPATH" in os.environ:5if "ENSEMBLE_PYTHONPATH" in os.environ:
6 sys.path[:] = os.environ["ENSEMBLE_PYTHONPATH"].split(":")6 sys.path[:0] = filter(None, os.environ["ENSEMBLE_PYTHONPATH"].split(":"))
77
8from ensemble.hooks.commands import close_port8from ensemble.hooks.commands import close_port
99
1010
=== modified file 'bin/config-get'
--- bin/config-get 2011-08-15 23:56:17 +0000
+++ bin/config-get 2011-09-14 03:48:23 +0000
@@ -3,7 +3,8 @@
3# We avoid using PYTHONPATH because it can cause side effects on hook execution3# We avoid using PYTHONPATH because it can cause side effects on hook execution
4import os, sys4import os, sys
5if "ENSEMBLE_PYTHONPATH" in os.environ:5if "ENSEMBLE_PYTHONPATH" in os.environ:
6 sys.path[:] = os.environ["ENSEMBLE_PYTHONPATH"].split(":")6 sys.path[:0] = filter(None, os.environ["ENSEMBLE_PYTHONPATH"].split(":"))
7
78
8from ensemble.hooks.commands import config_get9from ensemble.hooks.commands import config_get
910
1011
=== modified file 'bin/ensemble-log'
--- bin/ensemble-log 2011-08-10 18:11:35 +0000
+++ bin/ensemble-log 2011-09-14 03:48:23 +0000
@@ -1,10 +1,9 @@
1#!/usr/bin/env python1#!/usr/bin/env python
22
3# We avoid using PYTHONPATH because it can cause side effects on hook execution3# We avoid using PYTHONPATH because it can cause side effects on hook execution
4import os4import os, sys
5import sys5if "ENSEMBLE_PYTHONPATH" in os.environ:
6sys.path.extend(6 sys.path[:0] = filter(None, os.environ["ENSEMBLE_PYTHONPATH"].split(":"))
7 filter(None, os.environ.get("ENSEMBLE_PYTHONPATH", "").split(":")))
87
9from ensemble.hooks.commands import log8from ensemble.hooks.commands import log
109
1110
=== modified file 'bin/open-port'
--- bin/open-port 2011-08-15 23:56:17 +0000
+++ bin/open-port 2011-09-14 03:48:23 +0000
@@ -3,7 +3,7 @@
3# We avoid using PYTHONPATH because it can cause side effects on hook execution3# We avoid using PYTHONPATH because it can cause side effects on hook execution
4import os, sys4import os, sys
5if "ENSEMBLE_PYTHONPATH" in os.environ:5if "ENSEMBLE_PYTHONPATH" in os.environ:
6 sys.path[:] = os.environ["ENSEMBLE_PYTHONPATH"].split(":")6 sys.path[:0] = filter(None, os.environ["ENSEMBLE_PYTHONPATH"].split(":"))
77
8from ensemble.hooks.commands import open_port8from ensemble.hooks.commands import open_port
99
1010
=== modified file 'bin/relation-get'
--- bin/relation-get 2011-08-15 23:56:17 +0000
+++ bin/relation-get 2011-09-14 03:48:23 +0000
@@ -3,7 +3,8 @@
3# We avoid using PYTHONPATH because it can cause side effects on hook execution3# We avoid using PYTHONPATH because it can cause side effects on hook execution
4import os, sys4import os, sys
5if "ENSEMBLE_PYTHONPATH" in os.environ:5if "ENSEMBLE_PYTHONPATH" in os.environ:
6 sys.path[:] = os.environ["ENSEMBLE_PYTHONPATH"].split(":")6 sys.path[:0] = filter(None, os.environ["ENSEMBLE_PYTHONPATH"].split(":"))
7
78
8from ensemble.hooks.commands import relation_get9from ensemble.hooks.commands import relation_get
910
1011
=== modified file 'bin/relation-list'
--- bin/relation-list 2011-08-15 23:56:17 +0000
+++ bin/relation-list 2011-09-14 03:48:23 +0000
@@ -4,7 +4,7 @@
4# We avoid using PYTHONPATH because it can cause side effects on hook execution4# We avoid using PYTHONPATH because it can cause side effects on hook execution
5import os, sys5import os, sys
6if "ENSEMBLE_PYTHONPATH" in os.environ:6if "ENSEMBLE_PYTHONPATH" in os.environ:
7 sys.path[:] = os.environ["ENSEMBLE_PYTHONPATH"].split(":")7 sys.path[:0] = filter(None, os.environ["ENSEMBLE_PYTHONPATH"].split(":"))
88
9from ensemble.hooks.commands import relation_list9from ensemble.hooks.commands import relation_list
1010
1111
=== modified file 'bin/relation-set'
--- bin/relation-set 2011-08-15 23:56:17 +0000
+++ bin/relation-set 2011-09-14 03:48:23 +0000
@@ -4,7 +4,7 @@
4# We avoid using PYTHONPATH because it can cause side effects on hook execution4# We avoid using PYTHONPATH because it can cause side effects on hook execution
5import os, sys5import os, sys
6if "ENSEMBLE_PYTHONPATH" in os.environ:6if "ENSEMBLE_PYTHONPATH" in os.environ:
7 sys.path[:] = os.environ["ENSEMBLE_PYTHONPATH"].split(":")7 sys.path[:0] = filter(None, os.environ["ENSEMBLE_PYTHONPATH"].split(":"))
88
9from ensemble.hooks.commands import relation_set9from ensemble.hooks.commands import relation_set
1010

Subscribers

People subscribed via source and target branches

to status/vote changes: