/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/inventory.py

Rework test_script a little bit.


Don't allow someone to request a stdin request to echo.
Echo never reads from stdin, it just echos its arguments.
You use 'cat' if you want to read from stdin.

A few other fixes because the tests were using filenames
that are actually illegal on Windows, rather than just
nonexistant.


Change the exception handling for commands so that
unknown errors don't get silently squashed and then
turn into hard-to-debug errors later.

test_script now passes on Windows.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005-2010 Canonical Ltd
 
1
# Copyright (C) 2005, 2006, 2007 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
1677
1677
        # to filter out empty names because of non rich-root...
1678
1678
        sections = bytes.split('\n')
1679
1679
        kind, file_id = sections[0].split(': ')
1680
 
        return (sections[2], intern(file_id), intern(sections[3]))
 
1680
        return (sections[2], file_id, sections[3])
1681
1681
 
1682
1682
    def _bytes_to_entry(self, bytes):
1683
1683
        """Deserialise a serialised entry."""
1705
1705
            result.reference_revision = sections[4]
1706
1706
        else:
1707
1707
            raise ValueError("Not a serialised entry %r" % bytes)
1708
 
        result.file_id = intern(result.file_id)
1709
 
        result.revision = intern(sections[3])
 
1708
        result.revision = sections[3]
1710
1709
        if result.parent_id == '':
1711
1710
            result.parent_id = None
1712
1711
        self._fileid_to_entry_cache[result.file_id] = result