##// END OF EJS Templates
store: remove uneeded startswith('data/') checks in encodedir() and decodedir()...
Adrian Buehlmann -
r17586:2f1475da default
parent child Browse files
Show More
@@ -22,8 +22,6 b' def encodedir(path):'
22 >>> encodedir('data/foo.i.hg/bla.i')
22 >>> encodedir('data/foo.i.hg/bla.i')
23 'data/foo.i.hg.hg/bla.i'
23 'data/foo.i.hg.hg/bla.i'
24 '''
24 '''
25 if not path.startswith('data/'):
26 return path
27 return (path
25 return (path
28 .replace(".hg/", ".hg.hg/")
26 .replace(".hg/", ".hg.hg/")
29 .replace(".i/", ".i.hg/")
27 .replace(".i/", ".i.hg/")
@@ -38,7 +36,7 b' def decodedir(path):'
38 >>> decodedir('data/foo.i.hg.hg/bla.i')
36 >>> decodedir('data/foo.i.hg.hg/bla.i')
39 'data/foo.i.hg/bla.i'
37 'data/foo.i.hg/bla.i'
40 '''
38 '''
41 if not path.startswith('data/') or ".hg/" not in path:
39 if ".hg/" not in path:
42 return path
40 return path
43 return (path
41 return (path
44 .replace(".d.hg/", ".d/")
42 .replace(".d.hg/", ".d/")
General Comments 0
You need to be logged in to leave comments. Login now