just encountered this error with a fresh install of drush-6.0-dev and views.

PHP Fatal error:  Cannot redeclare views_drush_help() (previously declared in /usr/share/drush/commands/core/views.drush.inc:14) in /sites/all/modules/views/drush/views.drush.inc on line 28
Files: 
CommentFileSizeAuthor
#12 1815906-move-drush-12.patch135 byteshelior
PASSED: [[SimpleTest]]: [MySQL] 1,603 pass(es).
[ View ]
#10 1815906-move-drush-10.patch32.02 KBhelior
PASSED: [[SimpleTest]]: [MySQL] 1,603 pass(es).
[ View ]

Comments

Status:Active» Fixed

Update your drush installation, it should be fixed now.

I am still getting the error.....

@rabellamy use the master branch of drush perhaps.

I am on the master branch.

Are you sure you have the current master pull of drush? This was fixed really short time ago.

Status:Fixed» Needs work

@rabellamy i was able to reproduce this on my end.

drush # git pull
remote: Counting objects: 59, done.
remote: Compressing objects: 100% (40/40), done.
remote: Total 40 (delta 32), reused 0 (delta 0)
Unpacking objects: 100% (40/40), done.
From http://git.drupal.org/project/drush
   1d3d650..d1bb1d3  7.x-5.x    -> origin/7.x-5.x
   6dfb696..06b1302  master     -> origin/master
Updating 6dfb696..06b1302
Fast-forward
commands/core/core.drush.inc                       |    4 +-
.../core/{views.drush.inc => views.d8.drush.inc}   |    0
docs/commands.html                                 |    6 ++-
includes/command.inc                               |   38 +++++++++++++++-----
4 files changed, 35 insertions(+), 13 deletions(-)
rename commands/core/{views.drush.inc => views.d8.drush.inc} (100%)

# drush updb
PHP Fatal error:  Cannot redeclare views_drush_help() (previously declared in /usr/share/drush/commands/core/views.d8.drush.inc:14) in sites/all/modules/views/drush/views.drush.inc on line 28
Fatal error: Cannot redeclare views_drush_help() (previously declared in /usr/share/drush/commands/core/views.d8.drush.inc:14) in sites/all/modules/views/drush/views.drush.inc on line 28
Drush command terminated abnormally due to an unrecoverable error.      [error]
Error: Cannot redeclare views_drush_help() (previously declared in
/usr/share/drush/commands/core/views.d8.drush.inc:14) in sites/all/modules/views/drush/views.drush.inc,
line 28

seems it's still including it...

@likewhoa i fixed it by renaming views.drush.inc to views.d8.drush.inc
thanks!!

Project:Views» Drush
Version:7.x-3.x-dev»

Let's move this to drush, as it probably still a bug in drush.

Project:Drush» Views
Version:» 7.x-3.x-dev
Status:Needs work» Needs review

In my project I have two instances of Views: one in the installation profile and the other in the sites/all directory. I found that by moving the views.drush.inc to the top-level directory, I could have both instances exist without the aforementioned PHP errors in previously declared functions.

This may still be a Drush issue, in that it mistakenly loads includes files from the drush directory of every project, but the attached patch is for Views. For cross-reference, the same situation also occurs in Ctools.

StatusFileSize
new32.02 KB
PASSED: [[SimpleTest]]: [MySQL] 1,603 pass(es).
[ View ]

This time with the patch ;)

See http://drupal.org/node/1542048 which allows to show real moves as moves not as delete + creation.

StatusFileSize
new135 bytes
PASSED: [[SimpleTest]]: [MySQL] 1,603 pass(es).
[ View ]

I was wondering how to do that, thanks @dawehner that's much better!

@helior
Are you running on 8.x-6.x which is meant to be just runned for 8.x. Moving drush files seems easy but people mix up file renames when they update.

I'm using Drush via Homebrew, which is reporting 5.8, so I'll assume is 7.x-5.8. Regarding moving files around, yeah, I know what you mean; I can see how this might cause confusion for some users depending on how they update their code. Yet, it's also difficult for a maintainer to provide a solution to fix every possible use-case, too. Every Google search I've found on "how to upgrade a module" eventually mentions to completely remove the module folder and replace with the new one. At some point, for the sake of sanity, I think maintainers should rely on documentation like that instead of trying to make everything completely "fool-proof".

Sorry, I don't intend on convincing you of anything or sounding argumentative, I'm just responding to your concerns.

Hi, I've just got this error message too
using drush 6 views 7.3.x on commerce kickstart.

I found that I have duplicate Views module on sites/all/modules
so I delete the old Views module on profile/commerce_kickstart/modules/contrib

Issue summary:View changes

for me getting same error: it is Drush 5.8 and views Version 7.x-3.7