Automatically enable extension dependencies
Review Request #1591 — Created May 14, 2010 and discarded
Information | |
---|---|
mike_conley | |
Djblets | |
extensions | |
Reviewers | |
reviewboard | |
When extensions are enabled, extension dependencies are enabled. Two things: There's code from another review request in here (http://reviews.reviewboard.org/r/1590/) - that would be the extension_list changes, the djblets_extensions.py changes, and change #1 for base.py. Not entirely sure how to do individual branch changes, and have RB still like it.
Description: |
|
---|
-
-
djblets/extensions/base.py (Diff revision 2) If we assume that every requirement is an extension, we're going to run into problems. For example, something that requires ReviewBoard, or Djblets, or RandomPythonPackage. We don't want those to have extension IDs or to be even known about. I think we should just require that extensions very explicitly list their requirements, and default this to []. If we require this, and we have the names be the extension IDs, then we don't need __id_from_requirement. We can just call enable_extension on the IDs themselves.
-
djblets/extensions/base.py (Diff revision 2) Can you rename to _get_id_from_requirement? The _ vs. __ makes a difference when it comes to debugging, as Python may mangle __.
-
djblets/extensions/base.py (Diff revision 2) This should be imported just once for the whole file, at the top.
-
-
djblets/extensions/templates/extensions/extension_list.html (Diff revision 2) Can you indent the {% %} tags the same way as the {% if %} and {% ifhasrequirements %} above?
-
djblets/extensions/templatetags/djblets_extensions.py (Diff revision 2) Can you rename to if_extension_has_requirements ?
-
djblets/extensions/templatetags/djblets_extensions.py (Diff revision 2) Combine these to one line, like: """Returns blah blah""" Also, it should have a trailing period.
-
djblets/extensions/templatetags/djblets_extensions.py (Diff revision 2) It'd be best to just return the result of nodelist.render(context) only when needed.