/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/_simple_set_pyx.pyx

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) 2009, 2010 Canonical Ltd
 
1
# Copyright (C) 2009 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
540
540
    return _check_self(self)._used
541
541
 
542
542
 
543
 
cdef api int SimpleSet_Next(object self, Py_ssize_t *pos,
544
 
                            PyObject **key) except -1:
 
543
cdef api int SimpleSet_Next(object self, Py_ssize_t *pos, PyObject **key):
545
544
    """Walk over items in a SimpleSet.
546
545
 
547
546
    :param pos: should be initialized to 0 by the caller, and will be updated
568
567
    return 1
569
568
 
570
569
 
571
 
cdef int SimpleSet_traverse(SimpleSet self, visitproc visit,
572
 
                            void *arg) except -1:
 
570
cdef int SimpleSet_traverse(SimpleSet self, visitproc visit, void *arg):
573
571
    """This is an implementation of 'tp_traverse' that hits the whole table.
574
572
 
575
573
    Cython/Pyrex don't seem to let you define a tp_traverse, and they only