/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/plugins/commitfromnews/committemplate.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:
16
16
 
17
17
"""Logic to create commit templates."""
18
18
 
19
 
from __future__ import absolute_import
 
19
import patiencediff
20
20
 
21
 
from ... import bugtracker, osutils, patiencediff
 
21
from ... import bugtracker, osutils
22
22
import re
23
23
 
24
24
_BUG_MATCH = re.compile(r'lp:(\d+)')
56
56
            return self.message
57
57
        if found_old_path is None:
58
58
            # New file
59
 
            _, new_chunks = list(
 
59
            _, new_chunks = next(
60
60
                self.commit.builder.repository.iter_files_bytes(
61
 
                    [(found_entry.file_id, found_entry.revision, None)]))[0]
 
61
                    [(found_entry.file_id, found_entry.revision, None)]))
62
62
            content = b''.join(new_chunks).decode('utf-8')
63
63
            return self.merge_message(content)
64
64
        else:
74
74
            contents = self.commit.builder.repository.iter_files_bytes(needed)
75
75
            lines = {}
76
76
            for name, chunks in contents:
77
 
                lines[name] = osutils.chunks_to_lines(chunks)
 
77
                lines[name] = osutils.chunks_to_lines(list(chunks))
78
78
            new = lines['new']
79
79
            sequence_matcher = patiencediff.PatienceSequenceMatcher(
80
80
                None, lines['old'], new)