diff --git a/mercurial/manifest.py b/mercurial/manifest.py --- a/mercurial/manifest.py +++ b/mercurial/manifest.py @@ -292,8 +292,10 @@ b"Manifest values must be a tuple of (node, flags)." ) hashval = value[0] - if not isinstance(hashval, bytes) or not 20 <= len(hashval) <= 22: - raise TypeError(b"node must be a 20-byte byte string") + if not isinstance(hashval, bytes) or not ( + 20 <= len(hashval) <= 22 or 32 <= len(hashval) <= 34 + ): + raise TypeError(b"node must be a 20-byte or 32-byte byte string") flags = value[1] if len(hashval) == 22: hashval = hashval[:-1]