Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
It is impossible to run $drush views-revert all
to revert all views.
Here is a patch for this fix
Comment | File | Size | Author |
---|---|---|---|
#11 | views_revert_all-1389720-11.patch | 3.29 KB | colan |
#9 | views_revert_all-1389720-7.patch | 3.04 KB | colan |
#4 | views_revert_all-1389720-4.patch | 2.7 KB | colan |
#3 | 1389720-views-drush-revert-all-3.x-3.patch | 2.32 KB | igor.ro |
#1 | 1389720-views-drush-revert-all-1.patch | 2.39 KB | igor.ro |
Comments
Comment #1
igor.ro CreditAttribution: igor.ro commentedComment #2
dawehnerUpdate status
Comment #3
igor.ro CreditAttribution: igor.ro commentedPatch for views 3.0
Comment #4
colanLet's do this in D7 first. Patch attached.
Comment #5
mvchmm. what if a view is called 'all'? i would suggest "drush views-revert-all" or "drush views-revert --all".
that's arguably a vague name for a view, but it's possible that a user has created one.
i know we run "drush cc all", but users can't create & name arbitrary cache containers as they can with views so no conflict is possible.
Comment #6
colanWorking on the --all option as suggested by moshe on #drush. I think this is better as it keeps everything within one command.
Comment #7
moshe weitzman CreditAttribution: moshe weitzman commentedFYI would be great to sync D7 changes to D8 which is in Drush core. Might require significant changes for revert.
Comment #8
moshe weitzman CreditAttribution: moshe weitzman commentedSorry, didn't mean to unassign. I cant fix it.
Comment #9
colanAlright, can we do D7 first? See attached. I'll take a look at the D8 afterwards.
Comment #10
colanFor D8, I created a separate issue in the Drush issue queue over at https://github.com/drush-ops/drush/issues/730.
Comment #11
colanDrush was returning an error when there were no views to revert. That's bad for scripts. Fixed.
Comment #13
colanLooks like a problem with the bot?
Comment #15
joel.gilchrist CreditAttribution: joel.gilchrist commentedWe've been using this patch in our DEV and PROD environments for a few months now with no issues.
Comment #17
colanAccording to @dawehner, the testing is currently broken. But as we're falling behind getting things committed, we're going to start committing reasonably simple patches without it (and forward porting them to core version 8+).
Comment #18
colanActually, scratch that. This one should go into Drush now, probably https://github.com/drush-ops/drush/issues/699 ?