? 1000662.patch
? drush-1000662.patch
? drush-1002658.patch
? drush-1003360.patch
? drush-1003480.patch
? drush-1004476.patch
? drush-571352.patch
? parche.txt
? includes/table.inc
Index: commands/pm/pm.drush.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/drush/commands/pm/pm.drush.inc,v
retrieving revision 1.186
diff -u -r1.186 pm.drush.inc
--- commands/pm/pm.drush.inc	27 Dec 2010 15:46:16 -0000	1.186
+++ commands/pm/pm.drush.inc	30 Dec 2010 11:27:55 -0000
@@ -1763,6 +1763,22 @@
         ),
       ),
     ),
+    'bzr' => array(
+      'signature' => 'bzr root %s',
+      'options' => array(
+        '--version-control=bzr' => 'Quickly add/remove/commit your project changes to Bazaar.',
+      ),
+      'sub-options' => array(
+        '--version-control=bzr' => array(
+          '--bzrsync' => 'Automatically add new files to the Bazaar repository and remove deleted files. Caution.',
+          '--bzrcommit' => 'Automatically commit changes to Bazaar repository. You must also usw the --bzrsync option.',
+          '  --bzrmessage' => 'Override default commit message which is: Drush automatic commit. Project <name> <type> Command: <the drush command line used>',
+        ),
+      ),
+      'examples' => array(
+        'drush dl cck --version-control=bzr --bzrsync --bzrcommit' =>  'Download the cck module and then add it and commit it to Bazaar.'
+      ),
+    ),
     'svn' => array(
       'signature' => 'svn info %s',
       'options' => array(
@@ -1784,22 +1800,6 @@
         'drush [command] cck --svncommitparams=\"--username joe\"' =>  'Commit changes as the user \'joe\' (Quotes are required).'
       ),
     ),
-    'bzr' => array(
-      'signature' => 'bzr root %s',
-      'options' => array(
-        '--version-control=bzr' => 'Quickly add/remove/commit your project changes to Bazaar.',
-      ),
-      'sub-options' => array(
-        '--version-control=bzr' => array(
-          '--bzrsync' => 'Automatically add new files to the Bazaar repository and remove deleted files. Caution.',
-          '--bzrcommit' => 'Automatically commit changes to Bazaar repository. You must also usw the --bzrsync option.',
-          '  --bzrmessage' => 'Override default commit message which is: Drush automatic commit. Project <name> <type> Command: <the drush command line used>',
-        ),
-      ),
-      'examples' => array(
-        'drush dl cck --version-control=bzr --bzrsync --bzrcommit' =>  'Download the cck module and then add it and commit it to Bazaar.'
-      ),
-    ),
   );
 }
 
@@ -1838,39 +1838,14 @@
   while (!$engine && count($version_controls)) {
     $version_control = array_shift($version_controls);
     if (isset($version_control_engines[$version_control])) {
-      // Instance the engine and check if $directory contain any of the
-      // reserved files.
-      drush_include_engine('version_control', $version_control);
-      $class = 'drush_pm_version_control_' . $version_control;
-      $instance = new $class();
-      $instance->engine = $version_control;
-      $files = $instance->reserved_files();
-      if (empty($files)) {
-        $found = TRUE;
-      }
-      else {
-        $found = FALSE;
-        foreach ($files as $file) {
-          if (file_exists($directory . '/' . $file)) {
-            $found = TRUE;
-            break;
-          }
+      if (!empty($version_control_engines[$version_control]['signature'])) {
+        drush_log(dt('Verifying signature for !vcs version control engine.', array('!vcs' => $version_control)), 'debug');
+        if (drush_shell_exec($version_control_engines[$version_control]['signature'], $directory)) {
+          $engine = $version_control;
         }
       }
-      if (!$found) {
-        drush_log(dt('No reserved files found for !vcs version control engine. Discarding.', array('!vcs' => $version_control)), 'debug');
-        continue;
-      }
       else {
-        if (!empty($version_control_engines[$version_control]['signature'])) {
-          drush_log(dt('Verifying signature for !vcs version control engine.', array('!vcs' => $version_control)), 'debug');
-          if (drush_shell_exec($version_control_engines[$version_control]['signature'], $directory)) {
-            $engine = $version_control;
-          }
-        }
-        else {
-          $engine = $version_control;
-        }
+        $engine = $version_control;
       }
     }
   }
@@ -1878,6 +1853,9 @@
     return drush_set_error('DRUSH_PM_NO_VERSION_CONTROL', dt('No valid version control or backup engine found (the --version-control option was set to "!version-control").', array('!version-control' => $version_control)));
   }
 
+  $class = 'drush_pm_version_control_' . $engine;
+  $instance = new $class();
+  $instance->engine = $engine;
   return $instance;
 }
 
