Merge ~nacc/git-ubuntu:bugfixes-lint-clean into git-ubuntu:master

Proposed by Nish Aravamudan
Status: Merged
Approved by: Nish Aravamudan
Approved revision: b0ee6701bb0fa4b24660643b378a85375b7cd2e3
Merged at revision: ffb35b4fe88be7a0c0f5abb78f198be67b6521d8
Proposed branch: ~nacc/git-ubuntu:bugfixes-lint-clean
Merge into: git-ubuntu:master
Diff against target: 439 lines (+79/-87)
12 files modified
bin/git-ubuntu (+1/-1)
bin/import-cron (+1/-1)
bin/snap/quilt (+8/-0)
gitubuntu/__main__.py (+2/-32)
gitubuntu/build.py (+5/-12)
gitubuntu/clone.py (+1/-1)
gitubuntu/importer.py (+9/-8)
gitubuntu/importppa.py (+7/-7)
gitubuntu/lint.py (+22/-19)
gitubuntu/source_information.py (+16/-0)
gitubuntu/submit.py (+6/-3)
snap/snapcraft.yaml (+1/-3)
Reviewer Review Type Date Requested Status
Nish Aravamudan Approve
Server Team CI bot continuous-integration Approve
Andreas Hasenack Approve
Review via email: mp+330466@code.launchpad.net

This proposal supersedes a proposal from 2017-09-08.

Commit message

To make CI happy.

To post a comment you must log in.
Revision history for this message
Server Team CI bot (server-team-bot) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:bfba3507bf4ebffc0526495eec9f2de260b2eb82
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https://code.launchpad.net/~nacc/usd-importer/+git/usd-importer/+merge/330451/+edit-commit-message

https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/41/
Executed test runs:
    SUCCESS: Checkout
    FAILED: Style Check

Click here to trigger a rebuild:
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/41/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Server Team CI bot (server-team-bot) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:bfba3507bf4ebffc0526495eec9f2de260b2eb82
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https://code.launchpad.net/~nacc/usd-importer/+git/usd-importer/+merge/330451/+edit-commit-message

https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/42/
Executed test runs:
    SUCCESS: Checkout
    SUCCESS: Style Check
    SUCCESS: Unit Tests
    FAILED: Integration Tests

Click here to trigger a rebuild:
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/42/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Server Team CI bot (server-team-bot) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:bfba3507bf4ebffc0526495eec9f2de260b2eb82
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https://code.launchpad.net/~nacc/usd-importer/+git/usd-importer/+merge/330451/+edit-commit-message

https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/45/
Executed test runs:
    SUCCESS: Checkout
    SUCCESS: Style Check
    SUCCESS: Unit Tests
    FAILED: Integration Tests

Click here to trigger a rebuild:
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/45/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Server Team CI bot (server-team-bot) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:a237f87d2c02b64f9d4c9d62aaa8a7d354ea041d
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https://code.launchpad.net/~nacc/usd-importer/+git/usd-importer/+merge/330461/+edit-commit-message

https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/55/
Executed test runs:
    SUCCESS: Checkout
    SUCCESS: Style Check
    SUCCESS: Unit Tests
    SUCCESS: Integration Tests
    IN_PROGRESS: Declarative: Post Actions

Click here to trigger a rebuild:
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/55/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Server Team CI bot (server-team-bot) wrote :

PASSED: Continuous integration, rev:e1ad1e0560ab15f4a39347fbea0a13f2747cf853
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/59/
Executed test runs:
    SUCCESS: Checkout
    SUCCESS: Style Check
    SUCCESS: Unit Tests
    SUCCESS: Integration Tests
    IN_PROGRESS: Declarative: Post Actions

Click here to trigger a rebuild:
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/59/rebuild

review: Approve (continuous-integration)
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

+1

review: Approve
~nacc/git-ubuntu:bugfixes-lint-clean updated
b0ee670... by Nish Aravamudan

snap: main part can be obtained from .

The jenkins job now clones a repo and builds a snap from
potential branches. This does not quite work if our yaml
always builds master. Have it use the local dir instead.

Revision history for this message
Nish Aravamudan (nacc) wrote :

On Mon, Sep 11, 2017 at 1:10 PM, Andreas Hasenack <email address hidden> wrote:
> Review: Approve
>
> +1
>
> Diff comments:
>
>> diff --git a/gitubuntu/lint.py b/gitubuntu/lint.py
>> index 435e7f2..6258e03 100644
>> --- a/gitubuntu/lint.py
>> +++ b/gitubuntu/lint.py
>> @@ -364,24 +364,28 @@ class GitUbuntuLint:
>> ret = False
>>
>> added_lines = [l.content for l in changelog_patch.hunks[0].lines if l.origin == "+"]
>> - if added_lines[-1] != "\n":
>> - error("last added line to changelog must be blank")
>> - ret = False
>> -
>> - changelog = debian.changelog.Changelog("".join(added_lines[:-1]),
>> - strict=True
>> - )
>> - if len(changelog.versions) != 1:
>> - error("must add exactly one changelog entry")
>> - ret = False
>> -
>> - if any(["\t" in l for l in added_lines]):
>> - warning("Tab characters found in new changelog entry")
>> - ret = False
>> -
>> - if any([l.endswith(" \n") for l in added_lines]):
>> - warning("Trailing whitespace found in new changelog entry")
>> + if len(added_lines) == 0:
>> + error("No lines added to changelog")
>> ret = False
>> + else:
>> + if added_lines[-1] != "\n":
>> + error("last added line to changelog must be blank")
>> + ret = False
>> +
>> + changelog = debian.changelog.Changelog("".join(added_lines[:-1]),
>> + strict=True
>> + )
>> + if len(changelog.versions) != 1:
>> + error("must add exactly one changelog entry")
>> + ret = False
>> +
>> + if any(["\t" in l for l in added_lines]):
>> + warning("Tab characters found in new changelog entry")
>> + ret = False
>> +
>
> There are some empty lines in this changeset with whitespace in them (visible in git diff, but not here in lp).

Good catch, a new jenkins job is running now with the fix to the snap
(to build the proposed branch as a snap and test it) and then I'll
land this on master with the above fixed.

Revision history for this message
Server Team CI bot (server-team-bot) wrote :

PASSED: Continuous integration, rev:b0ee6701bb0fa4b24660643b378a85375b7cd2e3
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/62/
Executed test runs:
    SUCCESS: Checkout
    SUCCESS: Style Check
    SUCCESS: Unit Tests
    SUCCESS: Integration Tests
    IN_PROGRESS: Declarative: Post Actions

Click here to trigger a rebuild:
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/62/rebuild

review: Approve (continuous-integration)
Revision history for this message
Nish Aravamudan (nacc) :
review: Approve
Revision history for this message
Nish Aravamudan (nacc) wrote :

Self-approving. The actual branch that lands will be slightly different, due to the whitespace changes.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/bin/git-ubuntu b/bin/git-ubuntu
2index 23f908e..2b15471 100755
3--- a/bin/git-ubuntu
4+++ b/bin/git-ubuntu
5@@ -1,4 +1,4 @@
6-#!/usr/bin/python3
7+#!/usr/bin/env python3
8
9 # PYTHON_ARGCOMPLETE_OK
10
11diff --git a/bin/import-cron b/bin/import-cron
12index b23e512..0044b74 100755
13--- a/bin/import-cron
14+++ b/bin/import-cron
15@@ -1,4 +1,4 @@
16-#!/usr/bin/python3
17+#!/usr/bin/env python3
18
19 from copy import copy
20 import os
21diff --git a/bin/snap/quilt b/bin/snap/quilt
22new file mode 100755
23index 0000000..547f65f
24--- /dev/null
25+++ b/bin/snap/quilt
26@@ -0,0 +1,8 @@
27+#!/bin/bash
28+
29+CORE_SNAP="/snap/core/current"
30+CORE_SNAP_PATH="$CORE_SNAP/usr/local/sbin:$CORE_SNAP/usr/local/bin:$CORE_SNAP/usr/sbin:$CORE_SNAP/usr/bin:$CORE_SNAP/sbin:$CORE_SNAP:/bin"
31+export PATH="$SNAP/bin/snap:$SNAP/usr/local/sbin:$SNAP/usr/local/bin:$SNAP/usr/sbin:$SNAP/usr/bin:$SNAP/sbin:$SNAP/bin:$CORE_SNAP_PATH"
32+export LD_LIBRARY_PATH="$SNAP/lib/x86_64-linux-gnu:$SNAP/usr/lib/x86_64-linux-gnu"
33+export QUILT_DIR="$SNAP/usr/share/quilt"
34+exec "$SNAP/usr/bin/quilt" "$@"
35diff --git a/gitubuntu/__main__.py b/gitubuntu/__main__.py
36index ba4a435..165fc59 100644
37--- a/gitubuntu/__main__.py
38+++ b/gitubuntu/__main__.py
39@@ -1,4 +1,4 @@
40-#!/usr/bin/python3
41+#!/usr/bin/env python3
42
43 def main():
44 try:
45@@ -90,7 +90,7 @@ def main():
46 metavar='[%s]' % '|'.join(known_protos),
47 choices=known_protos,
48 help='Specify protocol to use for fetch. Default: %(default)s',
49- default='git'
50+ default='https'
51 )
52
53 width, _ = shutil.get_terminal_size()
54@@ -107,20 +107,6 @@ def main():
55 break_on_hyphens=False
56 )
57 )
58- help_text = '\n'.join(textwrap.wrap('File specifying '
59- 'parent-child relationship '
60- 'overrides as:',
61- subhelp_width
62- )
63- )
64- help_text += '\n'
65- help_text += '<pkgname> <child version> <publish parent version> <changelog parent version>\n'
66- help_text += '\n'.join(textwrap.wrap('with one override per '
67- 'line.',
68- subhelp_width
69- )
70- )
71- help_text += '\ndefault=%(default)s'
72 parser.add_argument('-P', '--parentfile', type=str,
73 help=argparse.SUPPRESS,
74 default=pkg_resources.resource_filename(
75@@ -128,22 +114,6 @@ def main():
76 'parent_overrides.txt'
77 )
78 )
79- help_text = '\n'.join(textwrap.wrap('File specifying source '
80- 'files to use instead of '
81- 'Launchpad to work around '
82- 'source file shadowing: ',
83- subhelp_width
84- )
85- )
86- help_text += '\n'
87- help_text += '<pkgname> <version> <URL of DSC file> <URLs of orig files>\n'
88- help_text += '\n'.join(textwrap.wrap('with one package per line. '
89- '\'-\' for the DSC file '
90- 'indicates to use the one '
91- 'from Launchpad.'
92- )
93- )
94- help_text += '\ndefault=%(default)s'
95 parser.add_argument('-L', '--pullfile', type=str,
96 help=argparse.SUPPRESS,
97 default=pkg_resources.resource_filename(
98diff --git a/gitubuntu/build.py b/gitubuntu/build.py
99index 8143995..a8f9cf3 100644
100--- a/gitubuntu/build.py
101+++ b/gitubuntu/build.py
102@@ -38,12 +38,11 @@ from gitubuntu.run import run, runq
103 from gitubuntu.source_information import (
104 GitUbuntuSourceInformation,
105 NoPublicationHistoryException,
106+ derive_source_from_series,
107 )
108 try:
109 pkg = 'python3-debian'
110 from debian.debfile import PART_EXTS
111- pkg = 'python3-distro-info'
112- from distro_info import DebianDistroInfo, UbuntuDistroInfo
113 pkg = 'python3-pytest'
114 import pytest
115 except ImportError:
116@@ -228,8 +227,7 @@ def fetch_orig_from_cache(changelog, source, dl_cache=None):
117 return None
118 if dsc.verify() is None:
119 logging.warn(
120- "Cache dir found, but verification of orig tarball %s failed.",
121- orig,
122+ "Cache dir found, but verification of orig tarball(s) failed."
123 )
124 return None # XXX decide - see docstring
125 _symlink_paths_into_parent_dir(dsc.all_tarball_paths)
126@@ -320,8 +318,8 @@ def fetch_orig_from_launchpad(changelog, source, pullfile, retries,
127 except NoPublicationHistoryException:
128 logging.warning(
129 "No publication history found for %s in %s. ",
130- pkgname,
131- dist_name,
132+ changelog.srcpkg,
133+ source,
134 )
135 return None
136
137@@ -513,12 +511,7 @@ class GitUbuntuBuild:
138
139
140 def derive_source_from_changelog(changelog):
141- series = changelog.distribution
142- if DebianDistroInfo().valid(codename=series):
143- return 'debian'
144- if UbuntuDistroInfo().valid(codename=series):
145- return 'ubuntu'
146- raise ValueError("Unable to determine distribution from %s" % series)
147+ return derive_source_from_series(changelog.distribution)
148
149 def expand_changelog_source_aliases(orig_search_list, changelog):
150 """Replace 'changelog' sources by reading debian/changelog
151diff --git a/gitubuntu/clone.py b/gitubuntu/clone.py
152index a1bc8cb..9a15c9c 100644
153--- a/gitubuntu/clone.py
154+++ b/gitubuntu/clone.py
155@@ -45,7 +45,7 @@ Example:
156 )
157 parser.add_argument('directory', type=str,
158 help='Local directory to clone to. If not specified, a '
159- ' directory with the same name as PACKAGE will be '
160+ 'directory with the same name as PACKAGE will be '
161 'used',
162 default=None,
163 nargs='?'
164diff --git a/gitubuntu/importer.py b/gitubuntu/importer.py
165index 22fd08a..cce1999 100644
166--- a/gitubuntu/importer.py
167+++ b/gitubuntu/importer.py
168@@ -361,17 +361,14 @@ class GitUbuntuImport:
169 except PristineTarError as e:
170 raise GitUbuntuImportOrigError from e
171
172- def import_orig(self, spi):
173+ def import_orig(self, dsc, version, dist):
174 """Imports the orig-tarball using gbp import-org --pristine-tar
175
176 Arguments:
177- spi - A GitUbuntuSourcePackageInformation instance
178+ dsc - A GitUbuntuRepository object
179+ version - the string package version
180+ dist - the string distribution, either 'ubuntu' or 'debian'
181 """
182- dsc = GitUbuntuDsc(spi.dsc_pathname)
183- upstream_version = str(spi.upstream_version)
184- version = str(spi.version)
185- dist = spi.distribution.name.lower()
186-
187 try:
188 orig_tarball_path = dsc.orig_tarball_path
189 except GitUbuntuDscError as e:
190@@ -785,7 +782,11 @@ class GitUbuntuImport:
191 spi.distribution.name.lower()
192 )
193 if not self.skip_orig:
194- self.import_orig(spi)
195+ self.import_orig(
196+ GitUbuntuDsc(spi.dsc_pathname),
197+ version = str(spi.version),
198+ dist = spi.distribution.name.lower(),
199+ )
200
201 unapplied_import_tree_hash = self.import_patches_unapplied_tree(spi.dsc_pathname)
202 logging.debug('Imported patches-unapplied version %s as tree %s',
203diff --git a/gitubuntu/importppa.py b/gitubuntu/importppa.py
204index a4a3ec1..2ae1f81 100644
205--- a/gitubuntu/importppa.py
206+++ b/gitubuntu/importppa.py
207@@ -83,7 +83,7 @@ class GitUbuntuImportPPA(GitUbuntuImport):
208 'ppa:<name>', args.ppa)
209 sys.exit(1)
210 ppa = args.ppa
211- pkgname = args.package
212+ self.pkgname = args.package
213 owner = args.lp_owner
214 user = args.lp_user
215 no_clean = args.no_clean
216@@ -110,14 +110,14 @@ class GitUbuntuImportPPA(GitUbuntuImport):
217
218 atexit.register(self.cleanup, no_clean, self.local_repo.local_dir)
219
220- self.local_repo.add_remote(pkgname, owner, self.namespace, user)
221+ self.local_repo.add_remote(self.pkgname, owner, self.namespace)
222 if not args.no_fetch:
223 try:
224 self.local_repo.fetch_remote(self.namespace)
225 except GitUbuntuRepositoryFetchError:
226 pass
227
228- source_information = UbuntuSourceInformation(ppa, pkgname,
229+ source_information = GitUbuntuSourceInformation(ppa, self.pkgname,
230 os.path.abspath(args.pullfile),
231 args.retries, args.retry_backoffs)
232
233@@ -151,7 +151,7 @@ class GitUbuntuImportPPA(GitUbuntuImport):
234
235 os.makedirs(workdir, exist_ok=True)
236
237- self.parse_parentfile(pkgname, args.parentfile)
238+ self.parse_parentfile(args.parentfile)
239
240 history_found = False
241 try:
242@@ -168,11 +168,11 @@ class GitUbuntuImportPPA(GitUbuntuImport):
243 history_found = True
244 except NoPublicationHistoryException:
245 logging.warning("No publication history found for %s in %s. ",
246- pkgname, distname)
247+ self.pkgname, ppa)
248
249 if not history_found:
250 logging.error("No publication history for '%s' in %s. "
251- "Wrong source package name?", pkgname, ppa)
252+ "Wrong source package name?", self.pkgname, ppa)
253 sys.exit(1)
254
255 try:
256@@ -188,7 +188,7 @@ class GitUbuntuImportPPA(GitUbuntuImport):
257 pass
258 except NoPublicationHistoryException:
259 logging.warning("No publication history found for %s in %s. ",
260- pkgname, ppa)
261+ self.pkgname, ppa)
262 except:
263 logging.error("Unable to import patches-applied to %s", ppa)
264
265diff --git a/gitubuntu/lint.py b/gitubuntu/lint.py
266index 435e7f2..6258e03 100644
267--- a/gitubuntu/lint.py
268+++ b/gitubuntu/lint.py
269@@ -364,24 +364,28 @@ class GitUbuntuLint:
270 ret = False
271
272 added_lines = [l.content for l in changelog_patch.hunks[0].lines if l.origin == "+"]
273- if added_lines[-1] != "\n":
274- error("last added line to changelog must be blank")
275- ret = False
276-
277- changelog = debian.changelog.Changelog("".join(added_lines[:-1]),
278- strict=True
279- )
280- if len(changelog.versions) != 1:
281- error("must add exactly one changelog entry")
282- ret = False
283-
284- if any(["\t" in l for l in added_lines]):
285- warning("Tab characters found in new changelog entry")
286- ret = False
287-
288- if any([l.endswith(" \n") for l in added_lines]):
289- warning("Trailing whitespace found in new changelog entry")
290+ if len(added_lines) == 0:
291+ error("No lines added to changelog")
292 ret = False
293+ else:
294+ if added_lines[-1] != "\n":
295+ error("last added line to changelog must be blank")
296+ ret = False
297+
298+ changelog = debian.changelog.Changelog("".join(added_lines[:-1]),
299+ strict=True
300+ )
301+ if len(changelog.versions) != 1:
302+ error("must add exactly one changelog entry")
303+ ret = False
304+
305+ if any(["\t" in l for l in added_lines]):
306+ warning("Tab characters found in new changelog entry")
307+ ret = False
308+
309+ if any([l.endswith(" \n") for l in added_lines]):
310+ warning("Trailing whitespace found in new changelog entry")
311+ ret = False
312
313 if ret:
314 self.success("Verified that only new modifications to changelog "
315@@ -670,7 +674,6 @@ class GitUbuntuLint:
316 )
317 self.directory = args.directory
318 self.local_repo = GitUbuntuRepository(self.directory)
319- self.pullfile = args.pullfile
320 self.verbose = args.verbose
321
322 if args.commitish:
323@@ -684,7 +687,7 @@ class GitUbuntuLint:
324 sys.exit(1)
325 else:
326 commitish_obj = self.local_repo.raw_repo.head
327- if self.local_repo.head_is_detached:
328+ if self.local_repo.raw_repo.head_is_detached:
329 commitish_string = 'HEAD'
330 else:
331 for head in self.local_repo.local_branches:
332diff --git a/gitubuntu/source_information.py b/gitubuntu/source_information.py
333index a759b53..ead7522 100644
334--- a/gitubuntu/source_information.py
335+++ b/gitubuntu/source_information.py
336@@ -10,6 +10,8 @@ _lp_service = 'production'
337 _lp_api_version = 'devel'
338
339 try:
340+ pkg = 'python3-distro-info'
341+ from distro_info import DebianDistroInfo, UbuntuDistroInfo
342 pkg = 'python3-launchpadlib'
343 from launchpadlib.launchpad import Launchpad as LP
344 pkg = 'python3-ubuntutools'
345@@ -48,12 +50,21 @@ def launchpad_login_auth():
346 return _LP_LOGIN_AUTH
347
348
349+def derive_source_from_series(series):
350+ if DebianDistroInfo().valid(codename=series):
351+ return 'debian'
352+ if UbuntuDistroInfo().valid(codename=series):
353+ return 'ubuntu'
354+ raise ValueError("Unable to determine distribution from %s" % series)
355+
356+
357 class GitUbuntuPPASourcePackage(UbuntuSourcePackage):
358 "Download / unpack an PPA source package"
359 def __init__(self, ppa_spec, *args, **kwargs):
360 super(GitUbuntuPPASourcePackage, self).__init__(*args, **kwargs)
361 _, ppa = ppa_spec.split(':')
362 self._ppa_owner, self._ppa_name = ppa.split('/', 1)
363+ self._spph = None
364
365 def _lp_url(self, filename):
366 "Build a source package URL on Launchpad"
367@@ -257,10 +268,15 @@ class GitUbuntuSourceInformation(object):
368 _, ppa = dist_name.split(':')
369 ppa_owner, ppa_name = ppa.split('/', 1)
370 possible_people = self.launchpad.people.findPerson(text=ppa_owner)
371+ person = None
372 for person in possible_people:
373 if person.name == ppa_owner:
374 ppa_owner = person
375 break
376+ if person is None:
377+ raise ValueError(
378+ "Unable to find owner for PPA: %s" % dist_name
379+ )
380 self.archive = person.getPPAByName(name=ppa_name)
381 else:
382 self.dist = self.launchpad.distributions[dist_name]
383diff --git a/gitubuntu/submit.py b/gitubuntu/submit.py
384index 4dc0d32..6e46a6e 100644
385--- a/gitubuntu/submit.py
386+++ b/gitubuntu/submit.py
387@@ -42,7 +42,7 @@ class GitUbuntuSubmit:
388 )
389 parser.add_argument('--reviewer', action='append',
390 help='Specify reviewers for the proposed merge. This '
391- 'will default to the canonical-server team. This option can be '
392+ 'will default to the canonical-server team. This option can be '
393 'specified multiple times.',
394 default=['canonical-server']
395 )
396@@ -73,7 +73,6 @@ class GitUbuntuSubmit:
397 def main(self, args):
398 self.directory = args.directory
399 self.force = args.force
400- self.pullfile = args.pullfile
401 self.target_user = args.target_user
402 try:
403 self.user = args.lp_user
404@@ -88,15 +87,19 @@ class GitUbuntuSubmit:
405 logging.warning("Specified branch (%s) does not exist locally.",
406 args.branch
407 )
408+ self.commitish_string = args.branch
409 else:
410 if self.local_repo.raw_repo.head_is_detached:
411 logging.error("Please create a local branch before submitting.")
412 sys.exit(1)
413 self.source_branch = self.local_repo.raw_repo.head.name
414+ self.commitish_string = 'HEAD'
415
416 logging.debug("source branch: %s", self.source_branch)
417
418- self.pkgname = self.local_repo.get_changelog_srcpkg_from_treeish('HEAD')
419+ self.pkgname = self.local_repo.get_changelog_srcpkg_from_treeish(
420+ self.commitish_string
421+ )
422
423 logging.debug("source package: %s", self.pkgname)
424
425diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml
426index 89c5a30..a5c17c0 100644
427--- a/snap/snapcraft.yaml
428+++ b/snap/snapcraft.yaml
429@@ -32,9 +32,7 @@ parts:
430 - -usr/lib/python2.7
431 main:
432 plugin: dump
433- source: https://git.launchpad.net/usd-importer
434- source-type: git
435- source-branch: master
436+ source: .
437 stage-packages:
438 - python3-argcomplete
439 - python3-debian

Subscribers

People subscribed via source and target branches