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

  • Committer: Richard Wilbur
  • Date: 2016-02-04 19:07:28 UTC
  • mto: This revision was merged to the branch mainline in revision 6618.
  • Revision ID: richard.wilbur@gmail.com-20160204190728-p0zvfii6zase0fw7
Update COPYING.txt from the original http://www.gnu.org/licenses/gpl-2.0.txt  (Only differences were in whitespace.)  Thanks to Petr Stodulka for pointing out the discrepancy.

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 bzrlib.errors import BzrError
 
20
from bzrlib.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")