~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

  • Committer: Aaron Bentley
  • Date: 2007-12-20 20:44:45 UTC
  • mto: This revision was merged to the branch mainline in revision 3235.
  • Revision ID: abentley@panoramicfeedback.com-20071220204445-9o2f10gvvd8e4rks
Implement hard-link support for branch and checkout

Show diffs side-by-side

added added

removed removed

Lines of Context:
757
757
        return format
758
758
 
759
759
    def create_checkout(self, to_location, revision_id=None,
760
 
                        lightweight=False, accelerator_tree=None):
 
760
                        lightweight=False, accelerator_tree=None,
 
761
                        hardlink=False):
761
762
        """Create a checkout of a branch.
762
763
        
763
764
        :param to_location: The url to produce the checkout at
768
769
            contents more quickly than the revision tree, i.e. a workingtree.
769
770
            The revision tree will be used for cases where accelerator_tree's
770
771
            content is different.
 
772
        :param hardlink: If true, hard-link files from accelerator_tree,
 
773
            where possible.
771
774
        :return: The tree of the created checkout
772
775
        """
773
776
        t = transport.get_transport(to_location)
788
791
            from_branch=None
789
792
        tree = checkout.create_workingtree(revision_id,
790
793
                                           from_branch=from_branch,
791
 
                                           accelerator_tree=accelerator_tree)
 
794
                                           accelerator_tree=accelerator_tree,
 
795
                                           hardlink=hardlink)
792
796
        basis_tree = tree.basis_tree()
793
797
        basis_tree.lock_read()
794
798
        try: