From d78548cbf9a10db963677190bd6adb2a2c480a5c Mon Sep 17 00:00:00 2001 From: Per Bernhardt Date: Fri, 9 Dec 2011 12:01:15 +0100 Subject: [PATCH] Added mercurial's "default" branch as a valid dev version (same as master / trunk). --- src/Composer/Package/Version/VersionParser.php | 4 ++-- src/Composer/Repository/Vcs/HgBitbucketDriver.php | 1 - src/Composer/Repository/Vcs/HgDriver.php | 1 - src/Composer/Repository/Vcs/VcsDriverInterface.php | 2 +- 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Composer/Package/Version/VersionParser.php b/src/Composer/Package/Version/VersionParser.php index 80fb45c3c..e5006d824 100644 --- a/src/Composer/Package/Version/VersionParser.php +++ b/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); } diff --git a/src/Composer/Repository/Vcs/HgBitbucketDriver.php b/src/Composer/Repository/Vcs/HgBitbucketDriver.php index 9c1c82b3b..515e90d36 100644 --- a/src/Composer/Repository/Vcs/HgBitbucketDriver.php +++ b/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; diff --git a/src/Composer/Repository/Vcs/HgDriver.php b/src/Composer/Repository/Vcs/HgDriver.php index 39f4994fd..de9d51599 100644 --- a/src/Composer/Repository/Vcs/HgDriver.php +++ b/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; } diff --git a/src/Composer/Repository/Vcs/VcsDriverInterface.php b/src/Composer/Repository/Vcs/VcsDriverInterface.php index b8e6d1269..124530905 100644 --- a/src/Composer/Repository/Vcs/VcsDriverInterface.php +++ b/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 */