~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree.py

  • Committer: Jelmer Vernooij
  • Date: 2011-11-28 15:18:59 UTC
  • mto: This revision was merged to the branch mainline in revision 6317.
  • Revision ID: jelmer@samba.org-20111128151859-dw4nua1xiobilw4r
Fix tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
88
88
    )
89
89
from bzrlib.trace import mutter, note
90
90
from bzrlib.revision import CURRENT_REVISION
 
91
from bzrlib.symbol_versioning import (
 
92
    deprecated_passed,
 
93
    DEPRECATED_PARAMETER,
 
94
    )
91
95
 
92
96
 
93
97
MERGE_MODIFIED_HEADER_1 = "BZR merge-modified list format 1"
167
171
        return views.DisabledViews(self)
168
172
 
169
173
    def __init__(self, basedir='.',
 
174
                 branch=DEPRECATED_PARAMETER,
170
175
                 _internal=False,
171
176
                 _transport=None,
172
177
                 _format=None,
182
187
                "WorkingTree.open() to obtain a WorkingTree.")
183
188
        basedir = safe_unicode(basedir)
184
189
        mutter("opening working tree %r", basedir)
185
 
        self._branch = self.bzrdir.open_branch()
 
190
        if deprecated_passed(branch):
 
191
            self._branch = branch
 
192
        else:
 
193
            self._branch = self.bzrdir.open_branch()
186
194
        self.basedir = realpath(basedir)
187
195
        self._transport = _transport
188
196
        self._rules_searcher = None
1727
1735
    """
1728
1736
 
1729
1737
    def __init__(self, basedir='.',
 
1738
                 branch=DEPRECATED_PARAMETER,
1730
1739
                 _inventory=None,
1731
1740
                 _control_files=None,
1732
1741
                 _internal=False,
1737
1746
        :param branch: A branch to override probing for the branch.
1738
1747
        """
1739
1748
        super(InventoryWorkingTree, self).__init__(basedir=basedir,
1740
 
            _transport=_control_files._transport,
 
1749
            branch=branch, _transport=_control_files._transport,
1741
1750
            _internal=_internal, _format=_format, _bzrdir=_bzrdir)
1742
1751
 
1743
1752
        self._control_files = _control_files