getting Drush to cooperate with Mercurial I just tried to update a site on my local machine from Drupal 7.14 to 7.15 with "drush up". I use Mercurial (hg) for version control. (I know that most Drupal sites use Git, but we standardized on Hg before we started working with Drupal.)

I was surprised to see that the update process pretty much hollowed out the .hg folder, which is where Mercurial stores all of its information. I got the following warning from drush:

rmdir(C:/Dev/mysite/.hg): Directory not empty filesystem.inc:141

Is there something I need to do to tell drush to please leave that folder alone? I googled this issue and didn't find anything helpful.

[update 08/29/2012]
I thought I'd post an update to this, since I still haven't solved the problem.
I tried to update a fairly vanilla test Drupal site from 7.14 to 7.15 this morning, and got the same error. Drush failed to update Drupal, and pretty much destroyed the .hg folder in the process. Here's a full dump of the messages from Drush as it did this:

    Code updates will be made to drupal core.
    WARNING:  Updating core will discard any modifications made to Drupal core files, most noteworthy among these are .htaccess and robots.txt.  If you have made any modifications to these files, please back them up before updating so that you can re-create your modifications in the updated version of the file.
    Note: Updating core can potentially break your site. It is NOT recommended to update production sites without prior testing.

    Do you really want to continue? (y/n): y
    rmdir(C:/Dev/drupal-7-test/.hg): Directory not empty filesystem.inc:141              [warning]
    string(2) "\037ï"
    array(1) {
      [1] =&gt;
      int(35615)
    }
    string(2) "\037ï"
    array(1) {
      [1] =&gt;
      int(35615)
    }
    Destination directory C:/Dev/drupal-7-test/drupal-7.15 already exists.                 [error]
    Project drupal was updated successfully. Installed version is now 7.15.
    Backups were saved into the directory                                                     [ok]
    C:\Users\ahuey/drush-backups/drupal_7_test/20120829131850/drupal.
    Backups were restored successfully.                                                       [ok]
    rmdir(C:/Dev/drupal-7-test/.hg): Directory not empty filesystem.inc:141              [warning]


I'm running Drush 5.5. I'm OK with having to update Drupal manually for now, but it's a weird problem, so I may spend some more time on it, if I can spare the time.
wow ... drush up to my knowledge shouldnt touch any (dot) hidden files or directories. Drush up just looks for more recent module packages and updates them, which has nothing todo with .hg or .svn or .git directories.

Are you talking about a global .hg directory for your projects, or like an .hg directory within a module folder somewhere!?