diff mercurial/scmutil.py @ 25772:5471965af5cb

vfs: add dirname
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Fri, 10 Jul 2015 00:59:51 +0900
parents 39de2e9cc6f4
children fbaa2de13cf6
line wrap: on
line diff
--- 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))