~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/errors.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-10-01 07:56:03 UTC
  • mfrom: (3224.5.40 faster-startup)
  • Revision ID: pqm@pqm.ubuntu.com-20081001075603-s9nynw8y85fmrprj
Reduce startup time by a small amount. (Andrew Bennetts)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1862
1862
    _fmt = "Could not move %(from_path)s%(operator)s %(to_path)s%(extra)s"
1863
1863
 
1864
1864
    def __init__(self, from_path='', to_path='', extra=None):
 
1865
        from bzrlib.osutils import splitpath
1865
1866
        BzrError.__init__(self)
1866
1867
        if extra:
1867
1868
            self.extra = ': ' + str(extra)
1871
1872
        has_from = len(from_path) > 0
1872
1873
        has_to = len(to_path) > 0
1873
1874
        if has_from:
1874
 
            self.from_path = osutils.splitpath(from_path)[-1]
 
1875
            self.from_path = splitpath(from_path)[-1]
1875
1876
        else:
1876
1877
            self.from_path = ''
1877
1878
 
1878
1879
        if has_to:
1879
 
            self.to_path = osutils.splitpath(to_path)[-1]
 
1880
            self.to_path = splitpath(to_path)[-1]
1880
1881
        else:
1881
1882
            self.to_path = ''
1882
1883
 
2807
2808
            'user encoding %(user_encoding)s')
2808
2809
 
2809
2810
    def __init__(self, path, kind):
 
2811
        from bzrlib.osutils import get_user_encoding
2810
2812
        self.path = path
2811
2813
        self.kind = kind
2812
2814
        self.user_encoding = osutils.get_user_encoding()