/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/workingtree.py

  • Committer: Alexander Belchenko
  • Date: 2007-11-15 20:39:56 UTC
  • mfrom: (2998 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2999.
  • Revision ID: bialix@ukr.net-20071115203956-rk1pyelb2h93c5dy
merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
2718
2718
        control_files.put_bytes('pending-merges', '')
2719
2719
        
2720
2720
 
2721
 
    def initialize(self, a_bzrdir, revision_id=None):
 
2721
    def initialize(self, a_bzrdir, revision_id=None, from_branch=None):
2722
2722
        """See WorkingTreeFormat.initialize()."""
2723
2723
        if not isinstance(a_bzrdir.transport, LocalTransport):
2724
2724
            raise errors.NotLocalUrl(a_bzrdir.transport.base)
2725
 
        branch = a_bzrdir.open_branch()
 
2725
        if from_branch is not None:
 
2726
            branch = from_branch
 
2727
        else:
 
2728
            branch = a_bzrdir.open_branch()
2726
2729
        if revision_id is None:
2727
2730
            revision_id = _mod_revision.ensure_null(branch.last_revision())
2728
2731
        branch.lock_write()
2807
2810
        return LockableFiles(transport, self._lock_file_name, 
2808
2811
                             self._lock_class)
2809
2812
 
2810
 
    def initialize(self, a_bzrdir, revision_id=None):
 
2813
    def initialize(self, a_bzrdir, revision_id=None, from_branch=None):
2811
2814
        """See WorkingTreeFormat.initialize().
2812
2815
        
2813
2816
        revision_id allows creating a working tree at a different
2820
2823
        control_files.create_lock()
2821
2824
        control_files.lock_write()
2822
2825
        control_files.put_utf8('format', self.get_format_string())
2823
 
        branch = a_bzrdir.open_branch()
 
2826
        if from_branch is not None:
 
2827
            branch = from_branch
 
2828
        else:
 
2829
            branch = a_bzrdir.open_branch()
2824
2830
        if revision_id is None:
2825
2831
            revision_id = _mod_revision.ensure_null(branch.last_revision())
2826
2832
        # WorkingTree3 can handle an inventory which has a unique root id.