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

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2019-06-15 17:53:40 UTC
  • mfrom: (7322.1.8 objects-1)
  • Revision ID: breezy.the.bot@gmail.com-20190615175340-yxo036zu96wh8lcz
Use the new attributes on TreeChange rather than indexing.

Merged from https://code.launchpad.net/~jelmer/brz/objects-1/+merge/368859

Show diffs side-by-side

added added

removed removed

Lines of Context:
350
350
 
351
351
            # Bail out if we are going to delete files we shouldn't
352
352
            if not keep_files and not force:
353
 
                for (file_id, path, content_change, versioned, parent_id, name,
354
 
                     kind, executable) in self.iter_changes(
355
 
                         self.basis_tree(), include_unchanged=True,
356
 
                         require_versioned=False, want_unversioned=True,
357
 
                         specific_files=files):
358
 
                    if versioned[0] is False:
 
353
                for change in self.iter_changes(
 
354
                        self.basis_tree(), include_unchanged=True,
 
355
                        require_versioned=False, want_unversioned=True,
 
356
                        specific_files=files):
 
357
                    if change.versioned[0] is False:
359
358
                        # The record is unknown or newly added
360
 
                        files_to_backup.append(path[1])
 
359
                        files_to_backup.append(change.path[1])
361
360
                        files_to_backup.extend(
362
 
                            osutils.parent_directories(path[1]))
363
 
                    elif (content_change and (kind[1] is not None)
364
 
                            and osutils.is_inside_any(files, path[1])):
 
361
                            osutils.parent_directories(change.path[1]))
 
362
                    elif (change.changed_content and (change.kind[1] is not None)
 
363
                            and osutils.is_inside_any(files, change.path[1])):
365
364
                        # Versioned and changed, but not deleted, and still
366
365
                        # in one of the dirs to be deleted.
367
 
                        files_to_backup.append(path[1])
 
366
                        files_to_backup.append(change.path[1])
368
367
                        files_to_backup.extend(
369
 
                            osutils.parent_directories(path[1]))
 
368
                            osutils.parent_directories(change.path[1]))
370
369
 
371
370
            for f in files:
372
371
                if f == '':