~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/intset.py

  • Committer: Vincent Ladeuil
  • Date: 2007-11-24 14:20:59 UTC
  • mto: (3928.1.1 bzr.integration)
  • mto: This revision was merged to the branch mainline in revision 3929.
  • Revision ID: v.ladeuil+lp@free.fr-20071124142059-2114qtsgfdv8g9p1
Ssl files needed for the test https server.

* bzrlib/tests/ssl_certs/create_ssls.py: 
Script to create the ssl keys and certificates.

* bzrlib/tests/ssl_certs/server.crt: 
Server certificate signed by the certificate authority.

* bzrlib/tests/ssl_certs/server.csr: 
Server certificate signing request.

* bzrlib/tests/ssl_certs/server_without_pass.key: 
Server key usable without password.

* bzrlib/tests/ssl_certs/server_with_pass.key: 
Server key.

* bzrlib/tests/ssl_certs/ca.key: 
Certificate authority private key.

* bzrlib/tests/ssl_certs/ca.crt: 
Certificate authority certificate.

* bzrlib/tests/ssl_certs/__init__.py: 
Provide access to ssl files (keys and certificates). 

Show diffs side-by-side

added added

removed removed

Lines of Context:
149
149
 
150
150
 
151
151
    def __contains__(self, i):
 
152
        assert i >= 0
152
153
        return self._val & (1L << i)
153
154
 
154
155
 
176
177
            self._val |= to_add._val
177
178
        else:
178
179
            for i in to_add:
 
180
                assert i >= 0
179
181
                self._val |= (1L << i)
180
182
 
181
183
 
182
184
    def add(self, to_add):
 
185
        assert 0 <= to_add
183
186
        self._val |= (1L << to_add)
184
187
 
185
188
 
200
203
        >>> not a
201
204
        True
202
205
        """
 
206
        assert 0 <= to_remove
203
207
        m = 1L << to_remove
204
208
        if not self._val & m:
205
209
            raise KeyError(to_remove)