-
-
djblets/extensions/templatetags/djblets_extensions.py (Diff revision 1) Add an extra blank line here, please.
Extension dependencies automatically enable, and the Extension Manager informs the user that this will happen.
Review Request #1590 — Created May 14, 2010 and discarded
Information | |
---|---|
mike_conley | |
Djblets | |
extensions | |
Reviewers | |
reviewboard | |
The extensions manager UI now reports what extension dependencies will be automatically enabled when a particular extension is enabled. Extensions know about their dependencies through their setup.py's install_requires setting.
Manual.
Change Summary:
Thanks for the feedback. Fixed. Gonna knock that 2 space habit.
Diff: |
Revision 2 (+28 -2) |
---|
-
One more thing that I just noticed.
-
djblets/extensions/templatetags/djblets_extensions.py (Diff revision 2) Looking at this a little more carefully, I think this could me more efficient: if extension.info.requires: return nodelist.render(context) return "" That way, we avoid using len() when all we care about is non-empty, and in the fallback case we don't render the nodelist.
Change Summary:
David: Thanks for the tip - tested and works like a charm. -Mike
Diff: |
Revision 3 (+28 -2) |
---|
-
Just realized that the extension enabling one is based on this. You may want to use the --parent flag to post-review to specify the parent branches so that it's easier to review changes based on uncommitted changes.
-
Change Summary:
I've decided to combine this review request with the one I filed here: http://reviews.reviewboard.org/r/1591/ (which did the enabling bit) Instead of dealing with pkg_resources Requirement objects, developers must provide a "requires" list of extension_id's in their Extension to indicate that it relies upon another extension. Other goodies: -ExtensionManager populates ExtensionInfo.requirements as a list of required Extension classes -In the UI, only required extensions that are disabled are reported to the user. So, if B relies on A, and A is already enabled, B will not report that it will automatically enable A.
Summary: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 4 (+55 -10) |
-
-
djblets/extensions/base.py (Diff revision 4) I wasn't sure if this was the right place to do this. I suppose I just didn't want to have to go through another loop.
-
djblets/extensions/base.py (Diff revision 4) From feedback on: http://reviews.reviewboard.org/r/1591/
-
djblets/extensions/base.py (Diff revision 4) From feedback on: http://reviews.reviewboard.org/r/1591/