~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/config.py

  • Committer: Parth Malwankar
  • Date: 2010-04-27 16:50:18 UTC
  • mto: This revision was merged to the branch mainline in revision 5213.
  • Revision ID: parth.malwankar@gmail.com-20100427165018-t8uuuj41hkipdh9t
init and init-repo now fail before creating dir if username is not set.

Show diffs side-by-side

added added

removed removed

Lines of Context:
277
277
        if v:
278
278
            return v.decode(osutils.get_user_encoding())
279
279
 
280
 
        raise errors.BzrCommandError('Unable to determine your name.  '
281
 
            'Please, set your name with command like:\n'
282
 
            'bzr whoami "Your Name <name@example.com>"')
 
280
        raise errors.BzrCommandError('Unable to determine your name.\n'
 
281
            "Please, set your name with the 'whoami' command.\n"
 
282
            'E.g. bzr whoami "Your Name <name@example.com>"')
 
283
 
 
284
    def ensure_username(self):
 
285
        """Raise BzrCommandError if username is not set.
 
286
 
 
287
        This method relies on the username() function raising the error.
 
288
        """
 
289
        self.username()
283
290
 
284
291
    def signature_checking(self):
285
292
        """What is the current policy for signature checking?."""