/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/bzr/textinv.py

  • Committer: Jelmer Vernooij
  • Date: 2020-05-24 00:42:36 UTC
  • mto: This revision was merged to the branch mainline in revision 7505.
  • Revision ID: jelmer@jelmer.uk-20200524004236-jdj6obo4k5lznqw2
Cleanup Windows functions.

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
 
 
18
 
from bzrlib.errors import BzrError
19
 
from bzrlib.inventory import Inventory
 
17
from .errors import BzrError
 
18
from .inventory import Inventory
20
19
 
21
20
 
22
21
START_MARK = "# bzr inventory format 3\n"
34
33
            .replace('\n', r'\x0a'))
35
34
 
36
35
 
37
 
 
38
36
def unescape(s):
39
37
    if s.find(' ') != -1:
40
38
        raise AssertionError()
48
46
    return s
49
47
 
50
48
 
51
 
 
52
 
 
53
49
def write_text_inventory(inv, outf):
54
50
    """Write out inv in a simple trad-unix text format."""
55
51
    outf.write(START_MARK)
85
81
              'name': unescape(fields[1]),
86
82
              'kind': fields[2],
87
83
              'parent_id': fields[3]}
88
 
        ##inv.add(ie)
 
84
        # inv.add(ie)
89
85
 
90
86
    if l != END_MARK:
91
87
        raise BzrError("missing end mark")