← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~cjwatson/launchpad/remove-git-feature-flag into lp:launchpad

 

Colin Watson has proposed merging lp:~cjwatson/launchpad/remove-git-feature-flag into lp:launchpad.

Commit message:
Remove the Git feature flag.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/remove-git-feature-flag/+merge/259115

Remove the Git feature flag.  It's been switched on for everyone on production for a couple of weeks now, and we aren't going to want to switch it off again.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~cjwatson/launchpad/remove-git-feature-flag into lp:launchpad.
=== modified file 'lib/lp/app/doc/tales.txt'
--- lib/lp/app/doc/tales.txt	2015-04-21 10:49:24 +0000
+++ lib/lp/app/doc/tales.txt	2015-05-14 14:02:04 +0000
@@ -527,12 +527,9 @@
 
 For Git repositories, fmt:link links to the repository page.
 
-    >>> from lp.code.interfaces.gitrepository import GIT_FEATURE_FLAG
-    >>> from lp.services.features.testing import FeatureFixture
-    >>> with FeatureFixture({GIT_FEATURE_FLAG: 'on'}):
-    ...     repository = factory.makeGitRepository(
-    ...         owner=eric, target=fooix, name=u'bar')
-    ...     print test_tales("repository/fmt:link", repository=repository)
+    >>> repository = factory.makeGitRepository(
+    ...     owner=eric, target=fooix, name=u'bar')
+    >>> print test_tales("repository/fmt:link", repository=repository)
     <a href=".../~eric/fooix/+git/bar">lp:~eric/fooix/+git/bar</a>
 
 
@@ -541,10 +538,8 @@
 
 For Git references, fmt:link links to the reference page.
 
-    >>> with FeatureFixture({GIT_FEATURE_FLAG: 'on'}):
-    ...     [ref] = factory.makeGitRefs(
-    ...         repository=repository, paths=[u"master"])
-    ...     print test_tales("ref/fmt:link", ref=ref)
+    >>> [ref] = factory.makeGitRefs(repository=repository, paths=[u"master"])
+    >>> print test_tales("ref/fmt:link", ref=ref)
     <a href=".../~eric/fooix/+git/bar/+ref/master">~eric/fooix/+git/bar:master</a>
 
 

=== modified file 'lib/lp/app/widgets/tests/test_suggestion.py'
--- lib/lp/app/widgets/tests/test_suggestion.py	2015-04-30 12:29:47 +0000
+++ lib/lp/app/widgets/tests/test_suggestion.py	2015-05-14 14:02:04 +0000
@@ -29,11 +29,7 @@
     TargetBranchWidget,
     TargetGitRepositoryWidget,
     )
-from lp.code.interfaces.gitrepository import (
-    GIT_FEATURE_FLAG,
-    IGitRepositorySet,
-    )
-from lp.services.features.testing import FeatureFixture
+from lp.code.interfaces.gitrepository import IGitRepositorySet
 from lp.services.webapp.servers import LaunchpadTestRequest
 from lp.services.webapp.vocabulary import (
     FilteredVocabularyBase,
@@ -220,10 +216,6 @@
         doctest.NORMALIZE_WHITESPACE | doctest.REPORT_NDIFF |
         doctest.ELLIPSIS)
 
-    def setUp(self):
-        super(TestTargetGitRepositoryWidget, self).setUp()
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
-
     def makeRepositoryAndOldMergeProposal(self, timedelta):
         """Make an old merge proposal and a repository with the same target."""
         bmp = self.factory.makeBranchMergeProposalForGit(

=== modified file 'lib/lp/code/adapters/tests/test_gitrepository.py'
--- lib/lp/code/adapters/tests/test_gitrepository.py	2015-04-21 23:25:19 +0000
+++ lib/lp/code/adapters/tests/test_gitrepository.py	2015-05-14 14:02:04 +0000
@@ -6,8 +6,6 @@
 from zope.interface import providedBy
 
 from lp.code.adapters.gitrepository import GitRepositoryDelta
-from lp.code.interfaces.gitrepository import GIT_FEATURE_FLAG
-from lp.services.features.testing import FeatureFixture
 from lp.testing import (
     person_logged_in,
     TestCaseWithFactory,
@@ -19,10 +17,6 @@
 
     layer = LaunchpadFunctionalLayer
 
-    def setUp(self):
-        super(TestGitRepositoryDelta, self).setUp()
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
-
     def test_no_modification(self):
         # If there are no modifications, no delta is returned.
         repository = self.factory.makeGitRepository(name=u"foo")

=== modified file 'lib/lp/code/browser/tests/test_branchmergeproposal.py'
--- lib/lp/code/browser/tests/test_branchmergeproposal.py	2015-05-13 16:56:06 +0000
+++ lib/lp/code/browser/tests/test_branchmergeproposal.py	2015-05-14 14:02:04 +0000
@@ -47,7 +47,6 @@
     BranchMergeProposalStatus,
     CodeReviewVote,
     )
-from lp.code.interfaces.gitrepository import GIT_FEATURE_FLAG
 from lp.code.model.diff import PreviewDiff
 from lp.code.tests.helpers import (
     add_revision_to_branch,
@@ -58,7 +57,6 @@
     PersonVisibility,
     TeamMembershipPolicy,
     )
-from lp.services.features.testing import FeatureFixture
 from lp.services.librarian.interfaces.client import LibrarianServerError
 from lp.services.messages.model.message import MessageSet
 from lp.services.webapp import canonical_url
@@ -144,7 +142,6 @@
         # permissions on the merge proposals for adding comments, or
         # nominating reviewers.
         TestCaseWithFactory.setUp(self, user="admin@xxxxxxxxxxxxx")
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
         self.bmp = self.factory.makeBranchMergeProposalForGit()
 
     def test_initial_values(self):
@@ -718,10 +715,6 @@
     TestRegisterBranchMergeProposalViewMixin, BrowserTestCase):
     """Test the merge proposal registration view for Git."""
 
-    def setUp(self):
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
-        super(TestRegisterBranchMergeProposalViewGit, self).setUp()
-
     def _makeBranch(self):
         return self.factory.makeGitRefs()[0]
 
@@ -990,10 +983,6 @@
     TestBranchMergeProposalResubmitViewMixin, TestCaseWithFactory):
     """Test BranchMergeProposalResubmitView for Git."""
 
-    def setUp(self):
-        super(TestBranchMergeProposalResubmitViewGit, self).setUp()
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
-
     def _makeBranchMergeProposal(self):
         return self.factory.makeBranchMergeProposalForGit()
 
@@ -1065,10 +1054,6 @@
 
     layer = DatabaseFunctionalLayer
 
-    def setUp(self):
-        super(TestResubmitBrowserGit, self).setUp()
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
-
     def test_resubmit_text(self):
         """The text of the resubmit page is as expected."""
         bmp = self.factory.makeBranchMergeProposalForGit(registrant=self.user)
@@ -1281,7 +1266,6 @@
         self.assertTrue(view.pending_diff)
 
     def test_pending_diff_with_pending_git_repository(self):
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
         bmp = self.factory.makeBranchMergeProposalForGit()
         bmp.next_preview_diff_job.start()
         bmp.next_preview_diff_job.fail()
@@ -1634,10 +1618,6 @@
     TestLatestProposalsForEachBranchMixin, TestCaseWithFactory):
     """Confirm that the latest branch is returned for Bazaar."""
 
-    def setUp(self):
-        super(TestLatestProposalsForEachBranchGit, self).setUp()
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
-
     def _makeBranchMergeProposal(self, merge_target=None, **kwargs):
         return self.factory.makeBranchMergeProposalForGit(
             target_ref=merge_target, **kwargs)
@@ -1689,9 +1669,5 @@
     TestBranchMergeProposalDeleteViewMixin, BrowserTestCase):
     """Test the BranchMergeProposal deletion view for Git."""
 
-    def setUp(self):
-        super(TestBranchMergeProposalDeleteViewGit, self).setUp()
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
-
     def _makeBranchMergeProposal(self, **kwargs):
         return self.factory.makeBranchMergeProposalForGit(**kwargs)

=== modified file 'lib/lp/code/browser/tests/test_branchmergeproposallisting.py'
--- lib/lp/code/browser/tests/test_branchmergeproposallisting.py	2015-05-12 17:30:40 +0000
+++ lib/lp/code/browser/tests/test_branchmergeproposallisting.py	2015-05-14 14:02:04 +0000
@@ -25,13 +25,9 @@
     CodeReviewVote,
     )
 from lp.code.interfaces.gitref import IGitRef
-from lp.code.interfaces.gitrepository import (
-    GIT_FEATURE_FLAG,
-    IGitRepositorySet,
-    )
+from lp.code.interfaces.gitrepository import IGitRepositorySet
 from lp.registry.model.personproduct import PersonProduct
 from lp.services.database.sqlbase import flush_database_caches
-from lp.services.features.testing import FeatureFixture
 from lp.testing import (
     ANONYMOUS,
     BrowserTestCase,
@@ -80,10 +76,6 @@
 class GitMixin:
     """Mixin for Git-based tests."""
 
-    def setUp(self, user=ANONYMOUS):
-        super(GitMixin, self).setUp(user=user)
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
-
     def _makeBranch(self, **kwargs):
         return self.factory.makeGitRefs(**kwargs)[0]
 
@@ -276,7 +268,6 @@
         self.assertThat(recorder, HasQueryCount(Equals(41)))
 
     def test_query_count_git(self):
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
         product = self.factory.makeProduct()
         [target] = self.factory.makeGitRefs(
             target=product, information_type=InformationType.USERDATA)
@@ -301,7 +292,6 @@
         self.assertIn(identity, view.contents)
 
     def test_product_git(self):
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
         [target] = self.factory.makeGitRefs()
         with person_logged_in(target.target.owner):
             getUtility(IGitRepositorySet).setDefaultRepository(

=== modified file 'lib/lp/code/browser/tests/test_gitrepository.py'
--- lib/lp/code/browser/tests/test_gitrepository.py	2015-05-01 13:18:54 +0000
+++ lib/lp/code/browser/tests/test_gitrepository.py	2015-05-14 14:02:04 +0000
@@ -17,10 +17,8 @@
 
 from lp.app.enums import InformationType
 from lp.app.interfaces.services import IService
-from lp.code.interfaces.gitrepository import GIT_FEATURE_FLAG
 from lp.code.interfaces.revision import IRevisionSet
 from lp.registry.interfaces.person import PersonVisibility
-from lp.services.features.testing import FeatureFixture
 from lp.services.webapp.publisher import canonical_url
 from lp.testing import (
     admin_logged_in,
@@ -45,10 +43,6 @@
 
     layer = DatabaseFunctionalLayer
 
-    def setUp(self):
-        super(TestGitRepositoryNavigation, self).setUp()
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
-
     def test_traverse_ref(self):
         [ref] = self.factory.makeGitRefs()
         url = "%s/+ref/%s" % (canonical_url(ref.repository), ref.path)
@@ -64,10 +58,6 @@
 
     layer = DatabaseFunctionalLayer
 
-    def setUp(self):
-        super(TestGitRepositoryView, self).setUp()
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
-
     def test_user_can_push(self):
         # A user can push if they have edit permissions.
         repository = self.factory.makeGitRepository()
@@ -123,10 +113,6 @@
 
     layer = DatabaseFunctionalLayer
 
-    def setUp(self):
-        super(TestGitRepositoryViewPrivateArtifacts, self).setUp()
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
-
     def _getBrowser(self, user=None):
         if user is None:
             browser = setupBrowser()
@@ -168,10 +154,6 @@
 
     layer = DatabaseFunctionalLayer
 
-    def setUp(self):
-        super(TestGitRepositoryBranches, self).setUp()
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
-
     def makeRevisionAuthor(self, person=None):
         if person is None:
             person = self.factory.makePerson()

=== modified file 'lib/lp/code/browser/tests/test_gitsubscription.py'
--- lib/lp/code/browser/tests/test_gitsubscription.py	2015-04-21 09:31:58 +0000
+++ lib/lp/code/browser/tests/test_gitsubscription.py	2015-05-14 14:02:04 +0000
@@ -6,8 +6,6 @@
 __metaclass__ = type
 
 from lp.app.enums import InformationType
-from lp.code.interfaces.gitrepository import GIT_FEATURE_FLAG
-from lp.services.features.testing import FeatureFixture
 from lp.testing import (
     person_logged_in,
     TestCaseWithFactory,
@@ -20,10 +18,6 @@
 
     layer = DatabaseFunctionalLayer
 
-    def setUp(self):
-        super(TestGitSubscriptionAddOtherView, self).setUp()
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
-
     def test_cannot_subscribe_open_team_to_private_repository(self):
         owner = self.factory.makePerson()
         repository = self.factory.makeGitRepository(

=== modified file 'lib/lp/code/browser/tests/test_product.py'
--- lib/lp/code/browser/tests/test_product.py	2015-05-01 13:20:17 +0000
+++ lib/lp/code/browser/tests/test_product.py	2015-05-14 14:02:04 +0000
@@ -19,13 +19,9 @@
     ServiceUsage,
     )
 from lp.code.enums import BranchType
-from lp.code.interfaces.gitrepository import (
-    GIT_FEATURE_FLAG,
-    IGitRepositorySet,
-    )
+from lp.code.interfaces.gitrepository import IGitRepositorySet
 from lp.code.interfaces.revision import IRevisionSet
 from lp.registry.enums import BranchSharingPolicy
-from lp.services.features.testing import FeatureFixture
 from lp.services.webapp import canonical_url
 from lp.testing import (
     ANONYMOUS,
@@ -226,7 +222,6 @@
     def test_default_git_repository(self):
         # If there is a default Git repository, Product:+branches shows a
         # summary of its branches.
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
         product = self.factory.makeProduct()
         repository = self.factory.makeGitRepository(target=product)
         self.factory.makeGitRefs(

=== modified file 'lib/lp/code/errors.py'
--- lib/lp/code/errors.py	2015-04-30 01:45:30 +0000
+++ lib/lp/code/errors.py	2015-05-14 14:02:04 +0000
@@ -29,7 +29,6 @@
     'ClaimReviewFailed',
     'DiffNotFound',
     'GitDefaultConflict',
-    'GitFeatureDisabled',
     'GitRepositoryCreationException',
     'GitRepositoryCreationFault',
     'GitRepositoryCreationForbidden',
@@ -332,15 +331,6 @@
     """Base class for Git repository creation exceptions."""
 
 
-@error_status(httplib.UNAUTHORIZED)
-class GitFeatureDisabled(GitRepositoryCreationException):
-    """Only certain users can create new Git repositories."""
-
-    def __init__(self):
-        message = "You do not have permission to create Git repositories."
-        GitRepositoryCreationException.__init__(self, message)
-
-
 @error_status(httplib.CONFLICT)
 class GitRepositoryExists(GitRepositoryCreationException):
     """Raised when creating a Git repository that already exists."""

=== modified file 'lib/lp/code/interfaces/gitrepository.py'
--- lib/lp/code/interfaces/gitrepository.py	2015-05-13 16:56:06 +0000
+++ lib/lp/code/interfaces/gitrepository.py	2015-05-14 14:02:04 +0000
@@ -6,7 +6,6 @@
 __metaclass__ = type
 
 __all__ = [
-    'GIT_FEATURE_FLAG',
     'GitIdentityMixin',
     'GIT_REPOSITORY_NAME_VALIDATION_ERROR_MESSAGE',
     'git_repository_name_validator',
@@ -80,9 +79,6 @@
     )
 
 
-GIT_FEATURE_FLAG = u"code.git.enabled"
-
-
 GIT_REPOSITORY_NAME_VALIDATION_ERROR_MESSAGE = _(
     "Git repository names must start with a number or letter.  The characters "
     "+, -, _, . and @ are also allowed after the first character.  Repository "

=== modified file 'lib/lp/code/mail/tests/test_branch.py'
--- lib/lp/code/mail/tests/test_branch.py	2015-04-16 04:07:59 +0000
+++ lib/lp/code/mail/tests/test_branch.py	2015-05-14 14:02:04 +0000
@@ -10,14 +10,12 @@
     BranchSubscriptionNotificationLevel,
     CodeReviewNotificationLevel,
     )
-from lp.code.interfaces.gitrepository import GIT_FEATURE_FLAG
 from lp.code.mail.branch import (
     BranchMailer,
     RecipientReason,
     )
 from lp.code.model.branch import Branch
 from lp.code.model.gitref import GitRef
-from lp.services.features.testing import FeatureFixture
 from lp.testing import (
     login_person,
     TestCaseWithFactory,
@@ -165,10 +163,6 @@
 class TestRecipientReasonGit(TestRecipientReasonMixin):
     """Test RecipientReason for Git references."""
 
-    def setUp(self):
-        super(TestRecipientReasonGit, self).setUp()
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
-
     def makeProposalWithSubscription(self, subscriber=None):
         """Test fixture."""
         if subscriber is None:
@@ -266,10 +260,6 @@
     TestBranchMailerHeadersMixin, TestCaseWithFactory):
     """Check the headers are correct for GitRef email."""
 
-    def setUp(self):
-        super(TestBranchMailerHeadersGit, self).setUp()
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
-
     def makeBranch(self, owner):
         repository = self.factory.makeGitRepository(owner=owner)
         return self.factory.makeGitRefs(repository=repository)[0]
@@ -340,10 +330,6 @@
 class TestBranchMailerDiffGit(TestBranchMailerDiffMixin, TestCaseWithFactory):
     """Check the diff is an attachment for GitRef email."""
 
-    def setUp(self):
-        super(TestBranchMailerDiffGit, self).setUp()
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
-
     def makeBranch(self, owner):
         repository = self.factory.makeGitRepository(owner=owner)
         return self.factory.makeGitRefs(repository=repository)[0]
@@ -381,9 +367,5 @@
     TestBranchMailerSubjectMixin, TestCaseWithFactory):
     """The subject for a BranchMailer is returned verbatim for GitRef."""
 
-    def setUp(self):
-        super(TestBranchMailerSubjectGit, self).setUp()
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
-
     def makeBranch(self):
         return self.factory.makeGitRefs()[0]

=== modified file 'lib/lp/code/model/gitrepository.py'
--- lib/lp/code/model/gitrepository.py	2015-05-13 16:56:06 +0000
+++ lib/lp/code/model/gitrepository.py	2015-05-14 14:02:04 +0000
@@ -59,7 +59,6 @@
 from lp.code.enums import GitObjectType
 from lp.code.errors import (
     GitDefaultConflict,
-    GitFeatureDisabled,
     GitTargetError,
     )
 from lp.code.interfaces.gitcollection import (
@@ -72,7 +71,6 @@
     IGitNamespacePolicy,
     )
 from lp.code.interfaces.gitrepository import (
-    GIT_FEATURE_FLAG,
     GitIdentityMixin,
     IGitRepository,
     IGitRepositorySet,
@@ -120,7 +118,6 @@
     BulkUpdate,
     Values,
     )
-from lp.services.features import getFeatureFlag
 from lp.services.job.interfaces.job import JobStatus
 from lp.services.job.model.job import Job
 from lp.services.mail.notificationrecipientset import NotificationRecipientSet
@@ -192,8 +189,6 @@
 
     def __init__(self, registrant, owner, target, name, information_type,
                  date_created, reviewer=None, description=None):
-        if not getFeatureFlag(GIT_FEATURE_FLAG):
-            raise GitFeatureDisabled
         super(GitRepository, self).__init__()
         self.registrant = registrant
         self.owner = owner

=== modified file 'lib/lp/code/model/tests/test_branchmergeproposaljobs.py'
--- lib/lp/code/model/tests/test_branchmergeproposaljobs.py	2015-04-29 14:37:10 +0000
+++ lib/lp/code/model/tests/test_branchmergeproposaljobs.py	2015-05-14 14:02:04 +0000
@@ -38,7 +38,6 @@
     IUpdatePreviewDiffJob,
     IUpdatePreviewDiffJobSource,
     )
-from lp.code.interfaces.gitrepository import GIT_FEATURE_FLAG
 from lp.code.model.branchmergeproposaljob import (
     BranchMergeProposalJob,
     BranchMergeProposalJobDerived,
@@ -221,7 +220,6 @@
         self.checkExampleMerge(bmp.preview_diff.text)
 
     def test_run_git(self):
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
         bmp, _, _, patch = self.createExampleGitMerge()
         job = UpdatePreviewDiffJob.create(bmp)
         with dbuser("merge-proposal-jobs"):
@@ -527,7 +525,6 @@
         # iterReady supports merge proposals based on Git.  (These are
         # currently considered ready regardless of scanning, since the hard
         # work is done by the backend.)
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
         bmp = self.factory.makeBranchMergeProposalForGit()
         [job] = self.job_source.iterReady()
         self.assertEqual(bmp, job.branch_merge_proposal)

=== modified file 'lib/lp/code/model/tests/test_diff.py'
--- lib/lp/code/model/tests/test_diff.py	2015-04-29 14:28:48 +0000
+++ lib/lp/code/model/tests/test_diff.py	2015-05-14 14:02:04 +0000
@@ -26,13 +26,11 @@
     IIncrementalDiff,
     IPreviewDiff,
     )
-from lp.code.interfaces.gitrepository import GIT_FEATURE_FLAG
 from lp.code.model.diff import (
     Diff,
     PreviewDiff,
     )
 from lp.code.model.directbranchcommit import DirectBranchCommit
-from lp.services.features.testing import FeatureFixture
 from lp.services.librarian.interfaces.client import (
     LIBRARIAN_SERVER_DEFAULT_TIMEOUT,
     )
@@ -376,10 +374,6 @@
 
     layer = LaunchpadFunctionalLayer
 
-    def setUp(self):
-        super(TestPreviewDiff, self).setUp()
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
-
     def _createProposalWithPreviewDiff(self, prerequisite_branch=None,
                                        content=None):
         # Create and return a preview diff.

=== modified file 'lib/lp/code/model/tests/test_gitcollection.py'
--- lib/lp/code/model/tests/test_gitcollection.py	2015-04-22 16:42:57 +0000
+++ lib/lp/code/model/tests/test_gitcollection.py	2015-05-14 14:02:04 +0000
@@ -34,10 +34,7 @@
     IAllGitRepositories,
     IGitCollection,
     )
-from lp.code.interfaces.gitrepository import (
-    GIT_FEATURE_FLAG,
-    IGitRepositorySet,
-    )
+from lp.code.interfaces.gitrepository import IGitRepositorySet
 from lp.code.model.gitcollection import GenericGitCollection
 from lp.code.model.gitrepository import GitRepository
 from lp.registry.enums import PersonVisibility
@@ -47,7 +44,6 @@
     )
 from lp.registry.model.personproduct import PersonProduct
 from lp.services.database.interfaces import IStore
-from lp.services.features.testing import FeatureFixture
 from lp.services.webapp.publisher import canonical_url
 from lp.testing import (
     person_logged_in,
@@ -110,7 +106,6 @@
 
     def setUp(self):
         super(TestGenericGitCollection, self).setUp()
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
         self.store = IStore(GitRepository)
 
     def test_provides_gitcollection(self):
@@ -194,7 +189,6 @@
 
     def setUp(self):
         TestCaseWithFactory.setUp(self)
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
         self.all_repositories = getUtility(IAllGitRepositories)
 
     def test_order_by_repository_name(self):
@@ -455,7 +449,6 @@
 
     def setUp(self):
         TestCaseWithFactory.setUp(self)
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
         self.all_repositories = getUtility(IAllGitRepositories)
 
     def test_empty_branch_merge_proposals(self):
@@ -615,7 +608,6 @@
         # Use the admin user as we don't care about who can and can't call
         # nominate reviewer in this test.
         TestCaseWithFactory.setUp(self, 'admin@xxxxxxxxxxxxx')
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
         self.all_repositories = getUtility(IAllGitRepositories)
 
     def test_getProposalsForReviewer(self):
@@ -685,7 +677,6 @@
 
     def setUp(self):
         TestCaseWithFactory.setUp(self)
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
         self.public_repository = self.factory.makeGitRepository(name=u'public')
         self.private_repository = self.factory.makeGitRepository(
             name=u'private', information_type=InformationType.USERDATA)
@@ -816,7 +807,6 @@
 
     def setUp(self):
         TestCaseWithFactory.setUp(self)
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
         self.collection = getUtility(IAllGitRepositories)
 
     def test_exact_match_unique_name(self):
@@ -959,7 +949,6 @@
 
     def setUp(self):
         TestCaseWithFactory.setUp(self)
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
         self.all_repositories = getUtility(IAllGitRepositories)
 
     def test_no_teams(self):
@@ -1006,7 +995,6 @@
 
     def setUp(self):
         TestCaseWithFactory.setUp(self)
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
         self.all_repositories = getUtility(IAllGitRepositories)
 
     def test_no_repositories(self):

=== modified file 'lib/lp/code/model/tests/test_gitjob.py'
--- lib/lp/code/model/tests/test_gitjob.py	2015-05-13 15:32:18 +0000
+++ lib/lp/code/model/tests/test_gitjob.py	2015-05-14 14:02:04 +0000
@@ -22,14 +22,12 @@
     IGitJob,
     IGitRefScanJob,
     )
-from lp.code.interfaces.gitrepository import GIT_FEATURE_FLAG
 from lp.code.model.gitjob import (
     GitJob,
     GitJobDerived,
     GitJobType,
     GitRefScanJob,
     )
-from lp.services.features.testing import FeatureFixture
 from lp.testing import (
     TestCaseWithFactory,
     time_counter,
@@ -49,7 +47,6 @@
 
     def test_provides_interface(self):
         # `GitJob` objects provide `IGitJob`.
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
         repository = self.factory.makeGitRepository()
         self.assertProvides(
             GitJob(repository, GitJobType.REF_SCAN, {}), IGitJob)
@@ -62,7 +59,6 @@
 
     def test_getOopsMailController(self):
         """By default, no mail is sent about failed BranchJobs."""
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
         repository = self.factory.makeGitRepository()
         job = GitJob(repository, GitJobType.REF_SCAN, {})
         derived = GitJobDerived(job)
@@ -117,10 +113,6 @@
 
     layer = LaunchpadZopelessLayer
 
-    def setUp(self):
-        super(TestGitRefScanJob, self).setUp()
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
-
     def test_provides_interface(self):
         # `GitRefScanJob` objects provide `IGitRefScanJob`.
         repository = self.factory.makeGitRepository()

=== modified file 'lib/lp/code/model/tests/test_gitlookup.py'
--- lib/lp/code/model/tests/test_gitlookup.py	2015-03-30 14:47:22 +0000
+++ lib/lp/code/model/tests/test_gitlookup.py	2015-05-14 14:02:04 +0000
@@ -16,10 +16,7 @@
     IGitLookup,
     IGitTraverser,
     )
-from lp.code.interfaces.gitrepository import (
-    GIT_FEATURE_FLAG,
-    IGitRepositorySet,
-    )
+from lp.code.interfaces.gitrepository import IGitRepositorySet
 from lp.registry.errors import NoSuchSourcePackageName
 from lp.registry.interfaces.person import NoSuchPerson
 from lp.registry.interfaces.product import (
@@ -27,7 +24,6 @@
     NoSuchProduct,
     )
 from lp.services.config import config
-from lp.services.features.testing import FeatureFixture
 from lp.testing import (
     person_logged_in,
     TestCaseWithFactory,
@@ -42,7 +38,6 @@
 
     def setUp(self):
         super(TestGetByHostingPath, self).setUp()
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
         self.lookup = getUtility(IGitLookup)
 
     def test_exists(self):
@@ -62,7 +57,6 @@
 
     def setUp(self):
         super(TestGetByUniqueName, self).setUp()
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
         self.lookup = getUtility(IGitLookup)
 
     def test_not_found(self):
@@ -94,7 +88,6 @@
 
     def setUp(self):
         super(TestGetByPath, self).setUp()
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
         self.lookup = getUtility(IGitLookup)
 
     def test_project(self):
@@ -172,7 +165,6 @@
 
     def setUp(self):
         super(TestGetByUrl, self).setUp()
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
         self.lookup = getUtility(IGitLookup)
 
     def makeProjectRepository(self):
@@ -269,7 +261,6 @@
 
     def setUp(self):
         super(TestGitTraverser, self).setUp()
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
         self.traverser = getUtility(IGitTraverser)
 
     def assertTraverses(self, path, owner, target, repository=None):

=== modified file 'lib/lp/code/model/tests/test_gitnamespace.py'
--- lib/lp/code/model/tests/test_gitnamespace.py	2015-04-28 23:25:08 +0000
+++ lib/lp/code/model/tests/test_gitnamespace.py	2015-05-14 14:02:04 +0000
@@ -10,12 +10,8 @@
     GitDefaultConflict,
     GitRepositoryExists,
     )
-from lp.code.interfaces.gitrepository import (
-    GIT_FEATURE_FLAG,
-    IGitRepositorySet,
-    )
+from lp.code.interfaces.gitrepository import IGitRepositorySet
 from lp.code.model.gitnamespace import ProjectGitNamespace
-from lp.services.features.testing import FeatureFixture
 from lp.testing import TestCaseWithFactory
 from lp.testing.layers import DatabaseFunctionalLayer
 
@@ -25,10 +21,6 @@
 
     layer = DatabaseFunctionalLayer
 
-    def setUp(self):
-        super(TestGitNamespaceMoveRepository, self).setUp()
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
-
     def assertNamespacesEqual(self, expected, result):
         """Assert that the namespaces refer to the same thing.
 

=== modified file 'lib/lp/code/model/tests/test_gitref.py'
--- lib/lp/code/model/tests/test_gitref.py	2015-04-24 12:58:46 +0000
+++ lib/lp/code/model/tests/test_gitref.py	2015-05-14 14:02:04 +0000
@@ -9,8 +9,6 @@
 
 from testtools.matchers import EndsWith
 
-from lp.code.interfaces.gitrepository import GIT_FEATURE_FLAG
-from lp.services.features.testing import FeatureFixture
 from lp.services.webapp.interfaces import OAuthPermission
 from lp.testing import (
     ANONYMOUS,
@@ -26,10 +24,6 @@
 
     layer = DatabaseFunctionalLayer
 
-    def setUp(self):
-        super(TestGitRef, self).setUp()
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
-
     def test_display_name(self):
         [master, personal] = self.factory.makeGitRefs(
             paths=[u"refs/heads/master", u"refs/heads/people/foo/bar"])
@@ -50,7 +44,6 @@
     layer = DatabaseFunctionalLayer
 
     def test_attributes(self):
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
         [master] = self.factory.makeGitRefs(paths=[u"refs/heads/master"])
         webservice = webservice_for_person(
             master.repository.owner, permission=OAuthPermission.READ_PUBLIC)

=== modified file 'lib/lp/code/model/tests/test_gitrepository.py'
--- lib/lp/code/model/tests/test_gitrepository.py	2015-05-13 16:56:06 +0000
+++ lib/lp/code/model/tests/test_gitrepository.py	2015-05-14 14:02:04 +0000
@@ -40,7 +40,6 @@
     GitObjectType,
     )
 from lp.code.errors import (
-    GitFeatureDisabled,
     GitRepositoryCreatorNotMemberOfOwnerTeam,
     GitRepositoryCreatorNotOwner,
     GitRepositoryExists,
@@ -53,7 +52,6 @@
     IGitNamespaceSet,
     )
 from lp.code.interfaces.gitrepository import (
-    GIT_FEATURE_FLAG,
     IGitRepository,
     IGitRepositorySet,
     )
@@ -77,7 +75,6 @@
 from lp.registry.tests.test_accesspolicy import get_policies_for_artifact
 from lp.services.config import config
 from lp.services.database.constants import UTC_NOW
-from lp.services.features.testing import FeatureFixture
 from lp.services.job.runner import JobRunner
 from lp.services.mail import stub
 from lp.services.webapp.authorization import check_permission
@@ -96,29 +93,15 @@
 from lp.testing.layers import (
     DatabaseFunctionalLayer,
     LaunchpadFunctionalLayer,
-    ZopelessDatabaseLayer,
     )
 from lp.testing.pages import webservice_for_person
 
 
-class TestGitRepositoryFeatureFlag(TestCaseWithFactory):
-
-    layer = ZopelessDatabaseLayer
-
-    def test_feature_flag_disabled(self):
-        # Without a feature flag, we will not create new Git repositories.
-        self.assertRaises(GitFeatureDisabled, self.factory.makeGitRepository)
-
-
 class TestGitRepository(TestCaseWithFactory):
     """Test basic properties about Launchpad database Git repositories."""
 
     layer = DatabaseFunctionalLayer
 
-    def setUp(self):
-        super(TestGitRepository, self).setUp()
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
-
     def test_implements_IGitRepository(self):
         repository = self.factory.makeGitRepository()
         verifyObject(IGitRepository, repository)
@@ -170,7 +153,6 @@
 
     def setUp(self):
         super(TestGitIdentityMixin, self).setUp()
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
         self.repository_set = getUtility(IGitRepositorySet)
 
     def assertGitIdentity(self, repository, identity_path):
@@ -307,10 +289,6 @@
 
     layer = DatabaseFunctionalLayer
 
-    def setUp(self):
-        super(TestGitRepositoryModifications, self).setUp()
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
-
     def test_date_last_modified_initial_value(self):
         # The initial value of date_last_modified is date_created.
         repository = self.factory.makeGitRepository()
@@ -365,10 +343,6 @@
 
     layer = DatabaseFunctionalLayer
 
-    def setUp(self):
-        super(TestGitRepositoryURLs, self).setUp()
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
-
     def test_codebrowse_url(self):
         # The basic codebrowse URL for a repository is an 'https' URL.
         repository = self.factory.makeGitRepository()
@@ -414,10 +388,6 @@
 
     layer = DatabaseFunctionalLayer
 
-    def setUp(self):
-        super(TestGitRepositoryNamespace, self).setUp()
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
-
     def test_namespace_personal(self):
         # The namespace attribute of a personal repository points to the
         # namespace that corresponds to ~owner.
@@ -452,10 +422,6 @@
 
     layer = LaunchpadFunctionalLayer
 
-    def setUp(self):
-        super(TestGitRepositoryPendingWrites, self).setUp()
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
-
     def test_new_repository_no_writes(self):
         # New repositories have no pending writes.
         repository = self.factory.makeGitRepository()
@@ -483,7 +449,6 @@
     def setUp(self):
         # Use an admin user as we aren't checking edit permissions here.
         super(TestGitRepositoryPrivacy, self).setUp("admin@xxxxxxxxxxxxx")
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
 
     def test_personal_repositories_for_private_teams_are_private(self):
         team = self.factory.makeTeam(
@@ -532,10 +497,6 @@
 
     layer = DatabaseFunctionalLayer
 
-    def setUp(self):
-        super(TestGitRepositoryRefs, self).setUp()
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
-
     def test__convertRefInfo(self):
         # _convertRefInfo converts a valid info dictionary.
         sha1 = unicode(hashlib.sha1("").hexdigest())
@@ -844,10 +805,6 @@
 
     layer = DatabaseFunctionalLayer
 
-    def setUp(self):
-        super(TestGitRepositoryGetAllowedInformationTypes, self).setUp()
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
-
     def test_normal_user_sees_namespace_types(self):
         # An unprivileged user sees the types allowed by the namespace.
         repository = self.factory.makeGitRepository()
@@ -883,10 +840,6 @@
 
     layer = DatabaseFunctionalLayer
 
-    def setUp(self):
-        super(TestGitRepositoryModerate, self).setUp()
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
-
     def test_moderate_permission(self):
         # Test the ModerateGitRepository security checker.
         project = self.factory.makeProduct()
@@ -926,10 +879,6 @@
 
     layer = DatabaseFunctionalLayer
 
-    def setUp(self):
-        super(TestGitRepositoryIsPersonTrustedReviewer, self).setUp()
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
-
     def assertTrustedReviewer(self, repository, person):
         """Assert that `person` is a trusted reviewer for the `repository`."""
         self.assertTrue(repository.isPersonTrustedReviewer(person))
@@ -999,10 +948,6 @@
 
     layer = DatabaseFunctionalLayer
 
-    def setUp(self):
-        super(TestGitRepositorySetName, self).setUp()
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
-
     def test_not_owner(self):
         # A non-owner non-admin user cannot rename a repository.
         repository = self.factory.makeGitRepository()
@@ -1032,10 +977,6 @@
 
     layer = DatabaseFunctionalLayer
 
-    def setUp(self):
-        super(TestGitRepositorySetOwner, self).setUp()
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
-
     def test_owner_sets_team(self):
         # The owner of the repository can set the owner of the repository to
         # be a team they are a member of.
@@ -1085,10 +1026,6 @@
 
     layer = DatabaseFunctionalLayer
 
-    def setUp(self):
-        super(TestGitRepositorySetTarget, self).setUp()
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
-
     def test_personal_to_project(self):
         # A personal repository can be moved to a project.
         owner = self.factory.makePerson()
@@ -1219,7 +1156,6 @@
 
     def setUp(self):
         super(TestGitRepositorySet, self).setUp()
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
         self.repository_set = getUtility(IGitRepositorySet)
 
     def test_provides_IGitRepositorySet(self):
@@ -1383,7 +1319,6 @@
 
     def setUp(self):
         super(TestGitRepositorySetDefaultsMixin, self).setUp()
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
         self.repository_set = getUtility(IGitRepositorySet)
         self.get_method = self.repository_set.getDefaultRepository
         self.set_method = (lambda target, repository, user:
@@ -1509,10 +1444,6 @@
 
     layer = DatabaseFunctionalLayer
 
-    def setUp(self):
-        super(TestGitRepositoryWebservice, self).setUp()
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
-
     def test_getRepositories_project(self):
         project_db = self.factory.makeProduct()
         repository_db = self.factory.makeGitRepository(target=project_db)

=== modified file 'lib/lp/code/model/tests/test_gitsubscription.py'
--- lib/lp/code/model/tests/test_gitsubscription.py	2015-04-15 18:34:25 +0000
+++ lib/lp/code/model/tests/test_gitsubscription.py	2015-05-14 14:02:04 +0000
@@ -15,8 +15,6 @@
     BranchSubscriptionNotificationLevel,
     CodeReviewNotificationLevel,
     )
-from lp.code.interfaces.gitrepository import GIT_FEATURE_FLAG
-from lp.services.features.testing import FeatureFixture
 from lp.testing import (
     person_logged_in,
     TestCaseWithFactory,
@@ -29,10 +27,6 @@
 
     layer = DatabaseFunctionalLayer
 
-    def setUp(self):
-        super(TestGitSubscriptions, self).setUp()
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
-
     def test_owner_subscribed(self):
         # The owner of a repository is subscribed to the repository.
         repository = self.factory.makeGitRepository()
@@ -122,10 +116,6 @@
 
     layer = DatabaseFunctionalLayer
 
-    def setUp(self):
-        super(TestGitSubscriptionCanBeUnsubscribedbyUser, self).setUp()
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
-
     def test_none(self):
         # None for a user always returns False.
         subscription = self.factory.makeGitSubscription()

=== modified file 'lib/lp/code/vocabularies/tests/test_gitrepository_vocabularies.py'
--- lib/lp/code/vocabularies/tests/test_gitrepository_vocabularies.py	2015-04-13 19:02:15 +0000
+++ lib/lp/code/vocabularies/tests/test_gitrepository_vocabularies.py	2015-05-14 14:02:04 +0000
@@ -5,9 +5,7 @@
 
 __metaclass__ = type
 
-from lp.code.interfaces.gitrepository import GIT_FEATURE_FLAG
 from lp.code.vocabularies.gitrepository import GitRepositoryVocabulary
-from lp.services.features.testing import FeatureFixture
 from lp.testing import TestCaseWithFactory
 from lp.testing.layers import DatabaseFunctionalLayer
 
@@ -19,7 +17,6 @@
 
     def setUp(self):
         super(TestGitRepositoryVocabulary, self).setUp()
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
         self._createRepositories()
         self.vocab = GitRepositoryVocabulary(context=None)
 

=== modified file 'lib/lp/code/xmlrpc/tests/test_git.py'
--- lib/lp/code/xmlrpc/tests/test_git.py	2015-05-07 09:46:22 +0000
+++ lib/lp/code/xmlrpc/tests/test_git.py	2015-05-14 14:02:04 +0000
@@ -17,13 +17,11 @@
 from lp.code.interfaces.gitcollection import IAllGitRepositories
 from lp.code.interfaces.gitjob import IGitRefScanJobSource
 from lp.code.interfaces.gitrepository import (
-    GIT_FEATURE_FLAG,
     GIT_REPOSITORY_NAME_VALIDATION_ERROR_MESSAGE,
     IGitRepositorySet,
     )
 from lp.code.xmlrpc.git import GitAPI
 from lp.registry.enums import TeamMembershipPolicy
-from lp.services.features.testing import FeatureFixture
 from lp.services.webapp.escaping import html_escape
 from lp.testing import (
     admin_logged_in,
@@ -56,59 +54,11 @@
         raise GitRepositoryCreationFault("nothing here")
 
 
-class TestGitAPIFeatureFlag(TestCaseWithFactory):
-
-    layer = LaunchpadFunctionalLayer
-
-    def setUp(self):
-        super(TestGitAPIFeatureFlag, self).setUp()
-        self.git_api = GitAPI(None, None)
-        self.git_api.hosting_client = FakeGitHostingClient()
-
-    def test_feature_flag_disabled(self):
-        # Without a feature flag, attempts to create a new Git repository fail.
-        requester = self.factory.makePerson()
-        message = "You do not have permission to create Git repositories."
-        fault = self.git_api.translatePath(
-            u"/~%s/+git/random" % requester.name, "write", requester.id, True)
-        self.assertEqual(faults.PermissionDenied(message), fault)
-
-    def test_feature_flag_disabled_existing(self):
-        # Even without a feature flag, it is possible to operate on Git
-        # repositories that already exist.
-        requester = self.factory.makePerson()
-        path = u"/~%s/+git/random" % requester.name
-        with FeatureFixture({GIT_FEATURE_FLAG: u"on"}):
-            translation = self.git_api.translatePath(
-                path, "write", requester.id, True)
-        login(ANONYMOUS)
-        repository = getUtility(IGitRepositorySet).getByPath(
-            requester, path.lstrip("/"))
-        self.assertIsNotNone(repository)
-        self.assertEqual(
-            {"path": repository.getInternalPath(), "writable": True,
-             "trailing": ""},
-            translation)
-        translation = self.git_api.translatePath(
-            path, "write", requester.id, True)
-        login(ANONYMOUS)
-        self.assertEqual(
-            {"path": repository.getInternalPath(), "writable": True,
-             "trailing": ""},
-            translation)
-        # But we cannot create another one without the feature flag.
-        message = "You do not have permission to create Git repositories."
-        fault = self.git_api.translatePath(
-            u"/~%s/+git/another" % requester.name, "write", requester.id, True)
-        self.assertEqual(faults.PermissionDenied(message), fault)
-
-
 class TestGitAPIMixin:
     """Helper methods for `IGitAPI` tests, and security-relevant tests."""
 
     def setUp(self):
         super(TestGitAPIMixin, self).setUp()
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
         self.git_api = GitAPI(None, None)
         self.git_api.hosting_client = FakeGitHostingClient()
         self.repository_set = getUtility(IGitRepositorySet)

=== modified file 'lib/lp/registry/browser/tests/private-team-creation-views.txt'
--- lib/lp/registry/browser/tests/private-team-creation-views.txt	2015-04-15 18:34:25 +0000
+++ lib/lp/registry/browser/tests/private-team-creation-views.txt	2015-05-14 14:02:04 +0000
@@ -230,8 +230,6 @@
 Public teams can be made private if the only artifacts they have are
 those permitted by private teams.
 
-    >>> from lp.code.interfaces.gitrepository import GIT_FEATURE_FLAG
-    >>> from lp.services.features.testing import FeatureFixture
     >>> def createTeamArtifacts(team, team_owner):
     ...     # A bug subscription.
     ...     bug = factory.makeBug()
@@ -250,8 +248,7 @@
     ...         BranchSubscriptionDiffSize.WHOLEDIFF,
     ...         CodeReviewNotificationLevel.STATUS, team_owner)
     ...     # A Git repository subscription.
-    ...     with FeatureFixture({GIT_FEATURE_FLAG: 'on'}):
-    ...         repository = factory.makeGitRepository()
+    ...     repository = factory.makeGitRepository()
     ...     repository.subscribe(
     ...         team,
     ...         BranchSubscriptionNotificationLevel.DIFFSONLY,

=== modified file 'lib/lp/registry/browser/tests/test_peoplemerge.py'
--- lib/lp/registry/browser/tests/test_peoplemerge.py	2015-03-04 18:22:06 +0000
+++ lib/lp/registry/browser/tests/test_peoplemerge.py	2015-05-14 14:02:04 +0000
@@ -8,14 +8,12 @@
 from zope.security.proxy import removeSecurityProxy
 
 from lp.app.enums import InformationType
-from lp.code.interfaces.gitrepository import GIT_FEATURE_FLAG
 from lp.registry.enums import TeamMembershipPolicy
 from lp.registry.interfaces.person import IPersonSet
 from lp.registry.interfaces.persontransferjob import IPersonMergeJobSource
 from lp.services.identity.interfaces.emailaddress import EmailAddressStatus
 from lp.services.identity.model.emailaddress import EmailAddressSet
 from lp.services.mail import stub
-from lp.services.features.testing import FeatureFixture
 from lp.services.verification.tests.logintoken import get_token_url_from_email
 from lp.services.webapp import canonical_url
 from lp.services.webapp.escaping import html_escape
@@ -301,7 +299,6 @@
 
     def test_cannot_merge_person_with_private_git_repositories(self):
         # A team or user with a private Git repository cannot be merged.
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
         self.factory.makeGitRepository(
             owner=self.dupe, information_type=InformationType.USERDATA)
         login_celebrity('registry_experts')

=== modified file 'lib/lp/registry/browser/tests/test_person.py'
--- lib/lp/registry/browser/tests/test_person.py	2015-05-05 16:37:07 +0000
+++ lib/lp/registry/browser/tests/test_person.py	2015-05-14 14:02:04 +0000
@@ -27,7 +27,6 @@
 from lp.app.interfaces.launchpad import ILaunchpadCelebrities
 from lp.blueprints.enums import SpecificationImplementationStatus
 from lp.buildmaster.enums import BuildStatus
-from lp.code.interfaces.gitrepository import GIT_FEATURE_FLAG
 from lp.registry.browser.person import PersonView
 from lp.registry.browser.team import TeamInvitationView
 from lp.registry.enums import PersonVisibility
@@ -42,7 +41,6 @@
 from lp.registry.model.milestone import milestone_sort_key
 from lp.scripts.garbo import PopulateLatestPersonSourcePackageReleaseCache
 from lp.services.config import config
-from lp.services.features.testing import FeatureFixture
 from lp.services.identity.interfaces.account import AccountStatus
 from lp.services.identity.interfaces.emailaddress import IEmailAddressSet
 from lp.services.log.logger import FakeLogger
@@ -149,7 +147,6 @@
         self.assertRedirect('/api/1.0' + in_suf, '/api/1.0' + out_suf)
 
     def test_traverse_git_repository_project(self):
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
         project = self.factory.makeProduct()
         repository = self.factory.makeGitRepository(target=project)
         url = "/~%s/%s/+git/%s" % (
@@ -157,7 +154,6 @@
         self.assertEqual(repository, test_traverse(url)[0])
 
     def test_traverse_git_repository_package(self):
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
         dsp = self.factory.makeDistributionSourcePackage()
         repository = self.factory.makeGitRepository(target=dsp)
         url = "/~%s/%s/+source/%s/+git/%s" % (
@@ -166,7 +162,6 @@
         self.assertEqual(repository, test_traverse(url)[0])
 
     def test_traverse_git_repository_personal(self):
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
         person = self.factory.makePerson()
         repository = self.factory.makeGitRepository(
             owner=person, target=person)

=== modified file 'lib/lp/registry/browser/tests/test_pillar_sharing.py'
--- lib/lp/registry/browser/tests/test_pillar_sharing.py	2015-05-07 11:20:50 +0000
+++ lib/lp/registry/browser/tests/test_pillar_sharing.py	2015-05-14 14:02:04 +0000
@@ -21,7 +21,6 @@
 
 from lp.app.enums import InformationType
 from lp.app.interfaces.services import IService
-from lp.code.interfaces.gitrepository import GIT_FEATURE_FLAG
 from lp.registry.enums import (
     BranchSharingPolicy,
     BugSharingPolicy,
@@ -30,7 +29,6 @@
 from lp.registry.model.pillar import PillarPerson
 from lp.services.config import config
 from lp.services.database.interfaces import IStore
-from lp.services.features.testing import FeatureFixture
 from lp.services.webapp.interfaces import StormRangeFactoryError
 from lp.services.webapp.publisher import canonical_url
 from lp.testing import (
@@ -58,7 +56,6 @@
 
     def setUp(self):
         super(SharingBaseTestCase, self).setUp()
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
         self.driver = self.factory.makePerson()
         self.owner = self.factory.makePerson()
         if self.pillar_type == 'distribution':

=== modified file 'lib/lp/registry/doc/private-team-roles.txt'
--- lib/lp/registry/doc/private-team-roles.txt	2015-04-15 18:34:25 +0000
+++ lib/lp/registry/doc/private-team-roles.txt	2015-05-14 14:02:04 +0000
@@ -92,10 +92,7 @@
 
 Private teams can be assigned as the owner of a Git repository.
 
-    >>> from lp.code.interfaces.gitrepository import GIT_FEATURE_FLAG
-    >>> from lp.services.features.testing import FeatureFixture
-    >>> with FeatureFixture({GIT_FEATURE_FLAG: 'on'}):
-    ...     repository = factory.makeGitRepository()
+    >>> repository = factory.makeGitRepository()
     >>> repository.setOwner(priv_team, user=admin_user)
 
 Git repository subscriptions
@@ -103,8 +100,7 @@
 
 Private teams can subscribe to Git repositories.
 
-    >>> with FeatureFixture({GIT_FEATURE_FLAG: 'on'}):
-    ...     repository = factory.makeGitRepository()
+    >>> repository = factory.makeGitRepository()
     >>> subscription = repository.subscribe(
     ...     priv_team,
     ...     BranchSubscriptionNotificationLevel.DIFFSONLY,

=== modified file 'lib/lp/registry/doc/product.txt'
--- lib/lp/registry/doc/product.txt	2015-05-01 13:16:05 +0000
+++ lib/lp/registry/doc/product.txt	2015-05-14 14:02:04 +0000
@@ -527,19 +527,14 @@
 Products are considered to officially support Launchpad as a location for
 their code if they have a default Git repository.
 
-    >>> from lp.code.interfaces.gitrepository import (
-    ...     GIT_FEATURE_FLAG,
-    ...     IGitRepositorySet,
-    ...     )
-    >>> from lp.services.features.testing import FeatureFixture
+    >>> from lp.code.interfaces.gitrepository import IGitRepositorySet
     >>> firefox.development_focus.branch = None
     >>> print firefox.official_codehosting
     False
     >>> print firefox.codehosting_usage.name
     UNKNOWN
-    >>> with FeatureFixture({GIT_FEATURE_FLAG: 'on'}):
-    ...     getUtility(IGitRepositorySet).setDefaultRepository(
-    ...         firefox, factory.makeGitRepository(target=firefox))
+    >>> getUtility(IGitRepositorySet).setDefaultRepository(
+    ...     firefox, factory.makeGitRepository(target=firefox))
     >>> print firefox.official_codehosting
     True
     >>> print firefox.codehosting_usage.name

=== modified file 'lib/lp/registry/services/tests/test_sharingservice.py'
--- lib/lp/registry/services/tests/test_sharingservice.py	2015-04-15 18:34:25 +0000
+++ lib/lp/registry/services/tests/test_sharingservice.py	2015-05-14 14:02:04 +0000
@@ -23,10 +23,7 @@
     CodeReviewNotificationLevel,
     )
 from lp.code.interfaces.branch import IBranch
-from lp.code.interfaces.gitrepository import (
-    GIT_FEATURE_FLAG,
-    IGitRepository,
-    )
+from lp.code.interfaces.gitrepository import IGitRepository
 from lp.registry.enums import (
     BranchSharingPolicy,
     BugSharingPolicy,
@@ -76,7 +73,6 @@
         self.service = getUtility(IService, 'sharing')
         self.useFixture(FeatureFixture({
             'jobs.celery.enabled_classes': 'RemoveArtifactSubscriptionsJob',
-            GIT_FEATURE_FLAG: 'on',
         }))
 
     def _makeGranteeData(self, grantee, policy_permissions,
@@ -1947,7 +1943,6 @@
 
     def setUp(self):
         super(ApiTestMixin, self).setUp()
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
         self.owner = self.factory.makePerson(name='thundercat')
         self.pillar = self.factory.makeProduct(
             owner=self.owner, specification_sharing_policy=(

=== modified file 'lib/lp/registry/tests/test_accesspolicy.py'
--- lib/lp/registry/tests/test_accesspolicy.py	2015-03-04 18:22:06 +0000
+++ lib/lp/registry/tests/test_accesspolicy.py	2015-05-14 14:02:04 +0000
@@ -8,7 +8,6 @@
 from zope.component import getUtility
 
 from lp.app.enums import InformationType
-from lp.code.interfaces.gitrepository import GIT_FEATURE_FLAG
 from lp.registry.enums import SharingPermission
 from lp.registry.interfaces.accesspolicy import (
     IAccessArtifact,
@@ -26,7 +25,6 @@
 from lp.registry.model.accesspolicy import reconcile_access_for_artifact
 from lp.registry.model.person import Person
 from lp.services.database.interfaces import IStore
-from lp.services.features.testing import FeatureFixture
 from lp.testing import TestCaseWithFactory
 from lp.testing.layers import DatabaseFunctionalLayer
 from lp.testing.matchers import Provides
@@ -285,10 +283,6 @@
 class TestAccessArtifactGitRepository(BaseAccessArtifactTests,
                                       TestCaseWithFactory):
 
-    def setUp(self):
-        super(TestAccessArtifactGitRepository, self).setUp()
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
-
     def getConcreteArtifact(self):
         return self.factory.makeGitRepository()
 

=== modified file 'lib/lp/registry/tests/test_personmerge.py'
--- lib/lp/registry/tests/test_personmerge.py	2015-03-05 14:13:16 +0000
+++ lib/lp/registry/tests/test_personmerge.py	2015-05-14 14:02:04 +0000
@@ -13,10 +13,7 @@
 
 from lp.app.enums import InformationType
 from lp.app.interfaces.launchpad import ILaunchpadCelebrities
-from lp.code.interfaces.gitrepository import (
-    GIT_FEATURE_FLAG,
-    IGitRepositorySet,
-    )
+from lp.code.interfaces.gitrepository import IGitRepositorySet
 from lp.registry.interfaces.accesspolicy import (
     IAccessArtifactGrantSource,
     IAccessPolicyGrantSource,
@@ -277,7 +274,6 @@
     def test_merge_moves_git_repositories(self):
         # When person/teams are merged, Git repositories owned by the from
         # person are moved.
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
         person = self.factory.makePerson()
         repository = self.factory.makeGitRepository()
         duplicate = repository.owner
@@ -291,7 +287,6 @@
     def test_merge_with_duplicated_git_repositories(self):
         # If both the from and to people have Git repositories with the same
         # name, merging renames the duplicate from the from person's side.
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
         project = self.factory.makeProduct()
         from_repository = self.factory.makeGitRepository(
             target=project, name=u'foo')

=== modified file 'lib/lp/registry/tests/test_service_usage.py'
--- lib/lp/registry/tests/test_service_usage.py	2015-05-01 13:20:17 +0000
+++ lib/lp/registry/tests/test_service_usage.py	2015-05-14 14:02:04 +0000
@@ -7,11 +7,7 @@
 
 from lp.app.enums import ServiceUsage
 from lp.code.enums import BranchType
-from lp.code.interfaces.gitrepository import (
-    GIT_FEATURE_FLAG,
-    IGitRepositorySet,
-    )
-from lp.services.features.testing import FeatureFixture
+from lp.code.interfaces.gitrepository import IGitRepositorySet
 from lp.testing import (
     login_person,
     TestCaseWithFactory,
@@ -210,7 +206,6 @@
 
     def test_codehosting_default_git_repository(self):
         # A default Git repository on Launchpad has LAUNCHPAD usage.
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
         login_person(self.target.owner)
         repository = self.factory.makeGitRepository(target=self.target)
         getUtility(IGitRepositorySet).setDefaultRepository(

=== modified file 'lib/lp/registry/tests/test_sharingjob.py'
--- lib/lp/registry/tests/test_sharingjob.py	2015-04-15 18:34:25 +0000
+++ lib/lp/registry/tests/test_sharingjob.py	2015-05-14 14:02:04 +0000
@@ -17,7 +17,6 @@
     BranchSubscriptionNotificationLevel,
     CodeReviewNotificationLevel,
     )
-from lp.code.interfaces.gitrepository import GIT_FEATURE_FLAG
 from lp.registry.enums import SpecificationSharingPolicy
 from lp.registry.interfaces.accesspolicy import (
     IAccessArtifactGrantSource,
@@ -120,7 +119,6 @@
             % (branch.id, requestor.name), repr(job))
 
     def test_repr_gitrepositories(self):
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u"on"}))
         requestor = self.factory.makePerson()
         gitrepository = self.factory.makeGitRepository()
         job = getUtility(IRemoveArtifactSubscriptionsJobSource).create(
@@ -246,7 +244,6 @@
     def setUp(self):
         self.useFixture(FeatureFixture({
             'jobs.celery.enabled_classes': 'RemoveArtifactSubscriptionsJob',
-            GIT_FEATURE_FLAG: 'on',
         }))
         super(RemoveArtifactSubscriptionsJobTestCase, self).setUp()
 

=== modified file 'lib/lp/scripts/tests/test_garbo.py'
--- lib/lp/scripts/tests/test_garbo.py	2015-03-12 15:21:27 +0000
+++ lib/lp/scripts/tests/test_garbo.py	2015-05-14 14:02:04 +0000
@@ -49,7 +49,6 @@
     )
 from lp.code.enums import CodeImportResultStatus
 from lp.code.interfaces.codeimportevent import ICodeImportEventSet
-from lp.code.interfaces.gitrepository import GIT_FEATURE_FLAG
 from lp.code.model.branchjob import (
     BranchJob,
     BranchUpgradeJob,
@@ -937,7 +936,6 @@
 
     def test_GitJobPruner(self):
         # Garbo should remove jobs completed over 30 days ago.
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u'on'}))
         switch_dbuser('testadmin')
         store = IMasterStore(Job)
 
@@ -960,7 +958,6 @@
     def test_GitJobPruner_doesnt_prune_recent_jobs(self):
         # Check to make sure the garbo doesn't remove jobs that aren't more
         # than thirty days old.
-        self.useFixture(FeatureFixture({GIT_FEATURE_FLAG: u'on'}))
         switch_dbuser('testadmin')
         store = IMasterStore(Job)
 

=== modified file 'lib/lp/services/features/flags.py'
--- lib/lp/services/features/flags.py	2015-04-19 12:56:32 +0000
+++ lib/lp/services/features/flags.py	2015-05-14 14:02:04 +0000
@@ -221,12 +221,6 @@
      'disabled',
      'PPA Separate Long Descriptions',
      ''),
-    ('code.git.enabled',
-     'boolean',
-     'If true, support for creating Git repositories is enabled.',
-     'disabled',
-     '',
-     ''),
     ])
 
 # The set of all flag names that are documented.


Follow ups