mercurial/posix.py
changeset 35513 c4caf530b1c7
parent 35509 beede158ea8a
child 36303 ed95758addf3
--- a/mercurial/posix.py	Fri Dec 29 22:15:37 2017 -0500
+++ b/mercurial/posix.py	Fri Dec 29 22:54:14 2017 -0500
@@ -305,6 +305,13 @@
     Returns None if the path is ok, or a UI string describing the problem.'''
     return None # on posix platforms, every path is ok
 
+def getfsmountpoint(dirpath):
+    '''Get the filesystem mount point from a directory (best-effort)
+
+    Returns None if we are unsure. Raises OSError on ENOENT, EPERM, etc.
+    '''
+    return getattr(osutil, 'getfsmountpoint', lambda x: None)(dirpath)
+
 def getfstype(dirpath):
     '''Get the filesystem type name from a directory (best-effort)