? includes/table.inc
Index: commands/pm/version_control/bzr.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/drush/commands/pm/version_control/bzr.inc,v
retrieving revision 1.9
diff -u -p -r1.9 bzr.inc
--- commands/pm/version_control/bzr.inc	7 Dec 2010 16:35:09 -0000	1.9
+++ commands/pm/version_control/bzr.inc	31 Dec 2010 14:45:57 -0000
@@ -64,36 +64,18 @@ class drush_pm_version_control_bzr imple
   }
 
   /**
-   * Automatically add any unversioned files to Bazaar and remove any files
-   * that have been deleted on the file system
+   * Automatically add any unversioned files to Bazaar
    */
   private function sync($project) {
     if (drush_get_option('bzrsync')) {
       $errors = '';
-      $root = array();
       if (drush_shell_exec('bzr status --short %s', $project['full_project_path'])) {
-        $output = drush_shell_exec_output();
-        // All paths returned by bzr status are relative to the repository root.
-        if (drush_shell_exec('bzr root %s', $project['full_project_path'])) {
-          $root = drush_shell_exec_output();
-        }
-        foreach ($output as $line) {
-          if (preg_match('/^\?\s+(.*)/', $line, $matches)) {
-            $path = $root[0] .'/'. $matches[1];
-            // Bazaar add is by default recursive so only run on "full_project_path".
-            if (($path == $project['full_project_path'] .'/') && !drush_shell_exec('bzr add %s', $path)) {
-              $errors .= implode("\n", drush_shell_exec_output());
-            }
-          }
-          else if (preg_match('/^\s+D\s+(.*)/', $line, $matches)) {
-            $path = $root[0] .'/'. $matches[1];
-            if (!drush_shell_exec('bzr remove %s', $path)) {
-              $errors .= implode("\n", drush_shell_exec_output());
-            }
-          }
+        // Bazaar add is by default recursive so only run on "full_project_path".
+        if (!drush_shell_exec('bzr add %s', $project['full_project_path'])) {
+          $errors .= implode("\n", drush_shell_exec_output());
         }
         if (!empty($errors)) {
-          return drush_set_error('DRUSH_PM_BZR_SYNC_PROBLEMS', dt("Problems were encountered adding or removing files to/from Bazaar.\nThe specific errors are below:\n!errors", array('!errors' => $errors)));
+          return drush_set_error('DRUSH_PM_BZR_SYNC_PROBLEMS', dt("Problems were encountered adding files to Bazaar.\nThe specific errors are below:\n!errors", array('!errors' => $errors)));
         }
       }
       else {
@@ -104,7 +86,8 @@ class drush_pm_version_control_bzr imple
   }
 
   /**
-   * Automatically commit changes to the repository
+   * Automatically commit changes to the repository. Deleted files are
+   * implicitly treated as removed.
    */
   private function commit($project) {
     if (drush_get_option('bzrcommit')) {
