/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

  • Committer: Martin Pool
  • Date: 2005-08-17 23:31:01 UTC
  • Revision ID: mbp@sourcefrog.net-20050817233101-0939da1cf91f2472
- comment out unused test cases so that the install 
  script doesn't complain

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
# repeatedly to calculate deltas.  We could perhaps have a weakref
40
40
# cache in memory to make this faster.
41
41
 
 
42
# TODO: please move the revision-string syntax stuff out of the branch
 
43
# object; it's clutter
 
44
 
42
45
 
43
46
def find_branch(f, **args):
44
47
    if f and (f.startswith('http://') or f.startswith('https://')):
316
319
            self.controlfile(f, 'w').write('')
317
320
        mutter('created control directory in ' + self.base)
318
321
 
319
 
        pack_xml(Inventory(gen_root_id()), self.controlfile('inventory','w'))
 
322
        # if we want per-tree root ids then this is the place to set
 
323
        # them; they're not needed for now and so ommitted for
 
324
        # simplicity.
 
325
        pack_xml(Inventory(), self.controlfile('inventory','w'))
320
326
 
321
327
 
322
328
    def _check_format(self):
594
600
            try:
595
601
                return self.revision_store[revision_id]
596
602
            except IndexError:
597
 
                raise bzrlib.errors.NoSuchRevision(revision_id)
 
603
                raise bzrlib.errors.NoSuchRevision(self, revision_id)
598
604
        finally:
599
605
            self.unlock()
600
606
 
657
663
        from bzrlib.inventory import Inventory
658
664
        from bzrlib.xml import unpack_xml
659
665
 
660
 
        return unpack_xml(Inventory, self.inventory_store[inventory_id])
 
666
        return unpack_xml(Inventory, self.get_inventory_xml(inventory_id))
 
667
 
 
668
 
 
669
    def get_inventory_xml(self, inventory_id):
 
670
        """Get inventory XML as a file object."""
 
671
        return self.inventory_store[inventory_id]
661
672
            
662
673
 
663
674
    def get_inventory_sha1(self, inventory_id):
664
675
        """Return the sha1 hash of the inventory entry
665
676
        """
666
 
        return sha_file(self.inventory_store[inventory_id])
 
677
        return sha_file(self.get_inventory_xml(inventory_id))
667
678
 
668
679
 
669
680
    def get_revision_inventory(self, revision_id):