Index: drush_make.download.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/drush_make/Attic/drush_make.download.inc,v
retrieving revision 1.1.2.96
diff -w -r1.1.2.96 drush_make.download.inc
15a16
>     $update_in_place = drush_get_option('remake') && drush_get_option('working-copy') && is_dir($download_location . '/CVS');
37a39,42
>     if ($update_in_place) {
>       $command = 'cvs -d%s update -d%s';
>     }
>     else {
38a44
>     }
47a54
>     if (!$update_in_place) {
49a57
>     }
53a62,65
>       if ($update_in_place) {
>         drush_log(dt('%project updated.', array('%project' => $name)), 'ok');
>       }
>       else {
54a67
>       }
394a408
>   $update_in_place = drush_get_option('remake') && $wc && is_dir($download_location . '/.git');
461a476,486
>     // clone|pull the given repository
>     if ($update_in_place) {
>       $tmp_location = $download_location;
>       $cwd = getcwd();
>       chdir($tmp_location);
>       $clone_ok = drush_shell_exec("git stash && git pull");
>       chdir($cwd);
>       if ($clone_ok) {
>         drush_log(dt('%project updated.', array('%project' => $name)), 'ok');
>       }
>     } else {
463d487
< 
465,467c489,490
< 
<     // clone the given repository
<     if (drush_shell_exec("git clone %s %s", $url, $tmp_location)) {
---
>       $clone_ok = drush_shell_exec("git clone %s %s", $url, $tmp_location);
>       if ($clone_ok) {
468a492,495
>       }
>     }
> 
>     if ($clone_ok) {
534a562
>       if (!$update_in_place) {
536a565
>       }
602c631,635
<     if (drush_get_option('working-copy')) {
---
>     $update_in_place = drush_get_option('remake') && drush_get_option('working-copy') && is_dir($download_location . '/.svn');
>     if ($update_in_place) {
>       $command = 'svn ' . $options . ' update';
>     }
>     elseif (drush_get_option('working-copy')) {
608a642
> 
615a650,654
>     if ($update_in_place) {
>       $command .= ' %s';
>       $args[] = $download_location;
>     }
>     else {
618a658
>     }
630a671,674
>       if ($update_in_place) {
>         drush_log(dt('%project @command.', array('%project' => $name, '@command' => $command)), 'ok');
>       }
>       else {
631a676
>       }
Index: drush_make.drush.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/drush_make/Attic/drush_make.drush.inc,v
retrieving revision 1.11.2.79
diff -w -r1.11.2.79 drush_make.drush.inc
47a48
>       '--remake' => 'Will update modules in place, overriding downloaded code or updating working copies of modules.',
107a109,113
>   if (drush_get_option('remake') && (drush_get_option('test') || drush_get_option('tar'))) {
>     drush_make_error('BUILD_ERROR', "The options --test, --tar are incompatible with --remake");
>     return FALSE;
>   }
> 
110a117,121
>   if (drush_get_option('remake')) {
>     $GLOBALS['drush_make_tmp_build_path'] = $build_path;
>   } else {
>     $GLOBALS['drush_make_tmp_build_path'] = null;
>   }
125a137,138
>   // Don't do the final cleanup job if we're remaking, since it's in-place
>   if (!drush_get_option('remake')) {
134a148
>   }
173c187
<       drush_make_error(dt('Non-existent project type %type on project %project', array('%type' => $project['type'], '%project' => $key)));
---
>       drush_make_error('BUILD_ERROR', dt('Non-existent project type %type on project %project', array('%type' => $project['type'], '%project' => $key)));
377c391
<     drush_shell_exec('ls -A %s', $tmp_path . '/__build__');
---
>     drush_shell_exec('ls -A %s', drush_make_tmp_build_path());
380c394
<       $ret = $ret && drush_shell_exec("cp -Rf %s %s", $tmp_path . '/__build__/' . $file, $build_path);
---
>       $ret = $ret && drush_shell_exec("cp -Rf %s %s", drush_make_tmp_build_path() . '/' . $file, $build_path);
385c399
<     drush_shell_exec("mv %s %s", $tmp_path . '/__build__', $tmp_path . '/' . basename($build_path));
---
>     drush_shell_exec("mv %s %s", drush_make_tmp_build_path(), $tmp_path . '/' . basename($build_path));
Index: drush_make.project.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/drush_make/Attic/drush_make.project.inc,v
retrieving revision 1.1.2.52
diff -w -r1.1.2.52 drush_make.project.inc
50a51,52
>       // .. except if we're remaking
>       if (!drush_get_option('remake')) {
53a56
>     }
67a71,83
>     $patches_file_name = $project_directory . '/PATCHES.txt';
>     $already_applied_patches = array();
> 
>     if (drush_get_option('remake') && is_file($patches_file_name)) {
>       $contents = file_get_contents($patches_file_name);
>       if (!preg_match('/The following patches have been applied to this project:(.*)This file was automatically generated by Drush Make/s', $contents, $mm)) {
>         drush_make_error('BUILD_ERROR', "Unable to parse $patches_file_name");
>         return FALSE;
>       }
>       preg_match_all('~^- (.*://.*)~m', $contents, $mm);
>       $already_applied_patches = $mm[1];
>     }
> 
73a90
>       if (!in_array($info['url'], $already_applied_patches)) {
90c107
<         drush_make_error('Unable to download ' . $info['url'] . '.');
---
>           drush_make_error('BUILD_ERROR', 'Unable to download ' . $info['url'] . '.');
93a111
>     }
94a113,117
>       // Make sure that already applied patches are kept in the registry
>       $tmp = "";
>       foreach ($already_applied_patches as $patch_url) {
>         $tmp .= '- ' . $patch_url . "\n";
>       }
95a119
>         $tmp .
98c122
<       file_put_contents($project_directory . '/PATCHES.txt', $patches_txt);
---
>       file_put_contents($patches_file_name, $patches_txt);
209,210c233
<       $path[] = drush_make_tmp();
<       $path[] = '__build__';
---
>       $path[] = drush_make_tmp_build_path();
Index: drush_make.utilities.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/drush_make/Attic/drush_make.utilities.inc,v
retrieving revision 1.1.2.54
diff -w -r1.1.2.54 drush_make.utilities.inc
298a299,306
> function drush_make_tmp_build_path() {
>   global $drush_make_tmp_build_path;
>   if (!isset($drush_make_tmp_build_path)) {
>     $drush_make_tmp_build_path = drush_make_tmp() . '/__build__';
>   }
>   return $drush_make_tmp_build_path;
> }
> 
312c320
<   $default = drush_make_tmp() . '/__build__/sites/default';
---
>   $default = drush_make_tmp_build_path() . '/sites/default';
343c351
<   drush_shell_exec("mv %s %s", $tmp_path . '/__build__', $tmp_path . '/' . $dirname);
---
>   drush_shell_exec("mv %s %s", drush_make_tmp_build_path(), $tmp_path . '/' . $dirname);
350c358
<   drush_shell_exec("mv %s %s", $tmp_path . '/' . $dirname, $tmp_path . '/__build__');
---
>   drush_shell_exec("mv %s %s", $tmp_path . '/' . $dirname, drush_make_tmp_build_path());
