~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/errors.py

  • Committer: Robert Collins
  • Date: 2010-05-27 21:16:48 UTC
  • mto: This revision was merged to the branch mainline in revision 5266.
  • Revision ID: robertc@robertcollins.net-20100527211648-1mj8m4dh0ricku21
Final fix for 'no help for command' issue. We now show a clean message
when a command has no help, document how to set help more clearly, and
test that all commands available to the test suite have help.
(Robert Collins, #177500)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1923
1923
class CantMoveRoot(BzrError):
1924
1924
 
1925
1925
    _fmt = "Moving the root directory is not supported at this time"
 
1926
    
 
1927
    
 
1928
class TransformRenameFailed(BzrError):
 
1929
 
 
1930
    _fmt = "Failed to rename %(from_path)s to %(to_path)s: %(why)s"
 
1931
    
 
1932
    def __init__(self, from_path, to_path, why, errno):
 
1933
        self.from_path = from_path
 
1934
        self.to_path = to_path
 
1935
        self.why = why
 
1936
        self.errno = errno
1926
1937
 
1927
1938
 
1928
1939
class BzrMoveFailedError(BzrError):
3134
3145
    def __init__(self, bzrdir):
3135
3146
        self.bzrdir = bzrdir
3136
3147
 
 
3148
class NoWhoami(BzrError):
 
3149
 
 
3150
    _fmt = ('Unable to determine your name.\n'
 
3151
        "Please, set your name with the 'whoami' command.\n"
 
3152
        'E.g. bzr whoami "Your Name <name@example.com>"')
 
3153
 
 
3154