On Thu, Mar 23, 2017 at 11:34:41PM +0900, Yuya Nishihara wrote: > On Tue, 21 Mar 2017 19:00:56 -0700, Jun Wu wrote: > > # HG changeset patch > > # User Jun Wu <qu...@fb.com> > > # Date 1489311257 28800 > > # Sun Mar 12 01:34:17 2017 -0800 > > # Node ID ea4573691618ea1937cfe0c03c6caa4693b64b05 > > # Parent e960baabf0da65e84e99466d4be9acaa4b9b91b2 > > # Available At https://bitbucket.org/quark-zju/hg-draft > > # hg pull https://bitbucket.org/quark-zju/hg-draft -r > > ea4573691618 > > debugfsinfo: print fstype information > > These generally look good. Queued, thanks.
+1. Many thanks to Jun for sticking with this long enough to find the safe solution. :) > > > diff --git a/mercurial/debugcommands.py b/mercurial/debugcommands.py > > --- a/mercurial/debugcommands.py > > +++ b/mercurial/debugcommands.py > > @@ -791,4 +791,8 @@ def debugfsinfo(ui, path="."): > > util.writefile('.debugfsinfo', '') > > ui.write(('exec: %s\n') % (util.checkexec(path) and 'yes' or 'no')) > > + from . import osutil > > Is there an import cycle? > > > + if util.safehasattr(osutil, 'getfstype'): > > + fstype = osutil.getfstype('.') > > + ui.write(('fstype: %s\n') % (fstype or '(unknown)')) > > Let's add util.getfstype() so we don't have to test the existence of > getfstype(). It should be okay to print '(unknown)' if unsupported. > _______________________________________________ > Mercurial-devel mailing list > Mercurial-devel@mercurial-scm.org > https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel