Patchwork [3,of,7,V2] util: whitelist NTFS for hardlink creation (issue4580)

login
register
mail settings
Submitter Matt Harbison
Date Dec. 31, 2017, 4:11 a.m.
Message ID <57d4dbf825679ee66dd3.1514693470@Envy>
Download mbox | patch
Permalink /patch/26510/
State Accepted
Headers show

Comments

Matt Harbison - Dec. 31, 2017, 4:11 a.m.
# HG changeset patch
# User Matt Harbison <matt_harbison@yahoo.com>
# Date 1514686512 18000
#      Sat Dec 30 21:15:12 2017 -0500
# Node ID 57d4dbf825679ee66dd33f8cef723a5769992026
# Parent  5b4803673e98e26e1d80254b8ac3bab5ebc5bac7
util: whitelist NTFS for hardlink creation (issue4580)
Matt Harbison - Dec. 31, 2017, 4:41 a.m.
On Sat, 30 Dec 2017 23:11:10 -0500, Matt Harbison <mharbison72@gmail.com>  
wrote:

> # HG changeset patch
> # User Matt Harbison <matt_harbison@yahoo.com>
> # Date 1514686512 18000
> #      Sat Dec 30 21:15:12 2017 -0500
> # Node ID 57d4dbf825679ee66dd33f8cef723a5769992026
> # Parent  5b4803673e98e26e1d80254b8ac3bab5ebc5bac7
> util: whitelist NTFS for hardlink creation (issue4580)

Interesting footnote to this- Yuya pruned the original (and its parent) in  
hg-committed.  It was not yet hidden, because it had unstable children.   
After writing the first patch in this series, I was able to rebase the  
first commit in the pure series to the top:

   $ hg rebase -r 40406 -d .
   rebasing 40406:47921e6734f8 "pure: implement osutil.getfstype() on  
Windows"

But then after uncommitting osutil.py and amending the message, I couldn't  
rebase the (pruned) original of this patch, and it left a weird message:

   $ hg rebase -r 40386 -d .
   note: not rebasing 40386:a210a1a19734 "util: whitelist NTFS for hardlink  
creation" (@), it has no successor

(The parent of this original patch was the cext implementation of  
getfstype(), and I wanted to leave that pruned.)

The work around was to `hg touch` and rebase that.  Maybe the fix is to  
simply improve the reason message.  I'm guessing it didn't want to rebase,  
because that would cause a divergence?  But I thought I've seen prompts  
around allowing divergence before, and didn't get that here.

Patch

diff --git a/mercurial/util.py b/mercurial/util.py
--- a/mercurial/util.py
+++ b/mercurial/util.py
@@ -1206,6 +1206,7 @@ 
     'ext4',
     'hfs',
     'jfs',
+    'NTFS',
     'reiserfs',
     'tmpfs',
     'ufs',