Merge lp:~gz/juju-ci-tools/tsv_project_relative into lp:juju-ci-tools

Proposed by Curtis Hovey
Status: Merged
Merged at revision: 1191
Proposed branch: lp:~gz/juju-ci-tools/tsv_project_relative
Merge into: lp:juju-ci-tools
Diff against target: 34 lines (+3/-3)
2 files modified
git_gate.py (+2/-2)
tests/test_git_gate.py (+1/-1)
To merge this branch: bzr merge lp:~gz/juju-ci-tools/tsv_project_relative
Reviewer Review Type Date Requested Status
Curtis Hovey (community) code Approve
Review via email: mp+280378@code.launchpad.net

Description of the change

Support relative path of dependencies.tsv

To post a comment you must log in.
Revision history for this message
Curtis Hovey (sinzui) wrote :

Thank you.

review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'git_gate.py'
--- git_gate.py 2015-12-12 01:31:25 +0000
+++ git_gate.py 2015-12-12 01:51:43 +0000
@@ -84,7 +84,7 @@
84 print_now("Getting {} and dependencies using go".format(dep))84 print_now("Getting {} and dependencies using go".format(dep))
85 go("get", "-v", "-d", dep)85 go("get", "-v", "-d", dep)
86 if args.tsv_path:86 if args.tsv_path:
87 tsv_path = os.path.join(gopath, "src", args.tsv_path)87 tsv_path = os.path.join(gopath, "src", final_project, args.tsv_path)
88 print_now("Getting dependencies using godeps from {}".format(tsv_path))88 print_now("Getting dependencies using godeps from {}".format(tsv_path))
89 godeps = SubcommandRunner(os.path.join(gopath, "bin", "godeps"), goenv)89 godeps = SubcommandRunner(os.path.join(gopath, "bin", "godeps"), goenv)
90 godeps("-u", tsv_path)90 godeps("-u", tsv_path)
@@ -144,7 +144,7 @@
144 help="Go import path of package needed to for build or testing.")144 help="Go import path of package needed to for build or testing.")
145 dep_group.add_argument(145 dep_group.add_argument(
146 "--tsv-path",146 "--tsv-path",
147 help="Path to dependencies.tsv file for project relative to src dir.")147 help="Path to dependencies.tsv file relative to project dir.")
148 args = parser.parse_args(args)148 args = parser.parse_args(args)
149 if args.project_url is None and not args.go_get_all:149 if args.project_url is None and not args.go_get_all:
150 parser.error("Must supply either --project-url or --go-get-all")150 parser.error("Must supply either --project-url or --go-get-all")
151151
=== modified file 'tests/test_git_gate.py'
--- tests/test_git_gate.py 2015-12-12 01:31:25 +0000
+++ tests/test_git_gate.py 2015-12-12 01:51:43 +0000
@@ -231,7 +231,7 @@
231 def test_tsv_test(self):231 def test_tsv_test(self):
232 args = self.make_args("git.testing/project",232 args = self.make_args("git.testing/project",
233 project_url="https://git.testing/project",233 project_url="https://git.testing/project",
234 tsv_path="git.testing/project/dependencies.tsv")234 tsv_path="dependencies.tsv")
235 git_gate.go_test(args, "/tmp/fake")235 git_gate.go_test(args, "/tmp/fake")
236 self.assertEqual(self.actions, [236 self.assertEqual(self.actions, [
237 ('print', 'Getting and installing godeps'),237 ('print', 'Getting and installing godeps'),

Subscribers

People subscribed via source and target branches