[PATCH 2 of 7 V2] win32: implement util.getfstype()
Matt Harbison
mharbison72 at gmail.com
Mon Jan 1 00:38:41 UTC 2018
On Sun, 31 Dec 2017 03:54:18 -0500, Yuya Nishihara <yuya at tcha.org> wrote:
> On Sat, 30 Dec 2017 23:11:09 -0500, Matt Harbison wrote:
>> # HG changeset patch
>> # User Matt Harbison <matt_harbison at yahoo.com>
>> # Date 1514600899 18000
>> # Fri Dec 29 21:28:19 2017 -0500
>> # Node ID 5b4803673e98e26e1d80254b8ac3bab5ebc5bac7
>> # Parent beede158ea8a740efb59b46522f74490381a2086
>> win32: implement util.getfstype()
>
> Queued the series, thanks.
>
>> + size = len(realpath) + 1
>> + buf = ctypes.create_string_buffer(size)
>> +
>> + if not _kernel32.GetVolumePathNameA(realpath, ctypes.byref(buf),
>> size):
>
> No idea why, but "hg debugfsinfo --cwd '/z/'" failed on WinXP saying
> something
> like "more data available." Windows bug?
Odd. I noticed different misbehavior on Win7 yesterday when trying to `cd
/z/`, but can't explain it either.
$ ../hg debugfsinfo --cwd '/z/'
abort: The system cannot find the file specified: 'C:/MinGW/msys/1.0/z/'
$ df -h
Filesystem Size Used Avail Use% Mounted on
C:\Users\Matt\AppData\Local\Temp
435G 386G 50G 89% /tmp
C:\MinGW\msys\1.0 435G 386G 50G 89% /usr
C:\MinGW\msys\1.0 435G 386G 50G 89% /
C:\MinGW 435G 386G 50G 89% /mingw
c: 435G 386G 50G 89% /c
d: 31G 27G 4.6G 86% /d
z: 435G 386G 50G 89% z
(Not sure why it is mounted on 'z', not '/z' here)
$ mkdir /z
$ ../hg debugfsinfo --cwd '/z/'
path: .
mounted on: C:\
exec: no
fstype: NTFS
symlink: no
hardlink: yes
case-sensitive: no
I guess falling back to C:\ makes sense, since nothing seems to actually
be mounted on z here. `mkdir /z` prior to mapping the share made no
difference.
$ ../hg debugfsinfo --cwd 'z:\'
path: .
mounted on: z:\
exec: no
fstype: cifs
symlink: no
hardlink: yes
case-sensitive: no
More information about the Mercurial-devel
mailing list