~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/config.py

  • Committer: John Arbash Meinel
  • Date: 2009-12-10 17:16:19 UTC
  • mfrom: (4884 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4889.
  • Revision ID: john@arbash-meinel.com-20091210171619-ehdcxjbl8afhq9g1
Bring in bzr.dev 4884

Show diffs side-by-side

added added

removed removed

Lines of Context:
153
153
        """Get the users pop up editor."""
154
154
        raise NotImplementedError
155
155
 
 
156
    def get_change_editor(self, old_tree, new_tree):
 
157
        from bzrlib import diff
 
158
        cmd = self._get_change_editor()
 
159
        if cmd is None:
 
160
            return None
 
161
        return diff.DiffFromTool.from_string(cmd, old_tree, new_tree,
 
162
                                             sys.stdout)
 
163
 
 
164
 
156
165
    def get_mail_client(self):
157
166
        """Get a mail client to use"""
158
167
        selected_client = self.get_user_option('mail_client')
346
355
        """Return the policy for the given (section, option_name) pair."""
347
356
        return POLICY_NONE
348
357
 
 
358
    def _get_change_editor(self):
 
359
        return self.get_user_option('change_editor')
 
360
 
349
361
    def _get_signature_checking(self):
350
362
        """See Config._get_signature_checking."""
351
363
        policy = self._get_user_option('check_signatures')
679
691
 
680
692
        return self._get_best_value('_get_user_id')
681
693
 
 
694
    def _get_change_editor(self):
 
695
        return self._get_best_value('_get_change_editor')
 
696
 
682
697
    def _get_signature_checking(self):
683
698
        """See Config._get_signature_checking."""
684
699
        return self._get_best_value('_get_signature_checking')
1457
1472
 
1458
1473
    def _get_config_file(self):
1459
1474
        try:
1460
 
            return self._transport.get(self._filename)
 
1475
            return StringIO(self._transport.get_bytes(self._filename))
1461
1476
        except errors.NoSuchFile:
1462
1477
            return StringIO()
1463
1478