diff --git a/hgext/largefiles/lfutil.py b/hgext/largefiles/lfutil.py --- a/hgext/largefiles/lfutil.py +++ b/hgext/largefiles/lfutil.py @@ -57,7 +57,7 @@ util.oslink(src, dest) except OSError: # if hardlinks fail, fallback on atomic copy - with open(src, 'rb') as srcf, util.atomictempfile(dest) as dstf: + with open(src, r'rb') as srcf, util.atomictempfile(dest) as dstf: for chunk in util.filechunkiter(srcf): dstf.write(chunk) os.chmod(dest, os.stat(src).st_mode) @@ -236,7 +236,7 @@ wvfs.makedirs(wvfs.dirname(wvfs.join(filename))) # The write may fail before the file is fully written, but we # don't use atomic writes in the working copy. - with open(path, 'rb') as srcfd, wvfs(filename, 'wb') as destfd: + with open(path, r'rb') as srcfd, wvfs(filename, 'wb') as destfd: gothash = copyandhash( util.filechunkiter(srcfd), destfd) if gothash != hash: @@ -271,7 +271,7 @@ link(usercachepath(repo.ui, hash), storepath(repo, hash)) else: util.makedirs(os.path.dirname(storepath(repo, hash))) - with open(file, 'rb') as srcf: + with open(file, r'rb') as srcf: with util.atomictempfile(storepath(repo, hash), createmode=repo.store.createmode) as dstf: for chunk in util.filechunkiter(srcf): @@ -376,7 +376,7 @@ def hashfile(file): if not os.path.exists(file): return '' - with open(file, 'rb') as fd: + with open(file, r'rb') as fd: return hexsha1(fd) def getexecutable(filename):