It is impossible to run $drush views-revert all
to revert all views.

Here is a patch for this fix

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

igor.ro’s picture

dawehner’s picture

Version: 6.x-2.6 » 6.x-3.x-dev
Status: Active » Needs review

Update status

igor.ro’s picture

Patch for views 3.0

colan’s picture

Title: Drush revert all » Add support for "drush views-revert all"
Version: 6.x-3.x-dev » 7.x-3.x-dev
Issue summary: View changes
FileSize
2.7 KB

Let's do this in D7 first. Patch attached.

mvc’s picture

Status: Needs review » Needs work

hmm. 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.

colan’s picture

Assigned: Unassigned » colan

Working on the --all option as suggested by moshe on #drush. I think this is better as it keeps everything within one command.

moshe weitzman’s picture

Assigned: colan » Unassigned

FYI would be great to sync D7 changes to D8 which is in Drush core. Might require significant changes for revert.

moshe weitzman’s picture

Sorry, didn't mean to unassign. I cant fix it.

colan’s picture

Status: Needs work » Needs review
FileSize
3.04 KB

Alright, can we do D7 first? See attached. I'll take a look at the D8 afterwards.

colan’s picture

For D8, I created a separate issue in the Drush issue queue over at https://github.com/drush-ops/drush/issues/730.

colan’s picture

Drush was returning an error when there were no views to revert. That's bad for scripts. Fixed.

Status: Needs review » Needs work

The last submitted patch, 11: views_revert_all-1389720-11.patch, failed testing.

colan’s picture

Looks like a problem with the bot?

Status: Needs work » Needs review
joel.gilchrist’s picture

Status: Needs review » Reviewed & tested by the community

We've been using this patch in our DEV and PROD environments for a few months now with no issues.

  • colan committed c615dad on 7.x-3.x
    Issue #1389720 by igor.ro, colan: Added support for "drush views-revert...
colan’s picture

Project: Views (for Drupal 7) » Drupal core
Version: 7.x-3.x-dev » 8.1.x-dev
Component: Miscellaneous » views.module
Status: Reviewed & tested by the community » Patch (to be ported)

According 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+).

colan’s picture

Project: Drupal core » Views (for Drupal 7)
Version: 8.1.x-dev » 7.x-3.x-dev
Component: views.module » Code
Status: Patch (to be ported) » Fixed

Actually, scratch that. This one should go into Drush now, probably https://github.com/drush-ops/drush/issues/699 ?

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.