/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/shelf.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:
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
 
from __future__ import absolute_import
18
 
 
19
17
import errno
20
18
import re
21
19
 
68
66
        :param file_list: The files to make more similar to the target.
69
67
        """
70
68
        self.work_tree = work_tree
71
 
        self.work_transform = work_tree.get_transform()
 
69
        self.work_transform = work_tree.transform()
72
70
        try:
73
71
            self.target_tree = target_tree
74
 
            self.shelf_transform = transform.TransformPreview(self.target_tree)
 
72
            self.shelf_transform = self.target_tree.preview_transform()
75
73
            try:
76
74
                self.renames = {}
77
75
                self.creation = {}
268
266
                        to_transform, s_trans_id, tree,
269
267
                        tree.id2path(file_id))
270
268
        if version:
271
 
            to_transform.version_file(file_id, s_trans_id)
 
269
            to_transform.version_file(s_trans_id, file_id=file_id)
272
270
 
273
271
    def _inverse_lines(self, new_lines, file_id):
274
272
        """Produce a version with only those changes removed from new_lines."""
365
363
            base_tree = tree.revision_tree(base_revision_id)
366
364
        except errors.NoSuchRevisionInTree:
367
365
            base_tree = tree.branch.repository.revision_tree(base_revision_id)
368
 
        tt = transform.TransformPreview(base_tree)
 
366
        tt = base_tree.preview_transform()
369
367
        tt.deserialize(records)
370
368
        return klass(tree, base_tree, tt, metadata.get(b'message'))
371
369