~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

  • Committer: Jelmer Vernooij
  • Date: 2011-12-22 19:54:56 UTC
  • mto: This revision was merged to the branch mainline in revision 6408.
  • Revision ID: jelmer@samba.org-20111222195456-eqsv7yqkv3m9epl8
Use update_feature_flags everywhere.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2725
2725
    def update_feature_flags(self, updated_flags):
2726
2726
        """Update the feature flags for this branch.
2727
2727
 
2728
 
        :param updated_flags:
 
2728
        :param updated_flags: Dictionary mapping feature names to necessities
 
2729
            A necessity can be None to indicate the feature should be removed
2729
2730
        """
2730
 
        for name, necessity in updated_flags.iteritems():
2731
 
            if necessity is None:
2732
 
                try:
2733
 
                    del self._format.features[name]
2734
 
                except KeyError:
2735
 
                    pass
2736
 
            else:
2737
 
                self._format.features[name] = necessity
 
2731
        self._format._update_feature_flags(updated_flags)
2738
2732
        self.control_transport.put_bytes('format', self._format.as_string())
2739
2733
 
2740
2734