/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/export_pot.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:
26
26
is also left to that stage of the process.
27
27
"""
28
28
 
29
 
from __future__ import absolute_import
30
 
 
31
29
import inspect
32
30
import os
 
31
import sys
33
32
 
34
33
import breezy
35
34
from . import (
39
38
    option,
40
39
    plugin as _mod_plugin,
41
40
    )
42
 
from .sixish import PY3
43
41
from .trace import (
44
42
    mutter,
45
43
    note,
87
85
            # string terminates on. It's more useful to have the line the
88
86
            # string begins on. Unfortunately, counting back newlines is
89
87
            # only an approximation as the AST is ignorant of escaping.
90
 
            str_to_lineno[node.s] = node.lineno - node.s.count('\n')
 
88
            str_to_lineno[node.s] = node.lineno - (0 if sys.version_info >= (3, 8) else node.s.count('\n'))
91
89
    return cls_to_lineno, str_to_lineno
92
90
 
93
91
 
158
156
            "msgstr \"\"\n"
159
157
            "\n".format(
160
158
                path=path, lineno=lineno, comment=comment, msg=_normalize(s)))
161
 
        if not PY3:
162
 
            line = line.decode('utf-8')
163
159
        self.outf.write(line)
164
160
 
165
161
    def poentry_in_context(self, context, string, comment=None):