# HG changeset patch # User Thomas Arendsen Hein # Date 1123432873 -3600 # Node ID fbe964ae7325d1a0ee2d35682f33337b17eeec32 # Parent a107c64c76bed4924b2543b1ab660f82582f26f6 Fixed encoding of directories ending in .d or .i: One .d and .i was mixed up, and string replace method doesn't work in-place. diff --git a/mercurial/hg.py b/mercurial/hg.py --- a/mercurial/hg.py +++ b/mercurial/hg.py @@ -22,16 +22,16 @@ class filelog(revlog): # This avoids a collision between a file named foo and a dir named # foo.i or foo.d def encodedir(self, path): - path.replace(".hg/", ".hg.hg/") - path.replace(".i/", ".i.hg/") - path.replace(".d/", ".i.hg/") - return path + return (path + .replace(".hg/", ".hg.hg/") + .replace(".i/", ".i.hg/") + .replace(".d/", ".d.hg/")) def decodedir(self, path): - path.replace(".d.hg/", ".d/") - path.replace(".i.hg/", ".i/") - path.replace(".hg.hg/", ".hg/") - return path + return (path + .replace(".d.hg/", ".d/") + .replace(".i.hg/", ".i/") + .replace(".hg.hg/", ".hg/")) def read(self, node): t = self.revision(node)