[PATCH] debugfsinfo: print fstype information

Yuya Nishihara yuya at tcha.org
Sun Mar 12 14:53:07 EDT 2017


On Sun, 12 Mar 2017 14:12:03 -0400, Augie Fackler wrote:
> On Sun, Mar 12, 2017 at 01:34:53AM -0800, Jun Wu wrote:
> > # HG changeset patch
> > # User Jun Wu <quark at fb.com>
> > # Date 1489311257 28800
> > #      Sun Mar 12 01:34:17 2017 -0800
> > # Node ID ff9af50d033388f74cbaf1eeac1509b3e75da07b
> > # Parent  9da40a9e54c419490a2ff23b9dda7acc109f81cd
> > # Available At https://bitbucket.org/quark-zju/hg-draft
> > #              hg pull https://bitbucket.org/quark-zju/hg-draft -r ff9af50d0333
> > debugfsinfo: print fstype information
> 
> Queued, thanks.
> 
> >
> > Since we have util.getfstype, it'll be handy to use "debugfsinfo" to test
> > it.
> >
> > diff --git a/mercurial/debugcommands.py b/mercurial/debugcommands.py
> > --- a/mercurial/debugcommands.py
> > +++ b/mercurial/debugcommands.py
> > @@ -791,4 +791,5 @@ def debugfsinfo(ui, path="."):
> >      util.writefile('.debugfsinfo', '')
> >      ui.write(('exec: %s\n') % (util.checkexec(path) and 'yes' or 'no'))
> > +    ui.write(('fstype: %s\n') % (util.getfstype(path) or '(unknown)'))

It appears debugfsinfo isn't covered by tests.

  $ hg debugfsinfo
  exec: yes
  ...
      ui.write(('fstype: %s\n') % (util.getfstype(path) or '(unknown)'))
  AttributeError: 'module' object has no attribute 'getfstype'


More information about the Mercurial-devel mailing list