Patchwork [3,of,7,V3] windows: add a getfstype method

login
register
mail settings
Submitter Jun Wu
Date March 12, 2017, 9:23 a.m.
Message ID <ecd7fb0f1919e28472e6.1489310632@localhost.localdomain>
Download mbox | patch
Permalink /patch/19142/
State Changes Requested
Headers show

Comments

Jun Wu - March 12, 2017, 9:23 a.m.
# HG changeset patch
# User Jun Wu <quark@fb.com>
# Date 1489305423 28800
#      Sat Mar 11 23:57:03 2017 -0800
# Node ID ecd7fb0f1919e28472e6d41ea282c82d10c33675
# Parent  9c4d023de5832618e06d9434968ef9af35d70986
# Available At https://bitbucket.org/quark-zju/hg-draft
#              hg pull https://bitbucket.org/quark-zju/hg-draft -r ecd7fb0f1919
windows: add a getfstype method

We don't know what to do with Windows yet. But we are going to expose it in
util.py. So declare an empty function.

Patch

diff --git a/mercurial/windows.py b/mercurial/windows.py
--- a/mercurial/windows.py
+++ b/mercurial/windows.py
@@ -478,2 +478,7 @@  def readpipe(pipe):
 def bindunixsocket(sock, path):
     raise NotImplementedError('unsupported platform')
+
+def getfstype(path):
+    """Given a path, return filesystem type or None (best effort)"""
+    # Windows is not supported yet
+    return None