~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree.py

  • Committer: Vincent Ladeuil
  • Date: 2012-01-05 16:19:30 UTC
  • mto: This revision was merged to the branch mainline in revision 6437.
  • Revision ID: v.ladeuil+lp@free.fr-20120105161930-bh6bwqnt9tvv902f
Tweak news entry to conflict on merge.

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
 
48
48
from bzrlib import (
49
49
    branch,
 
50
    bzrdir,
50
51
    conflicts as _mod_conflicts,
51
52
    controldir,
52
53
    errors,
71
72
 
72
73
# Explicitly import bzrlib.bzrdir so that the BzrProber
73
74
# is guaranteed to be registered.
74
 
from bzrlib import (
75
 
    bzrdir,
76
 
    symbol_versioning,
77
 
    )
 
75
import bzrlib.bzrdir
78
76
 
 
77
from bzrlib import symbol_versioning
79
78
from bzrlib.decorators import needs_read_lock, needs_write_lock
80
79
from bzrlib.i18n import gettext
81
80
from bzrlib.lock import LogicalLockResult
268
267
        """
269
268
        if path is None:
270
269
            path = osutils.getcwd()
271
 
        control = controldir.ControlDir.open(path, _unsupported=_unsupported)
272
 
        return control.open_workingtree(unsupported=_unsupported)
 
270
        control = controldir.ControlDir.open(path, _unsupported)
 
271
        return control.open_workingtree(_unsupported)
273
272
 
274
273
    @staticmethod
275
274
    def open_containing(path=None):
2977
2976
                if dir[2] == _directory:
2978
2977
                    pending.append(dir)
2979
2978
 
2980
 
    @needs_write_lock
2981
 
    def update_feature_flags(self, updated_flags):
2982
 
        """Update the feature flags for this branch.
2983
 
 
2984
 
        :param updated_flags: Dictionary mapping feature names to necessities
2985
 
            A necessity can be None to indicate the feature should be removed
2986
 
        """
2987
 
        self._format._update_feature_flags(updated_flags)
2988
 
        self.control_transport.put_bytes('format', self._format.as_string())
2989
 
 
2990
2979
 
2991
2980
class WorkingTreeFormatRegistry(controldir.ControlComponentFormatRegistry):
2992
2981
    """Registry for working tree formats."""
3144
3133
        return self._matchingbzrdir
3145
3134
 
3146
3135
 
3147
 
class WorkingTreeFormatMetaDir(bzrdir.BzrFormat, WorkingTreeFormat):
 
3136
class WorkingTreeFormatMetaDir(bzrdir.BzrDirMetaComponentFormat, WorkingTreeFormat):
3148
3137
    """Base class for working trees that live in bzr meta directories."""
3149
3138
 
3150
3139
    def __init__(self):
3151
3140
        WorkingTreeFormat.__init__(self)
3152
 
        bzrdir.BzrFormat.__init__(self)
 
3141
        bzrdir.BzrDirMetaComponentFormat.__init__(self)
3153
3142
 
3154
3143
    @classmethod
3155
3144
    def find_format_string(klass, controldir):
3167
3156
        return klass._find_format(format_registry, 'working tree',
3168
3157
                format_string)
3169
3158
 
3170
 
    def check_support_status(self, allow_unsupported, recommend_upgrade=True,
3171
 
            basedir=None):
3172
 
        WorkingTreeFormat.check_support_status(self,
3173
 
            allow_unsupported=allow_unsupported, recommend_upgrade=recommend_upgrade,
3174
 
            basedir=basedir)
3175
 
        bzrdir.BzrFormat.check_support_status(self, allow_unsupported=allow_unsupported,
3176
 
            recommend_upgrade=recommend_upgrade, basedir=basedir)
3177
 
 
3178
3159
 
3179
3160
format_registry.register_lazy("Bazaar Working Tree Format 4 (bzr 0.15)\n",
3180
3161
    "bzrlib.workingtree_4", "WorkingTreeFormat4")