# HG changeset patch # User Arseniy Alekseyev # Date 1676574891 0 # Node ID 4180c988d1d5b2d31fd7c51e14c541dfc216fa9f # Parent 8e50aa0db347529b15e3a9072fcfc43e224cb690 rhg: small refactor: stop using a magical constant "+ 1" Instead, directly do what the "+ 1" was supposed to achive: call hash_encode. diff -r 8e50aa0db347 -r 4180c988d1d5 rust/hg-core/src/revlog/path_encode.rs --- a/rust/hg-core/src/revlog/path_encode.rs Thu Feb 16 19:03:17 2023 +0000 +++ b/rust/hg-core/src/revlog/path_encode.rs Thu Feb 16 19:14:51 2023 +0000 @@ -600,7 +600,7 @@ basic_encode(&mut measure, path); measure.len } else { - MAXSTOREPATHLEN + 1 + return hash_encode(path); }; if newlen <= MAXSTOREPATHLEN { if newlen == path.len() {