예제 #1
0
    def test_init_default_format_option(self):
        """brz init should read default format from option default_format"""
        g_store = _mod_config.GlobalStore()
        g_store._load_from_string(b'''
[DEFAULT]
default_format = 1.9
''')
        g_store.save()
        out, err = self.run_bzr_subprocess('init')
        self.assertContainsRe(out, b'1.9')
예제 #2
0
 def __init__(self, branch):
     lstore = _mod_bzr_config.LocationStore()
     loc_matcher = _mod_bzr_config.LocationMatcher(lstore, branch.base)
     # FIXME: This should also be looking in .hg/config for
     # local hg branches.
     gstore = _mod_bzr_config.GlobalStore()
     super(HgBranchConfigStack, self).__init__(
         [self._get_overrides,
          loc_matcher.get_sections,
          gstore.get_sections],
         # All modifications go to the corresponding section in
         # locations.conf
         lstore, branch.base)
     self.branch = branch
예제 #3
0
 def __init__(self, branch_base, repository_uuid):
     lstore = _mod_bzr_config.LocationStore()
     loc_matcher = _mod_bzr_config.LocationMatcher(lstore, branch_base)
     svn_store = SubversionStore()
     uuid_matcher = UUIDMatcher(svn_store, repository_uuid)
     gstore = _mod_bzr_config.GlobalStore()
     super(SvnBranchStack, self).__init__(
         [
             self._get_overrides, loc_matcher.get_sections,
             uuid_matcher.get_sections, gstore.get_sections
         ],
         # All modifications go to the corresponding section in
         # locations.conf
         lstore,
         branch_base)
예제 #4
0
 def __init__(self, repository):
     lstore = _mod_bzr_config.LocationStore()
     loc_matcher = _mod_bzr_config.LocationMatcher(lstore, repository.base)
     svn_store = SubversionStore()
     uuid_matcher = UUIDMatcher(svn_store, getattr(repository, 'uuid',
                                                   None))
     gstore = _mod_bzr_config.GlobalStore()
     super(SvnRepositoryStack, self).__init__(
         [
             self._get_overrides, loc_matcher.get_sections,
             uuid_matcher.get_sections, gstore.get_sections
         ],
         # All modifications go to the corresponding section in
         # locations.conf
         lstore,
         repository.base)
     self.repository = repository