launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #21052
Re: [Merge] lp:~cjwatson/launchpad/git-repository-type into lp:launchpad
Review: Approve code
Does this deliberately not constrain writes? Both the XML-RPC bit and head-setting probably need limiting for now.
Diff comments:
>
> === modified file 'lib/lp/code/enums.py'
> --- lib/lp/code/enums.py 2015-09-28 17:38:45 +0000
> +++ lib/lp/code/enums.py 2016-10-03 16:35:47 +0000
> @@ -110,6 +111,30 @@
> """)
>
>
> +class GitRepositoryType(DBEnumeratedType):
> + """Git Repository Type
> +
> + The type of a repository determines its interaction with other
> + subsystems.
> + """
> +
> + HOSTED = DBItem(1, """
> + Hosted
> +
> + Launchpad is the primary location of this repository.
> + """)
> +
> + # Skipping MIRRORED (2) to stay in sync with BranchType, in order to
> + # reduce confusion for manual database queries.
> +
> + IMPORTED = DBItem(3, """
> + Imported
> +
> + Repositories that have been imported from an externally hosted
> + repository and are made available through Launchpad.
> + """)
I'm going to assume that you copied these inconsistently structured descriptions from BranchType.
> +
> +
> class GitObjectType(DBEnumeratedType):
> """Git Object Type
>
>
> === modified file 'lib/lp/code/interfaces/gitrepository.py'
> --- lib/lp/code/interfaces/gitrepository.py 2016-09-06 15:34:38 +0000
> +++ lib/lp/code/interfaces/gitrepository.py 2016-10-03 16:35:47 +0000
> @@ -127,6 +128,10 @@
> date_created = exported(Datetime(
> title=_("Date created"), required=True, readonly=True))
>
> + repository_type = exported(Choice(
> + title=_("Repository type"), required=True, readonly=True,
> + vocabulary=GitRepositoryType))
This sounds like "Git" or "Bazaar". I wonder if a sensible clarifying description can be written, though I can't think of one off-hand.
> +
> registrant = exported(PublicPersonChoice(
> title=_("Registrant"), required=True, readonly=True,
> vocabulary="ValidPersonOrTeam",
>
> === modified file 'lib/lp/scripts/garbo.py'
> --- lib/lp/scripts/garbo.py 2016-07-26 22:43:23 +0000
> +++ lib/lp/scripts/garbo.py 2016-10-03 16:35:47 +0000
> @@ -1810,8 +1840,9 @@
> tunable_loop.run()
> loop_logger.debug(
> "%s completed sucessfully.", loop_name)
> - except Exception:
> + except Exception as e:
> loop_logger.exception("Unhandled exception")
> + print(e)
orly?
> self.failure_count += 1
>
> finally:
--
https://code.launchpad.net/~cjwatson/launchpad/git-repository-type/+merge/307464
Your team Launchpad code reviewers is subscribed to branch lp:launchpad.
References