/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 breezy/mutabletree.py

  • Committer: Gustav Hartvigsson
  • Date: 2021-01-09 21:36:27 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20210109213627-h1xwcutzy9m7a99b
Added 'Case Preserving Working Tree Use Cases' from Canonical Wiki

* Addod a page from the Canonical Bazaar wiki
  with information on the scmeatics of case
  perserving filesystems an a case insensitive
  filesystem works.
  
  * Needs re-work, but this will do as it is the
    same inforamoton as what was on the linked
    page in the currint documentation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
185
185
 
186
186
        :return: True if a change is found. False otherwise
187
187
        """
188
 
        with self.lock_read():
189
 
            # Check pending merges
190
 
            if len(self.get_parent_ids()) > 1:
191
 
                return True
192
 
            if _from_tree is None:
193
 
                _from_tree = self.basis_tree()
194
 
            changes = self.iter_changes(_from_tree)
195
 
            if self.supports_symlinks():
196
 
                # Fast path for has_changes.
197
 
                try:
198
 
                    change = next(changes)
199
 
                    # Exclude root (talk about black magic... --vila 20090629)
200
 
                    if change.parent_id == (None, None):
201
 
                        change = next(changes)
202
 
                    return True
203
 
                except StopIteration:
204
 
                    # No changes
205
 
                    return False
206
 
            else:
207
 
                # Slow path for has_changes.
208
 
                # Handle platforms that do not support symlinks in the
209
 
                # conditional below. This is slower than the try/except
210
 
                # approach below that but we don't have a choice as we
211
 
                # need to be sure that all symlinks are removed from the
212
 
                # entire changeset. This is because in platforms that
213
 
                # do not support symlinks, they show up as None in the
214
 
                # working copy as compared to the repository.
215
 
                # Also, exclude root as mention in the above fast path.
216
 
                changes = filter(
217
 
                    lambda c: c[6][0] != 'symlink' and c[4] != (None, None),
218
 
                    changes)
219
 
                try:
220
 
                    next(iter(changes))
221
 
                except StopIteration:
222
 
                    return False
223
 
                return True
 
188
        raise NotImplementedError(self.has_changes)
224
189
 
225
190
    def check_changed_or_out_of_date(self, strict, opt_name,
226
191
                                     more_error, more_warning):
243
208
                strict = self.branch.get_config_stack().get(opt_name)
244
209
            if strict is not False:
245
210
                err_class = None
246
 
                if (self.has_changes()):
 
211
                if self.has_changes():
247
212
                    err_class = errors.UncommittedChanges
248
213
                elif self.last_revision() != self.branch.last_revision():
249
214
                    # The tree has lost sync with its branch, there is little
401
366
        """
402
367
        raise NotImplementedError(self.copy_one)
403
368
 
404
 
    def get_transform(self, pb=None):
 
369
    def transform(self, pb=None):
405
370
        """Return a transform object for use with this tree."""
406
 
        raise NotImplementedError(self.get_transform)
 
371
        raise NotImplementedError(self.transform)
407
372
 
408
373
 
409
374
class MutableTreeHooks(hooks.Hooks):