~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tree.py

  • Committer: John Arbash Meinel
  • Date: 2011-04-07 10:36:24 UTC
  • mfrom: (5764 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5766.
  • Revision ID: john@arbash-meinel.com-20110407103624-n76g6tjeqmznwdcd
Merge bzr.dev 5764 to resolve release-notes (aka NEWS) conflicts

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005-2010 Canonical Ltd
 
1
# Copyright (C) 2005-2011 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
25
25
    conflicts as _mod_conflicts,
26
26
    debug,
27
27
    delta,
 
28
    errors,
28
29
    filters,
29
30
    osutils,
30
31
    revision as _mod_revision,
31
32
    rules,
32
33
    )
33
34
from bzrlib.decorators import needs_read_lock
34
 
from bzrlib.errors import BzrError, NoSuchId
35
 
from bzrlib import errors
36
35
from bzrlib.inventory import InventoryFile
37
36
from bzrlib.inter import InterObject
38
37
from bzrlib.osutils import fingerprint_file
39
 
from bzrlib.symbol_versioning import deprecated_function, deprecated_in
40
38
from bzrlib.trace import note
41
39
 
42
40
 
415
413
                        elif child_base.lower() == lelt:
416
414
                            cur_id = child
417
415
                            new_path = osutils.pathjoin(cur_path, child_base)
418
 
                    except NoSuchId:
 
416
                    except errors.NoSuchId:
419
417
                        # before a change is committed we can see this error...
420
418
                        continue
421
419
                if new_path:
529
527
 
530
528
        if ie.text_size is not None:
531
529
            if ie.text_size != fp['size']:
532
 
                raise BzrError("mismatched size for file %r in %r" % (ie.file_id, self._store),
 
530
                raise errors.BzrError(
 
531
                        "mismatched size for file %r in %r" %
 
532
                        (ie.file_id, self._store),
533
533
                        ["inventory expects %d bytes" % ie.text_size,
534
534
                         "file is actually %d bytes" % fp['size'],
535
535
                         "store is probably damaged/corrupt"])
536
536
 
537
537
        if ie.text_sha1 != fp['sha1']:
538
 
            raise BzrError("wrong SHA-1 for file %r in %r" % (ie.file_id, self._store),
 
538
            raise errors.BzrError("wrong SHA-1 for file %r in %r" %
 
539
                    (ie.file_id, self._store),
539
540
                    ["inventory expects %s" % ie.text_sha1,
540
541
                     "file is actually %s" % fp['sha1'],
541
542
                     "store is probably damaged/corrupt"])