launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #04040
[Merge] lp:~jelmer/launchpad/bzr-code-import-db into lp:launchpad/db-devel
Jelmer Vernooij has proposed merging lp:~jelmer/launchpad/bzr-code-import-db into lp:launchpad/db-devel.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~jelmer/launchpad/bzr-code-import-db/+merge/65265
Add an entry for Bazaar itself in the RevisionControlSystem enum that is used for code imports.
This is the first step towards supporting code imports of Bazaar branches. This is opposed to mirrors, which currently have a completely different backend and UI.
--
https://code.launchpad.net/~jelmer/launchpad/bzr-code-import-db/+merge/65265
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~jelmer/launchpad/bzr-code-import-db into lp:launchpad/db-devel.
=== added file 'database/schema/patch-2208-74-0.sql'
--- database/schema/patch-2208-74-0.sql 1970-01-01 00:00:00 +0000
+++ database/schema/patch-2208-74-0.sql 2011-06-20 20:22:35 +0000
@@ -0,0 +1,17 @@
+-- Copyright 2011 Canonical Ltd. This software is licensed under the
+-- GNU Affero General Public License version 3 (see the file LICENSE).
+
+SET client_min_messages=ERROR;
+
+ALTER TABLE CodeImport DROP CONSTRAINT valid_vcs_details;
+ALTER TABLE CodeImport ADD CONSTRAINT "valid_vcs_details" CHECK (
+CASE
+ WHEN rcs_type = 1 THEN cvs_root IS NOT NULL AND cvs_root <> ''::text AND cvs_module IS NOT NULL AND cvs_module <> ''::text AND url IS NULL
+ WHEN rcs_type = ANY (ARRAY[2, 3]) THEN cvs_root IS NULL AND cvs_module IS NULL AND url IS NOT NULL AND valid_absolute_url(url)
+ WHEN rcs_type = ANY (ARRAY[4, 5, 6]) THEN cvs_root IS NULL AND cvs_module IS NULL AND url IS NOT NULL
+ ELSE false
+END);
+
+
+INSERT INTO LaunchpadDatabaseRevision VALUES (2208, 74, 0);
+
=== modified file 'lib/lp/code/enums.py'
--- lib/lp/code/enums.py 2010-10-18 02:37:53 +0000
+++ lib/lp/code/enums.py 2011-06-20 20:22:35 +0000
@@ -377,6 +377,12 @@
Imports from Mercurial using bzr-hg.
""")
+ BZR = DBItem(6, """
+ Bazaar
+
+ Mirror of a Bazaar branch.
+ """)
+
class CodeImportReviewStatus(DBEnumeratedType):
"""CodeImport review status.