We should have done something like that in the first place:
diff --git a/mercurial/store.py b/mercurial/store.py
--- a/mercurial/store.py
+++ b/mercurial/store.py
@@ -51,7 +51,15 @@
except KeyError:
pass
else:
- raise KeyError
+ if s[i] != '~':
+ raise KeyError
+
+ try:
+ val = int(s[i + 1: i + 3], 10)
+ except ValueError:
+ raise KeyError
+ yield chr(val)
+ i += 3
return (lambda s: "".join([cmap[c] for c in encodedir(s)]),
lambda s: decodedir("".join(list(decode(s)))))
That would allow us to add new patterns to encode |