Patchwork [6,of,7,V3] hghave: add a check about whitelisted filesystem that supports hardlink

login
register
mail settings
Submitter Jun Wu
Date March 12, 2017, 9:23 a.m.
Message ID <de28b62236a7d47a896b.1489310635@localhost.localdomain>
Download mbox | patch
Permalink /patch/19138/
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 1489307180 28800
#      Sun Mar 12 00:26:20 2017 -0800
# Node ID de28b62236a7d47a896bc4aba2bd95dcd8defc87
# Parent  10ec43758c6b4034a0eeecf24a54752784c82a2c
# Available At https://bitbucket.org/quark-zju/hg-draft
#              hg pull https://bitbucket.org/quark-zju/hg-draft -r de28b62236a7
hghave: add a check about whitelisted filesystem that supports hardlink

Patch

diff --git a/tests/hghave.py b/tests/hghave.py
--- a/tests/hghave.py
+++ b/tests/hghave.py
@@ -347,4 +347,10 @@  def has_hardlink():
         os.unlink(fn)
 
+@check("hardlink-whitelisted", "hardlinks on whitelisted filesystems")
+def has_hardlink_whitelisted():
+    from mercurial import util
+    fstype = util.getfstype('.')
+    return fstype in util._hardlinkfswhitelist
+
 @check("rmcwd", "can remove current working directory")
 def has_rmcwd():