/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/patches.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:
15
15
# along with this program; if not, write to the Free Software
16
16
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17
17
 
18
 
from __future__ import absolute_import
19
 
 
20
18
from .errors import (
21
19
    BzrError,
22
20
    )
419
417
 
420
418
    for line in iter_lines:
421
419
        if line.startswith(b'=== '):
422
 
            if len(saved_lines) > 0:
 
420
            if allow_dirty and beginning:
 
421
                # Patches can have "junk" at the beginning
 
422
                # Stripping junk from the end of patches is handled when we
 
423
                # parse the patch
 
424
                pass
 
425
            elif len(saved_lines) > 0:
423
426
                if keep_dirty and len(dirty_head) > 0:
424
427
                    yield {'saved_lines': saved_lines,
425
428
                           'dirty_head': dirty_head}
612
615
        self.prefix = prefix
613
616
 
614
617
    def __enter__(self):
615
 
        from .transform import TransformPreview
616
 
        self._tt = TransformPreview(self.tree)
 
618
        self._tt = self.tree.preview_transform()
617
619
        apply_patches(self._tt, self.patches, prefix=self.prefix)
618
620
        return self._tt.get_preview_tree()
619
621