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

  • Committer: Vincent Ladeuil
  • Date: 2007-10-24 13:56:34 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-20071024135634-d8os3by1g6f45q12
Fix python2.6 deprecation warnings (still 4 failures 5 errors in test suite).

* bzrlib/osutils.py: 
Wrap md5 and sha imports to be compatible with python 2.4, 2.5,
2.6.
Replace all sha.new() calls by sha() calls they are reputedly
faster (not profiled).

* bzrlib/weave.py: 
Update sha import, fix use.     

* bzrlib/transport/http/_urllib2_wrappers.py: 
Update sha and md5 imports, fix uses.

* bzrlib/tests/test_testament.py: 
Update sha import.

* bzrlib/tests/test_knit.py: 
Update sha import, fix uses.    

* bzrlib/tests/test_hashcache.py: 
Update sha import, fix use.     

* bzrlib/tests/repository_implementations/test_check_reconcile.py: 
Update sha import, fix use.     

* bzrlib/tests/HTTPTestUtil.py: 
Update md5 import, fix uses. Delete useless sha import.

* bzrlib/testament.py: 
Update sha import.

* bzrlib/hashcache.py: 
Update sha import.

* bzrlib/revisionspec.py:
(RevisionSpec.__new__): Remove useless parameters since python2.6
is stricter.

Show diffs side-by-side

added added

removed removed

Lines of Context:
71
71
from copy import copy
72
72
from cStringIO import StringIO
73
73
import os
74
 
import sha
75
74
import time
76
75
import warnings
77
76
 
86
85
        WeaveRevisionNotPresent,
87
86
        )
88
87
import bzrlib.errors as errors
89
 
from bzrlib.osutils import sha_strings
 
88
from bzrlib.osutils import sha, sha_strings
90
89
import bzrlib.patiencediff
91
90
from bzrlib.tsort import topo_sort
92
91
from bzrlib.versionedfile import VersionedFile, InterVersionedFile
697
696
            # For creating the ancestry, IntSet is much faster (3.7s vs 0.17s)
698
697
            # The problem is that set membership is much more expensive
699
698
            name = self._idx_to_name(i)
700
 
            sha1s[name] = sha.new()
 
699
            sha1s[name] = sha()
701
700
            texts[name] = []
702
701
            new_inc = set([name])
703
702
            for p in self._parents[i]: