~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/osutils.py

  • Committer: Robert Collins
  • Date: 2007-10-23 22:22:41 UTC
  • mfrom: (2929.2.1 dirstate.update_basis)
  • mto: This revision was merged to the branch mainline in revision 3038.
  • Revision ID: robertc@robertcollins.net-20071023222241-iuqmck10xc2vz6xr
Merge dirstate incremental update logic.

Show diffs side-by-side

added added

removed removed

Lines of Context:
593
593
def sha_file_by_name(fname):
594
594
    """Calculate the SHA1 of a file by reading the full text"""
595
595
    s = sha.new()
596
 
    f = os.open(fname, os.O_RDONLY)
 
596
    f = os.open(fname, os.O_RDONLY | O_BINARY)
597
597
    try:
598
598
        while True:
599
599
            b = os.read(f, 1<<16)