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

  • Committer: Jelmer Vernooij
  • Date: 2017-05-21 12:41:27 UTC
  • mto: This revision was merged to the branch mainline in revision 6623.
  • Revision ID: jelmer@jelmer.uk-20170521124127-iv8etg0vwymyai6y
s/bzr/brz/ in apport config.

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