Explorar el Código

Added mercurial's "default" branch as a valid dev version (same as master / trunk).

Per Bernhardt hace 13 años
padre
commit
d78548cbf9

+ 2 - 2
src/Composer/Package/Version/VersionParser.php

@@ -34,7 +34,7 @@ class VersionParser
     {
         $version = trim($version);
 
-        if (preg_match('{^(?:master|trunk)(?:[.-]?dev)?$}i', $version)) {
+        if (preg_match('{^(?:master|trunk|default)(?:[.-]?dev)?$}i', $version)) {
             return '9999999-dev';
         }
 
@@ -85,7 +85,7 @@ class VersionParser
     {
         $name = trim($name);
 
-        if (in_array($name, array('master', 'trunk'))) {
+        if (in_array($name, array('master', 'trunk', 'default'))) {
             return $this->normalize($name);
         }
 

+ 0 - 1
src/Composer/Repository/Vcs/HgBitbucketDriver.php

@@ -118,7 +118,6 @@ class HgBitbucketDriver implements VcsDriverInterface
             foreach ($tagsData as $tag => $data) {
                 $this->tags[$tag] = $data['raw_node'];
             }
-            unset($this->tags['tip']);
         }
 
         return $this->tags;

+ 0 - 1
src/Composer/Repository/Vcs/HgDriver.php

@@ -126,7 +126,6 @@ class HgDriver implements VcsDriverInterface
                 preg_match('(^([^\s]+)[\s]+[\d+]:(.*)$)', $tag, $match);
                 $tags[$match[1]] = $match[2];
             }
-            unset($tags['tip']);
             $this->tags = $tags;
         }
 

+ 1 - 1
src/Composer/Repository/Vcs/VcsDriverInterface.php

@@ -21,7 +21,7 @@ interface VcsDriverInterface
     function getComposerInformation($identifier);
 
     /**
-     * Return the root identifier (trunk, master, ..)
+     * Return the root identifier (trunk, master, default/tip ..)
      *
      * @return string Identifier
      */