Patchwork [3,of,3] util: enable hardlink for some BSD-family filesystems

login
register
mail settings
Submitter Jun Wu
Date March 24, 2017, 5:32 a.m.
Message ID <be965400bcca7b69bd8e.1490333574@localhost.localdomain>
Download mbox | patch
Permalink /patch/19624/
State Accepted
Headers show

Comments

Jun Wu - March 24, 2017, 5:32 a.m.
# HG changeset patch
# User Jun Wu <quark@fb.com>
# Date 1490333510 25200
#      Thu Mar 23 22:31:50 2017 -0700
# Node ID be965400bcca7b69bd8e81f53b4ab6b66a847ba0
# Parent  825bb185512c66a43ae6927933196b8356c99798
# Available At https://bitbucket.org/quark-zju/hg-draft
#              hg pull https://bitbucket.org/quark-zju/hg-draft -r be965400bcca
util: enable hardlink for some BSD-family filesystems

Since we can now detect filesystems on FreeBSD and OSX. Add their major
filesystems (ufs, zfs for FreeBSD; hfs for OSX) to the hardlink whitelist.
Augie Fackler - March 24, 2017, 1:23 p.m.
On Thu, Mar 23, 2017 at 10:32:54PM -0700, Jun Wu wrote:
> # HG changeset patch
> # User Jun Wu <quark@fb.com>
> # Date 1490333510 25200
> #      Thu Mar 23 22:31:50 2017 -0700
> # Node ID be965400bcca7b69bd8e81f53b4ab6b66a847ba0
> # Parent  825bb185512c66a43ae6927933196b8356c99798
> # Available At https://bitbucket.org/quark-zju/hg-draft
> #              hg pull https://bitbucket.org/quark-zju/hg-draft -r be965400bcca
> util: enable hardlink for some BSD-family filesystems

Queued the series. Nice of the BSD family to include the fs name right
in the struct.

>
> Since we can now detect filesystems on FreeBSD and OSX. Add their major
> filesystems (ufs, zfs for FreeBSD; hfs for OSX) to the hardlink whitelist.
>
> diff --git a/mercurial/util.py b/mercurial/util.py
> --- a/mercurial/util.py
> +++ b/mercurial/util.py
> @@ -1062,8 +1062,11 @@ def checksignature(func):
>      'ext3',
>      'ext4',
> +    'hfs',
>      'jfs',
>      'reiserfs',
>      'tmpfs',
> +    'ufs',
>      'xfs',
> +    'zfs',
>  ])
>
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Patch

diff --git a/mercurial/util.py b/mercurial/util.py
--- a/mercurial/util.py
+++ b/mercurial/util.py
@@ -1062,8 +1062,11 @@  def checksignature(func):
     'ext3',
     'ext4',
+    'hfs',
     'jfs',
     'reiserfs',
     'tmpfs',
+    'ufs',
     'xfs',
+    'zfs',
 ])