D7506: phabricator: add a "phabstatus" show view

spectral (Kyle Lippincott) phabricator at mercurial-scm.org
Thu Dec 12 13:19:20 EST 2019


spectral added a comment.


  In D7506#111966 <https://phab.mercurial-scm.org/D7506#111966>, @dlax wrote:
  
  > In D7506#111947 <https://phab.mercurial-scm.org/D7506#111947>, @spectral wrote:
  >
  >> I don't think `from . import show` works generally.
  >
  > I did that because `test-check-module-imports.t` complained otherwise when using `from hgext import show`:
  >
  >   hgext/phabricator.py:89: import should be relative: hgext
  >
  > Also, there's already a similar `from . import rebase` in `hgext/split.py` so I thought that relative import was fine.
  > I'm happy to change if there's a solution, though.
  
  The normal solution is to just load the extension (I think that's what evolve does, since it has a hard dependency on rebase functionality), or to configure an `extensions.afterloaded()` (which won't be called if the extension isn't loaded, or is loaded with a non-standard name), but I think this probably isn't a huge deal... I'm only importing via weird syntax because the phabricator extension didn't previously get installed on my machine, but now it is part of the installation so I can just use the normal syntax. It's also a developer/advanced feature, so I don't think this will cause many problems.
  
  The only thing I'm concerned about is cargo culting... this is more evidence that this is an acceptable practice, but that's probably already too late (there's stuff in mercurial/configitems.py that says that things like shelve might already be doing something similar (also to the rebase extension), and as you said, split is already doing this).
  
  Sorry for not realizing that my method of importing the extension was outdated/unnecessary/odd before my message implying you needed to make a change here - hopefully you didn't spend too much time on it.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7506/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D7506

To: dlax, #hg-reviewers, pulkit
Cc: spectral, mharbison72, mjpieters, Kwan, mercurial-devel


More information about the Mercurial-devel mailing list