/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/repofmt/pack_repo.py

  • Committer: Vincent Ladeuil
  • Date: 2007-11-20 14:10:50 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-20071120141050-21w0pnh2ydu94vzh
New files, same warnings, same fixes.

* bzrlib/util/configobj/configobj.py:
(ConfigObjError.__init__): Use msg instead of message (2.6
deprecation).

* bzrlib/errors.py:
(BzrCheckError, ParseConfigError.__init__): Use msg instead of
message (2.6 deprecation).

* bzrlib/tests/test_repository.py: 
Update md5 import, fix use.

* bzrlib/repofmt/pack_repo.py: 
Update md5 import, fix use. Fix some import ordering too.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
lazy_import(globals(), """
19
19
from itertools import izip
20
20
import math
21
 
import md5
22
21
import time
23
22
 
24
23
from bzrlib import (
25
24
        debug,
 
25
        osutils,
26
26
        pack,
27
27
        ui,
28
28
        )
29
29
from bzrlib.index import (
 
30
    CombinedGraphIndex,
 
31
    InMemoryGraphIndex,
30
32
    GraphIndex,
31
33
    GraphIndexBuilder,
32
 
    InMemoryGraphIndex,
33
 
    CombinedGraphIndex,
34
34
    GraphIndexPrefixAdapter,
35
35
    )
36
36
from bzrlib.knit import KnitGraphIndex, _PackAccess, _KnitData
37
 
from bzrlib.osutils import rand_chars
38
37
from bzrlib.pack import ContainerWriter
39
38
from bzrlib.store import revision
40
39
""")
224
223
        # where is the pack renamed to when it is finished?
225
224
        self.pack_transport = pack_transport
226
225
        # tracks the content written to the .pack file.
227
 
        self._hash = md5.new()
 
226
        self._hash = osutils.md5()
228
227
        # a four-tuple with the length in bytes of the indices, once the pack
229
228
        # is finalised. (rev, inv, text, sigs)
230
229
        self.index_sizes = None
234
233
        # under creation.
235
234
        self._cache_limit = 0
236
235
        # the temporary pack file name.
237
 
        self.random_name = rand_chars(20) + upload_suffix
 
236
        self.random_name = osutils.rand_chars(20) + upload_suffix
238
237
        # when was this pack started ?
239
238
        self.start_time = time.time()
240
239
        # open an output stream for the data added to the pack.