From d5a786149063f76c089967ec9c3b52f2500ca63e Mon Sep 17 00:00:00 2001 From: Frank Zingsheim Date: Sun, 22 Mar 2026 10:32:21 +0100 Subject: [PATCH] Fix: Largefile with CRLF in .hglf file Files in .hglf could contain CRLF instead of just LF line endings. The largefile export was confused by this while reading the hash. Fixed by stripping all whitespaces from the hash. --- hg-fast-export.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hg-fast-export.py b/hg-fast-export.py index bf8c310..fa4e852 100755 --- a/hg-fast-export.py +++ b/hg-fast-export.py @@ -172,7 +172,7 @@ def largefile_orig_name(filename): def largefile_data(ctx, file, filename): lf_file_ctx=ctx.filectx(file) - lf_hash=lf_file_ctx.data().strip(b'\n') + lf_hash=lf_file_ctx.data().strip() sys.stderr.write("Detected large file hash %s\n" % lf_hash.decode()) #should detect where the large files are located file_with_data = lfutil.findfile(ctx.repo(), lf_hash)