~nacc/git-ubuntu:bugfixes-after-refactor

Last commit made on 2017-09-12
Get this branch:
git clone -b bugfixes-after-refactor https://git.launchpad.net/~nacc/git-ubuntu
Only Nish Aravamudan can upload to this branch. If you are Nish Aravamudan please log in for upload directions.

Branch merges

Branch information

Name:
bugfixes-after-refactor
Repository:
lp:~nacc/git-ubuntu

Recent commits

dce62ca... by Nish Aravamudan

versioning: add support for non-series information in the version string

libvirt uploads (SRUs) have versions like 1.2.2-0ubuntu13.1.23 which break
our parsing, which assumes anything between ubuntu_maj and ubuntu_min
is either a series or invalid. Extend our parsing to allow for an "other"
field, which is set when the substring between maj and min cannot be
parsed as a version.

LP: #1716737

4fd9289... by Nish Aravamudan

git_repository::fetch*: set GIT_TERMINAL_PROMPT=0 in env

When using http/https, LP will prompt for auth if a repository
is not found, because LP cannot distinguish between a private
repository (permission issue) and a non-existent repository until
the user is authenticated. This causes git itself to prompt
for authentication on the command-line, which we do not want. Since
we are only using http/https for fetch, disable the Git terminal
prompt via an environment variable. This does make clone and
review noisier, but that can be resolved in a future commit.

LP: #1716745

3debe45... by Nish Aravamudan

git_repository: use top-level-default for fetch_proto if not specified

This should not result in any functional change, but makes eventual
git-ubuntu review easier to implement.

796b819... by Nish Aravamudan

gitubuntu/__main__: fix imports after prior commit reorganization

997966b... by Nish Aravamudan

gitubuntu/__main__: move top_level_defaults definition to the toplevel

Unit tests fail otherwise, as the actual value is not known unless
__main__.main() is called.

b579683... by Nish Aravamudan

gitubuntu/*: refactor all classes

Each subcommand's module defines:

  - parse_args for argument parsing
  - cli_main which is called via the func redirection (this could be
    dropped in the future)
  - main which cli_main calls, and is the proper inter-module entry
    point

With that structure, rather than using per-module classes, just import
each module in __main__ in order to call its parse_args and func (which
in the current implementation is that module's cli_main).

Some unused arguments (e.g., pullfile in a few modules) are also
dropped.

LP: #1707321

Functional change:

submit can be used for distributed development among team members by
proposing MPs against each other's repositories, via the --target-user
flag. Rather than having submit-specific code for deriving the target
branch, use the existing code from lint, after extending it to take a
namespace argument.

a9e8718... by Nish Aravamudan

gitubuntu/__main__: refactor global defaults to a namedtuple

We eventually want to have sane defaults for each subcommands entry
point, but some defaults are only known at the top-level. Provide a
simple namedtuple type to store the toplevel defaults.

Also fix some formatting in line with STYLE.md.

599da93... by Christian Ehrhardt 

fix typo and whitespace

Signed-off-by: Christian Ehrhardt <email address hidden>

eafe369... by Christian Ehrhardt 

import virt-manager via the cron job

Signed-off-by: Christian Ehrhardt <email address hidden>

ffb35b4... 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.