mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 07:17:55 +03:00
store: skip decodir check if path does not contain '.hg/'
The three replace calls are slower than this simple __contains__, and anyway we should not have this many paths ending with .i, .d, or .hg compared to the normal, un-encoded other paths.
This commit is contained in:
parent
5a000fb762
commit
d7e4800c8b
@ -22,7 +22,7 @@ def encodedir(path):
|
||||
.replace(".d/", ".d.hg/"))
|
||||
|
||||
def decodedir(path):
|
||||
if not path.startswith('data/'):
|
||||
if not path.startswith('data/') or ".hg/" not in path:
|
||||
return path
|
||||
return (path
|
||||
.replace(".d.hg/", ".d/")
|
||||
|
Loading…
Reference in New Issue
Block a user