# HG changeset patch # User Bryan O'Sullivan # Date 2012-09-14 19:08:55 # Node ID 4647aa33ad811448b4093af33ad9ad61d02e23e0 # Parent 9ee25d7b1aed5f131ac9c242b938f113e7acb58b scmutil: use the new faster path split Combined with a few other patches in this series, this contributes to improving stream_out performance by 10%. diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py --- a/mercurial/scmutil.py +++ b/mercurial/scmutil.py @@ -267,7 +267,7 @@ class opener(abstractopener): mode += "b" # for that other OS nlink = -1 - dirname, basename = os.path.split(f) + dirname, basename = util.split(f) # If basename is empty, then the path is malformed because it points # to a directory. Let the posixfile() call below raise IOError. if basename and mode not in ('r', 'rb'): @@ -383,7 +383,7 @@ def canonpath(root, cwd, myname, auditor name = os.path.join(*rel) auditor(name) return util.pconvert(name) - dirname, basename = os.path.split(name) + dirname, basename = util.split(name) rel.append(basename) if dirname == name: break