Add very verbose option#22
Conversation
wbolster
left a comment
There was a problem hiding this comment.
thanks for your contribution. this seems useful indeed. i usually add it manually, or specify it via addopts in pytest.ini.
i think the implementation can be nicer though: instead of an extra flag, perhaps the -v flag could ‘rotate’ between nothing, --verbose, and --verbose --verbose instead. what do you think?
|
I've tried this (you can take a look at my best attempt in the most recent commit), but I don't think there is a way to do this within the The issue is that we need to maintain some state, which I tried to do by setting the I've never used |
|
same here, never used it extensively, and it's semi-deprecated in favour of let's settle for good enough. thanks! |
|
you're right, custom lisp functions don't seem to work at all for ‘switches’ (e.g. the (defun magit-invoke-popup-switch (event)
(interactive (list last-command-event))
(--if-let (magit-popup-lookup event :switches)
(progn
(setf (magit-popup-event-use it)
(not (magit-popup-event-use it)))
(magit-refresh-popup-buffer))
(user-error "%c isn't bound to any switch" event)))
(defun magit-invoke-popup-option (event)
(interactive (list last-command-event))
(--if-let (magit-popup-lookup event :options)
(progn
(if (magit-popup-event-use it)
(setf (magit-popup-event-use it) nil)
(let* ((arg (magit-popup-event-arg it))
(val (funcall
(magit-popup-event-fun it)
(concat arg (unless (string-match-p "=$" arg) ": "))
(magit-popup-event-val it))))
(setf (magit-popup-event-use it) t)
(setf (magit-popup-event-val it) val)))
(magit-refresh-popup-buffer))
(user-error "%c isn't bound to any option" event))) |
|
fwiw, #24 was merged with the original simpler idea: a |
Make the ‘-v’ option cycle between nothing, ‘--verbose’, and ‘--verbose --verbose’. This was suggested before (#22 (review)) but wasn't possible at the time of #22 because it seemed impossible due to magit-popup.el limitations. Now that the dispatch menu uses transient.el instead of magit-popup.el (#18, #26), it can be implemented after all
Make the ‘-v’ option cycle between nothing, ‘--verbose’, and ‘--verbose --verbose’. This was suggested before (#22 (review)) but wasn't possible at the time of #22 because it seemed impossible due to magit-popup.el limitations. Now that the dispatch menu uses transient.el instead of magit-popup.el (#18, #26), it can be implemented after all.
Make the ‘-v’ option cycle between nothing, ‘--verbose’, and ‘--verbose --verbose’. This was suggested before (#22 (review)) but wasn't possible at the time of #22 due to magit-popup.el limitations. Now that the dispatch menu uses transient.el instead of magit-popup.el (#18, #26), it can be implemented after all.
Make the ‘-v’ option cycle between nothing, ‘--verbose’, and ‘--verbose --verbose’. This was suggested before (#22 (review)) but wasn't possible at the time of #22 due to magit-popup.el limitations. Now that the dispatch menu uses transient.el instead of magit-popup.el (#18, #26), it can be implemented after all.
Pytest has an option for higher verbosity, which will display the full diff for objects that fail equality assertion (
-vv). In my work, I've found the flag to be indispensable for TDD. This PR adds the-vvflag as an option in the magit popup menu.