~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/testing/factory.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-08-30 00:09:33 UTC
  • mfrom: (13677.6.9 no-code-import-approval)
  • Revision ID: launchpad@pqm.canonical.com-20110830000933-7l3crw2cggvvut4x
[r=benji][bug=418932] Remove the requirement for svn and cvs imports
 to be pre-approved by a Launchpad admin.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2153
2153
            else:
2154
2154
                assert rcs_type in (RevisionControlSystems.SVN,
2155
2155
                                    RevisionControlSystems.BZR_SVN)
2156
 
            code_import = code_import_set.new(
 
2156
            return code_import_set.new(
2157
2157
                registrant, target, branch_name, rcs_type=rcs_type,
2158
 
                url=svn_branch_url)
 
2158
                url=svn_branch_url, review_status=review_status)
2159
2159
        elif git_repo_url is not None:
2160
2160
            assert rcs_type in (None, RevisionControlSystems.GIT)
2161
 
            code_import = code_import_set.new(
 
2161
            return code_import_set.new(
2162
2162
                registrant, target, branch_name,
2163
2163
                rcs_type=RevisionControlSystems.GIT,
2164
 
                url=git_repo_url)
 
2164
                url=git_repo_url, review_status=review_status)
2165
2165
        elif hg_repo_url is not None:
2166
 
            code_import = code_import_set.new(
 
2166
            return code_import_set.new(
2167
2167
                registrant, target, branch_name,
2168
2168
                rcs_type=RevisionControlSystems.HG,
2169
 
                url=hg_repo_url)
 
2169
                url=hg_repo_url, review_status=review_status)
2170
2170
        elif bzr_branch_url is not None:
2171
 
            code_import = code_import_set.new(
 
2171
            return code_import_set.new(
2172
2172
                registrant, target, branch_name,
2173
2173
                rcs_type=RevisionControlSystems.BZR,
2174
 
                url=bzr_branch_url)
 
2174
                url=bzr_branch_url, review_status=review_status)
2175
2175
        else:
2176
2176
            assert rcs_type in (None, RevisionControlSystems.CVS)
2177
 
            code_import = code_import_set.new(
 
2177
            return code_import_set.new(
2178
2178
                registrant, target, branch_name,
2179
2179
                rcs_type=RevisionControlSystems.CVS,
2180
 
                cvs_root=cvs_root, cvs_module=cvs_module)
2181
 
        if review_status:
2182
 
            removeSecurityProxy(code_import).review_status = review_status
2183
 
        return code_import
 
2180
                cvs_root=cvs_root, cvs_module=cvs_module,
 
2181
                review_status=review_status)
2184
2182
 
2185
2183
    def makeChangelog(self, spn=None, versions=[]):
2186
2184
        """Create and return a LFA of a valid Debian-style changelog."""