I just made a

drush dl menu_block --dev

but this will download the 3.x-dev Version:

Install location /var/www/domains/asdf/public_html/sites/all/modules/menu_block already exists. Do you want to overwrite it? (y/n): y
Project menu_block (7.x-3.x-dev) downloaded to                                                                   [success]
/var/www/domains/asdf/public_html/sites/all/modules/menu_block.

the only Problem is, that this Version contains older code then the 2.x-dev
is there a way to prevent this?
When I download it with:

drush dl menu_block-7.x-2.x-dev

it works obviously

Comments

johnalbin’s picture

Title: Drush will download this Version which is older then 2.x-dev » Drush will download -dev version that is not listed on project homepage
Project: Menu Block » Drush
Version: 7.x-3.x-dev » All-versions-4.x-dev
Component: Code » PM (dl, en, up ...)
Category: bug » feature

And doing a drush dl zen --dev will download the 7.x-6.x-dev release node I had to create in order to discuss a new version that has yet to have any work done on it. (The download is completely bogus and only contains a DROIDS.txt file.)

The "newest" -dev for both Zen and Menu block are not listed on their project homepages because they are not meant to be downloaded.

IMO, drush should download the latest -dev listed on the project homepage. Or (if no -dev listed on homepage) it should use the logic it currently uses for downloading a -dev release.

moshe weitzman’s picture

Until someone has time and interest to work on this, folks can use --select or type in a specific version to get the one you want

owen barton’s picture

I think the issue here is that we don't get this information from d.o:

<release>
  <name>zen 7.x-5.x-dev</name>
  <version>7.x-5.x-dev</version>
  <tag>7.x-5.x</tag>
  <version_major>5</version_major>
  <version_extra>dev</version_extra>
  <status>published</status>
  <release_link>http://drupal.org/node/1079736</release_link>
  <download_link>http://ftp.drupal.org/files/projects/zen-7.x-5.x-dev.tar.gz</download_link>
  <date>1362232751</date>
  <mdhash>aa687e6324004ee5104b8541c3322699</mdhash>
  <filesize>272795</filesize>
  <files>
    <file>
      <url>http://ftp.drupal.org/files/projects/zen-7.x-5.x-dev.tar.gz</url>
      <archive_type>tar.gz</archive_type>
      <md5>aa687e6324004ee5104b8541c3322699</md5>
      <size>272795</size>
      <filedate>1362232751</filedate>
    </file>
    <file>
      <url>http://ftp.drupal.org/files/projects/zen-7.x-5.x-dev.zip</url>
      <archive_type>zip</archive_type>
      <md5>1b2660a79a491f50e33a762bf8aad7a3</md5>
      <size>328545</size>
      <filedate>1362232751</filedate>
    </file>
  </files>
  <terms>
    <term>
      <name>Release type</name>
      <value>New features</value>
    </term>
  </terms>
</release>

vs.

<release>
  <name>zen 7.x-6.x-dev</name>
  <version>7.x-6.x-dev</version>
  <tag>7.x-6.x</tag>
  <version_major>6</version_major>
  <version_extra>dev</version_extra>
  <status>published</status>
  <release_link>http://drupal.org/node/1932176</release_link>
  <download_link>http://ftp.drupal.org/files/projects/zen-7.x-6.x-dev.tar.gz</download_link>
  <date>1362318604</date>
  <mdhash>ec69e15c3a5cc37ab3bfbae8241a4895</mdhash>
  <filesize>7101</filesize>
  <files>
    <file>
      <url>http://ftp.drupal.org/files/projects/zen-7.x-6.x-dev.tar.gz</url>
      <archive_type>tar.gz</archive_type>
      <md5>ec69e15c3a5cc37ab3bfbae8241a4895</md5>
      <size>7101</size>
      <filedate>1362318604</filedate>
    </file>
    <file>
      <url>http://ftp.drupal.org/files/projects/zen-7.x-6.x-dev.zip</url>
      <archive_type>zip</archive_type>
      <md5>7da2969b46047e5ceec22c0bfd7cf1ca</md5>
      <size>7274</size>
      <filedate>1362318604</filedate>
    </file>
  </files>
</release>

The only difference here is the release type tag, but that doesn't seem to match your needs here (i.e. 7.x-6.x could have a release type tag and still not be displayed on the project page). Hence, I think the options are to (a) scrape d.o. project pages (ugly and won't get into drush core - although it could be a contrib), (b) patch d.o. to include the dev release selection in the xml or perhaps (c) add an "experimental" release type tag that drush could use to deprioritize these (this wouldn't be exactly what you are asking for, but I think would fill the basic need). How do these sound...other ideas?

greg.1.anderson’s picture

Version: All-versions-4.x-dev » 8.x-6.x-dev
Status: Active » Closed (won't fix)
Issue tags: +Needs migration

This issue was marked closed (won't fix) because Drush has moved to Github.

If this feature is still desired, you may copy it to our Github project. For best results, create a Pull Request that has been updated for the master branch. Post a link here to the PR, and please also change the status of this issue to closed (duplicate).

Please ask support questions on Drupal Answers.