Merge lp:~cjohnston/ubuntu-ci-services-itself/cli-use-version-from-changes into lp:ubuntu-ci-services-itself

Proposed by Chris Johnston
Status: Merged
Approved by: Ursula Junque
Approved revision: 118
Merged at revision: 124
Proposed branch: lp:~cjohnston/ubuntu-ci-services-itself/cli-use-version-from-changes
Merge into: lp:ubuntu-ci-services-itself
Diff against target: 55 lines (+4/-5)
3 files modified
cli/ci_libs/ticket.py (+3/-1)
cli/tests/test_ticket.py (+1/-2)
cli/ubuntu-ci (+0/-2)
To merge this branch: bzr merge lp:~cjohnston/ubuntu-ci-services-itself/cli-use-version-from-changes
Reviewer Review Type Date Requested Status
Ursula Junque (community) Approve
Chris Johnston (community) Needs Resubmitting
Francis Ginther Approve
Andy Doan (community) Approve
Review via email: mp+202033@code.launchpad.net

Commit message

Automatically get the version number from the source being uploaded.

Description of the change

Originally we required the user to define the version number of the package they were uploading. Let's not do that. It's not nice!

To post a comment you must log in.
Revision history for this message
Andy Doan (doanac) wrote :

seems like a nice thing to me.

review: Approve
Revision history for this message
Ursula Junque (ursinha) wrote :

Nice!

review: Approve
Revision history for this message
Chris Johnston (cjohnston) wrote :

 merge approved

review: Approve
Revision history for this message
Chris Johnston (cjohnston) wrote :

Attempt to merge into lp:ubuntu-ci-services-itself failed due to conflicts:

text conflict in cli/ci_libs/ticket.py

Revision history for this message
Chris Johnston (cjohnston) :
review: Needs Resubmitting
Revision history for this message
Francis Ginther (fginther) :
review: Approve
Revision history for this message
Chris Johnston (cjohnston) wrote :
Download full text (32.7 KiB)

The attempt to merge lp:~cjohnston/ubuntu-ci-services-itself/cli-use-version-from-changes into lp:ubuntu-ci-services-itself failed. Below is the output from the failed tests.

New python executable in /tmp/tmp.CEeH9JWWfK/bin/python
Installing distribute.............................................................................................................................................................................................done.
Installing pip...............done.
== Testing ci-utils ....
running develop
running egg_info
creating ci_utils.egg-info
writing requirements to ci_utils.egg-info/requires.txt
writing ci_utils.egg-info/PKG-INFO
writing top-level names to ci_utils.egg-info/top_level.txt
writing dependency_links to ci_utils.egg-info/dependency_links.txt
writing manifest file 'ci_utils.egg-info/SOURCES.txt'
reading manifest file 'ci_utils.egg-info/SOURCES.txt'
writing manifest file 'ci_utils.egg-info/SOURCES.txt'
running build_ext
Creating /tmp/tmp.CEeH9JWWfK/lib/python2.7/site-packages/ci-utils.egg-link (link to .)
Adding ci-utils 0.1 to easy-install.pth file

Installed /tmp/tarmac/branch.Fuu1Pq/ci-utils
Processing dependencies for ci-utils==0.1
Searching for testtools
Reading http://pypi.python.org/simple/testtools/
Best match: testtools 0.9.34
Downloading https://pypi.python.org/packages/source/t/testtools/testtools-0.9.34.tar.gz#md5=51d37e7376a70cee40cf17b44889fc88
Processing testtools-0.9.34.tar.gz
Running testtools-0.9.34/setup.py -q bdist_egg --dist-dir /tmp/easy_install-ELJ9nb/testtools-0.9.34/egg-dist-tmp-4Pygew
Adding testtools 0.9.34 to easy-install.pth file

Installed /tmp/tmp.CEeH9JWWfK/lib/python2.7/site-packages/testtools-0.9.34-py2.7.egg
Searching for restish==0.12.1
Reading http://pypi.python.org/simple/restish/
Best match: restish 0.12.1
Downloading https://pypi.python.org/packages/source/r/restish/restish-0.12.1.tar.gz#md5=c29e0b755c44c21659de8e463093ea47
Processing restish-0.12.1.tar.gz
Running restish-0.12.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-FmROlf/restish-0.12.1/egg-dist-tmp-HcZNBJ
Adding restish 0.12.1 to easy-install.pth file

Installed /tmp/tmp.CEeH9JWWfK/lib/python2.7/site-packages/restish-0.12.1-py2.7.egg
Searching for python-subunit
Reading http://pypi.python.org/simple/python-subunit/
Reading http://launchpad.net/subunit
Best match: python-subunit 0.0.16
Downloading https://pypi.python.org/packages/source/p/python-subunit/python-subunit-0.0.16.tar.gz#md5=c0ec919f8a1051de4ad89000f95324aa
Processing python-subunit-0.0.16.tar.gz
Running python-subunit-0.0.16/setup.py -q bdist_egg --dist-dir /tmp/easy_install-4yAMV4/python-subunit-0.0.16/egg-dist-tmp-Pq7c_H
Adding python-subunit 0.0.16 to easy-install.pth file
Installing subunit-filter script to /tmp/tmp.CEeH9JWWfK/bin
Installing subunit-2to1 script to /tmp/tmp.CEeH9JWWfK/bin
Installing subunit-ls script to /tmp/tmp.CEeH9JWWfK/bin
Installing tap2subunit script to /tmp/tmp.CEeH9JWWfK/bin
Installing subunit-1to2 script to /tmp/tmp.CEeH9JWWfK/bin
Installing subunit2pyunit script to /tmp/tmp.CEeH9JWWfK/bin
Installing subunit2junitxml script to /tmp/tmp.CEeH9JWWfK/bin
Installing subunit-tags script to /tmp/tmp.CEeH9JWWfK/bin
Installing s...

118. By Chris Johnston

Remove version arg from tests

Revision history for this message
Chris Johnston (cjohnston) :
review: Needs Resubmitting
Revision history for this message
Ursula Junque (ursinha) wrote :

Not sure if this works, but re-approving :)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'cli/ci_libs/ticket.py'
2--- cli/ci_libs/ticket.py 2014-01-17 16:46:10 +0000
3+++ cli/ci_libs/ticket.py 2014-01-20 13:20:22 +0000
4@@ -35,6 +35,7 @@
5 self.sourcepackage = ''
6 self.sourcepackage_uri = ''
7 self.files = ''
8+ self.version = ''
9
10 def _parse_changes(self, args):
11 changes_filepath = args.source
12@@ -42,6 +43,7 @@
13 changes_filepath=changes_filepath,
14 files_to_upload_dir=args.files_to_upload_dir)
15 self.files = changes.process()
16+ self.version = changes.source_version
17 self.sourcepackage = changes.source_package_name
18
19 def _process(self, args):
20@@ -68,7 +70,7 @@
21 self.sourcepackage_uri = get_sourcepackage_uri(self.sourcepackage)
22 data = {
23 "sourcepackage": self.sourcepackage_uri,
24- "version": args.version,
25+ "version": self.version,
26 }
27 location = post(CI_URL + SPU_BASE, data=data)
28 self.spu_id = parse_id(location)
29
30=== modified file 'cli/tests/test_ticket.py'
31--- cli/tests/test_ticket.py 2014-01-13 13:17:17 +0000
32+++ cli/tests/test_ticket.py 2014-01-20 13:20:22 +0000
33@@ -35,8 +35,7 @@
34 'data/foobar_0.1-1_source.changes')
35 self.args = ['create_ticket', '-t', 'New feature', '-b', '1234', '-o',
36 'someone@example.com', '-d', 'This is a cool new feature',
37- '-r', 'baz', '--version', '0.1-1', '-s',
38- self.changes]
39+ '-r', 'baz', '-s', self.changes]
40
41 @mock.patch('ci_libs.ticket.post')
42 def test_create_ticket(self, mock_post):
43
44=== modified file 'cli/ubuntu-ci'
45--- cli/ubuntu-ci 2014-01-17 16:38:33 +0000
46+++ cli/ubuntu-ci 2014-01-20 13:20:22 +0000
47@@ -49,8 +49,6 @@
48 help='Binaries to be added to the install')
49 ticket_parser.add_argument('-r', '--remove',
50 help='Binaries to be removed from the install')
51- ticket_parser.add_argument('--version',
52- help='Version number of new package')
53 ticket_parser.add_argument('-s', '--source',
54 help='Full path to source.changes file')
55 ticket_parser.add_argument('-f', '--files-to-upload-dir',

Subscribers

People subscribed via source and target branches