# HG changeset patch # User Arseniy Alekseyev # Date 2023-02-16 14:54:34 # Node ID 362fe34702d542c3f130ec5f5131db400f778620 # Parent 1cffc156f7cd30ead125118f46a7eecc01e0a63f rhg: demonstrate a bug in path_encode The bug means that long filenames at the root of the tree are encoded incorrectly by rhg, so rhg crashes when trying to access them. diff --git a/rust/hg-core/src/revlog/path_encode.rs b/rust/hg-core/src/revlog/path_encode.rs --- a/rust/hg-core/src/revlog/path_encode.rs +++ b/rust/hg-core/src/revlog/path_encode.rs @@ -643,3 +643,22 @@ pub fn path_encode(path: &[u8]) -> Vec