# HG changeset patch # User FUJIWARA Katsunori # Date 1436457591 -32400 # Node ID 5471965af5cb00700a3c8e7772e1888c5e55d069 # Parent a7178d8fe7ee5f67cab8aecffc50674bd6734897 vfs: add dirname diff -r a7178d8fe7ee -r 5471965af5cb mercurial/scmutil.py --- a/mercurial/scmutil.py Fri Jul 10 00:59:51 2015 +0900 +++ b/mercurial/scmutil.py Fri Jul 10 00:59:51 2015 +0900 @@ -291,6 +291,12 @@ def chmod(self, path, mode): return os.chmod(self.join(path), mode) + def dirname(self, path): + """return dirname element of a path (as os.path.dirname would do) + + This exists to allow handling of strange encoding if needed.""" + return os.path.dirname(path) + def exists(self, path=None): return os.path.exists(self.join(path))