Version 1.0.0.10

svn merge -r 30248:30494 https://dart.googlecode.com/svn/trunk branches_1.0

svn merge -c 30372 https://dart.googlecode.com/svn/branches/bleeding_edge/ branches_1.0
svn merge -c 30479 https://dart.googlecode.com/svn/branches/bleeding_edge/ branches_1.0
svn merge -c 30530 https://dart.googlecode.com/svn/branches/bleeding_edge/ branches_1.0
svn merge -c 30581 https://dart.googlecode.com/svn/branches/bleeding_edge/ branches_1.0
svn merge -c 30623 https://dart.googlecode.com/svn/branches/bleeding_edge/ branches_1.0
svn merge -c 30620 https://dart.googlecode.com/svn/branches/bleeding_edge/ branches_1.0
svn merge -c 30625 https://dart.googlecode.com/svn/branches/bleeding_edge/ branches_1.0

git-svn-id: http://dart.googlecode.com/svn/branches/1.0@30798 260f80e4-7a28-3924-810f-c04153c831b5
diff --git a/tools/VERSION b/tools/VERSION
index 52b6cb0..5bb4e0a 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -1,4 +1,5 @@
+CHANNEL stable
 MAJOR 1
 MINOR 0
 BUILD 0
-PATCH 9
+PATCH 10
diff --git a/tools/create_editor.py b/tools/create_editor.py
index 59fb6c8..086c119 100644
--- a/tools/create_editor.py
+++ b/tools/create_editor.py
@@ -194,6 +194,7 @@
       '-Dbuild.source=' + os.path.abspath('editor'),
       '-Dbuild.dart.sdk=' + GetSdkPath(),
       '-Dbuild.no.properties=true',
+      '-Dbuild.channel=' + utils.GetChannel(),
       '-buildfile',
       buildScript]
   print build_cmd
diff --git a/tools/utils.py b/tools/utils.py
index b582c9e..ab83b46 100644
--- a/tools/utils.py
+++ b/tools/utils.py
@@ -234,7 +234,8 @@
 # Return the base part of the version, Major.Minor.Build.Patch,
 # without the _revision addition
 def GetShortVersion():
-  (major, minor, build, patch) = ReadVersionFile()
+  (channel, major, minor, build, patch) = ReadVersionFile()
+  # TODO(kustermann/ricow): Add the channel to the version string.
   return '%s.%s.%s.%s' % (major, minor, build, patch)
 
 
@@ -243,7 +244,7 @@
   if not version_tuple:
     return None
 
-  (major, minor, build, patch) = version_tuple
+  (channel, major, minor, build, patch) = version_tuple
   revision = GetSVNRevision()
   user = GetUserName()
   # We don't add username to release builds (or any builds on the bots)
@@ -257,9 +258,14 @@
   if revision:
     revision_string = '_r%s' % revision
 
+  # TODO(kustermann/ricow): Add the channel to the version string.
   return ("%s.%s.%s.%s%s%s" %
           (major, minor, build, patch, revision_string, user_string))
 
+def GetChannel():
+  (channel, _, _, _, _) = ReadVersionFile()
+  return channel
+
 def GetUserName():
   key = 'USER'
   if sys.platform == 'win32':
@@ -275,13 +281,19 @@
   except:
     print "Warning: Couldn't read VERSION file (%s)" % version_file
     return None
-  major_match = re.search('MAJOR (\d+)', content)
-  minor_match = re.search('MINOR (\d+)', content)
-  build_match = re.search('BUILD (\d+)', content)
-  patch_match = re.search('PATCH (\d+)', content)
-  if major_match and minor_match and build_match and patch_match:
-    return (major_match.group(1), minor_match.group(1), build_match.group(1),
-            patch_match.group(1))
+  channel_match = re.search(
+      '^CHANNEL ([A-Za-z0-9]+)$', content, flags=re.MULTILINE)
+  major_match = re.search('^MAJOR (\d+)$', content, flags=re.MULTILINE)
+  minor_match = re.search('^MINOR (\d+)$', content, flags=re.MULTILINE)
+  build_match = re.search('^BUILD (\d+)$', content, flags=re.MULTILINE)
+  patch_match = re.search('^PATCH (\d+)$', content, flags=re.MULTILINE)
+  if (channel_match and
+      major_match and
+      minor_match and
+      build_match and
+      patch_match):
+    return (channel_match.group(1), major_match.group(1), minor_match.group(1),
+            build_match.group(1), patch_match.group(1))
   else:
     print "Warning: VERSION file (%s) has wrong format" % version_file
     return None