mirror of
https://github.com/facebook/sapling.git
synced 2024-10-08 07:49:11 +03:00
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.
This commit is contained in:
parent
484ad4ed41
commit
9d8a9110b0
@ -22,16 +22,16 @@ class filelog(revlog):
|
|||||||
# This avoids a collision between a file named foo and a dir named
|
# This avoids a collision between a file named foo and a dir named
|
||||||
# foo.i or foo.d
|
# foo.i or foo.d
|
||||||
def encodedir(self, path):
|
def encodedir(self, path):
|
||||||
path.replace(".hg/", ".hg.hg/")
|
return (path
|
||||||
path.replace(".i/", ".i.hg/")
|
.replace(".hg/", ".hg.hg/")
|
||||||
path.replace(".d/", ".i.hg/")
|
.replace(".i/", ".i.hg/")
|
||||||
return path
|
.replace(".d/", ".d.hg/"))
|
||||||
|
|
||||||
def decodedir(self, path):
|
def decodedir(self, path):
|
||||||
path.replace(".d.hg/", ".d/")
|
return (path
|
||||||
path.replace(".i.hg/", ".i/")
|
.replace(".d.hg/", ".d/")
|
||||||
path.replace(".hg.hg/", ".hg/")
|
.replace(".i.hg/", ".i/")
|
||||||
return path
|
.replace(".hg.hg/", ".hg/"))
|
||||||
|
|
||||||
def read(self, node):
|
def read(self, node):
|
||||||
t = self.revision(node)
|
t = self.revision(node)
|
||||||
|
Loading…
Reference in New Issue
Block a user