Kiln » Dependencies » Dulwich Read More
Clone URL:  
Pushed to one repository · View In Graph Contained in master-1, master-0, and 0.9.4

pack: PackStreamReader SHA calculation and docstring cleanup.

Change-Id: I193c8c9af7bd3ea58b14b82095562712d913e77d

Changeset 6e434b19d7fb

Parent 9945067caf71

committed by Jelmer Vernooij

authored by Dave Borowitz

Changes to one file · Browse files at 6e434b19d7fb Showing diff from parent 9945067caf71 Diff from another changeset...

Change 1 of 2 Show Entire File dulwich/​pack.py Stacked
 
646
647
648
649
 
650
651
652
 
736
737
738
739
740
741
742
 
 
 
743
744
745
 
646
647
648
 
649
650
651
652
 
736
737
738
 
 
 
 
739
740
741
742
743
744
@@ -646,7 +646,7 @@
  """Read up to size bytes using the given callback.     As a side effect, update the verifier's hash (excluding the last 20 - bytes read) and write through to the output file. + bytes read).     :param read: The read callback to read from.   :param size: The maximum number of bytes to read; the particular @@ -736,10 +736,9 @@
  buf.seek(0)   self._rbuf = buf   - pack_sha = sha_to_hex(''.join([c for c in self._trailer])) - calculated_sha = self.sha.hexdigest() - if pack_sha != calculated_sha: - raise ChecksumMismatch(pack_sha, calculated_sha) + pack_sha = ''.join(self._trailer) + if pack_sha != self.sha.digest(): + raise ChecksumMismatch(sha_to_hex(pack_sha), self.sha.hexdigest())      def obj_sha(type, chunks):