~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/config.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-06-30 20:03:09 UTC
  • mfrom: (1824.1.1 branch)
  • Revision ID: pqm@pqm.ubuntu.com-20060630200309-cf230b3c813bbc35
Add BranchConfig.has_explicit_nickname call.

Show diffs side-by-side

added added

removed removed

Lines of Context:
512
512
        return self._get_safe_value('_post_commit')
513
513
 
514
514
    def _get_nickname(self):
515
 
        value = self._get_best_value('_get_nickname')
 
515
        value = self._get_explicit_nickname()
516
516
        if value is not None:
517
517
            return value
518
518
        return self.branch.base.split('/')[-2]
519
519
 
 
520
    def has_explicit_nickname(self):
 
521
        """Return true if a nickname has been explicitly assigned."""
 
522
        return self._get_explicit_nickname() is not None
 
523
 
 
524
    def _get_explicit_nickname(self):
 
525
        return self._get_best_value('_get_nickname')
 
526
 
520
527
    def _log_format(self):
521
528
        """See Config.log_format."""
522
529
        return self._get_best_value('_log_format')