[PATCH 2 of 7 V2] win32: implement util.getfstype()

Yuya Nishihara yuya at tcha.org
Sun Dec 31 03:54:18 EST 2017


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?

> --- a/mercurial/windows.py
> +++ b/mercurial/windows.py
> @@ -231,7 +231,7 @@
>  
>      Returns None if we are unsure. Raises OSError on ENOENT, EPERM, etc.
>      '''
> -    return None
> +    return win32.getfstype(dirpath)

Changed this to getfstype = win32.getfstype.


More information about the Mercurial-devel mailing list