bug 988611 - update script based on ff 28; r=aki
authorHal Wine <hwine@mozilla.com>
Fri, 04 Apr 2014 14:47:12 -0700
changeset 375 9c268cdab9bda4cd16ba709ad88413bf6edb320c
parent 374 2825976a562b13c2a73aeb2c9191757755cb7168
child 376 db46bab40c82b9d9fe47de3dd6b2ae9e9543f036
push id352
push userhwine@mozilla.com
push dateFri, 04 Apr 2014 21:47:30 +0000
reviewersaki
bugs988611
bug 988611 - update script based on ff 28; r=aki
releases-related/beta2release.py
--- a/releases-related/beta2release.py
+++ b/releases-related/beta2release.py
@@ -41,17 +41,17 @@ def file_replace(fname, pat, s_after):
 
     except IOError:
         print fname, "does not exist"
         return False
 
 
 def get_user_input():
     #Reading Version number
-    version = raw_input("Enter the current Release Version ( eg : 24.0 , including a chemspill version if exists) \n")
+    version = raw_input("Enter the currently shipping Release Version (eg : 27.0.1) \n")
     print "you entered ", version
     hg_user = raw_input("Enter the mercurial user name in the form \"username <email@mozilla.com>\" you will use to commit changes\n")
     print "the username you entered is", hg_user
     # make sure to quote it
     if '"' not in hg_user:
         hg_user = '"%s"' % hg_user
     return version,hg_user
 
@@ -60,26 +60,26 @@ def get_rev(repo):
     try:
         rev = subprocess.check_output('hg id -R ' + repo + ' -i -r default', shell=True)
         return rev.rstrip()
     except:
         print "get_rev: Unexpected error"
         raise
 
 def tag_repo(repo, tag, rev, user):
-    cmd = 'hg tag -R ' + repo  + ' -r ' + rev + ' -u ' + user + ' -m ' +'" Added tag ' + tag + ' for changeset CLOSED TREE a=release " ' + tag
+    cmd = 'hg tag -R ' + repo  + ' -r ' + rev + ' -u ' + user + ' -m ' +'" Added tag ' + tag + ' for changeset CLOSED TREE DONTBUILD a=release " ' + tag
     run(cmd)
 
 def commit_repo(repo, user, old_head, new_head):
     print " Commiting mozilla repo " + repo
     # "Merge" the old head, rather than closing it, to avoid
     # non-fastforward issues in vcs-sync
     cmd = 'hg -R %s debugsetparents %s %s' % (repo, new_head, old_head)
     run(cmd)
-    cmd = 'hg -R %s commit -m "Merging old head via |hg debugsetparents %s %s|. CLOSED TREE a=release" -u %s' % (repo, new_head, old_head, user)
+    cmd = 'hg -R %s commit -m "Merging old head via |hg debugsetparents %s %s|. CLOSED TREE DONTBUILD a=release" -u %s' % (repo, new_head, old_head, user)
     run(cmd)
 
 def pull_up_repo(repo_beta, repo_release):
     print "pulling all changes from mozilla-beta into into mozilla-release\n"
     cmd = 'hg -R ' + repo_release  + ' pull ' + repo_beta
     run(cmd)
     print "updating mozilla-release\n"
     cmd = 'hg -R '+ repo_release + ' up -C default'
@@ -93,18 +93,18 @@ def clone(repo, dest):
         run("hg -R %s update -C" % dest)
     else:
         run("hg clone %s %s" % (repo, dest))
 
 def main():
     #Clone Repos
     mozilla_release = "./mozilla-release/"
     mozilla_beta = "./mozilla-beta/"
-    clone("http://hg.mozilla.org/releases/mozilla-release", mozilla_release)
-    clone("http://hg.mozilla.org/releases/mozilla-beta", mozilla_beta)
+    clone("https://hg.mozilla.org/releases/mozilla-release", mozilla_release)
+    clone("https://hg.mozilla.org/releases/mozilla-beta", mozilla_beta)
 
     # TODO: we can read the current version from the beta repo
     version, hg_user = get_user_input()
     user_input = raw_input("Enter yes to begin with beta -> release merge day changes or no to exit\n")
     if user_input.lower() != "yes":
         print "Exiting now\n"
         return
 
@@ -121,16 +121,17 @@ def main():
     #Tagging
     print "RUNNING: tag_repo(%s, %s, %s, %s)" % (mozilla_beta, release_base_tag, beta_rev, hg_user)
     tag_repo(mozilla_beta, release_base_tag, beta_rev, hg_user)
     print "You have finished tagging mozilla-beta, now go ahead and push the mozilla-beta repo\n"
     user_input1 = raw_input("Enter yes to continue if you have finished pushing mozilla-beta\n")
     if  user_input1.lower() != "yes" :
         print "Exiting now\n"
         return
+    # TODO verify hg -r mozilla_beta out produces nothing
 
     #Commit,pull and update
     mozilla_release_revision = get_rev(mozilla_release)
     print "MOZILLA_RELEASE_REVISION = " + mozilla_release_revision
     mozilla_beta_revision = get_rev(mozilla_beta)
     print "MOZILLA_BETA_REVISION = " + mozilla_beta_revision
     print "RUNNING: pull_up_repo(%s, %s)" % (mozilla_beta, mozilla_release)
     pull_up_repo(mozilla_beta, mozilla_release)
@@ -138,17 +139,18 @@ def main():
     commit_repo(mozilla_release, hg_user, mozilla_release_revision, mozilla_beta_revision)
     # If we tag, eralier, debugsetparent ignores it
     print "RUNNING: tag_repo(%s, %s, %s, %s)" % (mozilla_release, release_tag, release_rev, hg_user)
     tag_repo(mozilla_release, release_tag, release_rev, hg_user)
 
 
 #Edit desktop config
 
-    raw_input("If you are ready to start with mozconfig changes, hit 'return' to continue...")
+    print "Code merge and tagging are complete."
+    print "Starting the channel & branding changes."
 
     if not file_replace(mozilla_release+"browser/confvars.sh", "ACCEPTED_MAR_CHANNEL_IDS=firefox-mozilla-beta,firefox-mozilla-release", "ACCEPTED_MAR_CHANNEL_IDS=firefox-mozilla-release"):
         print "Failed to replace channel ids in desktop config"
 
     if not file_replace(mozilla_release+"browser/confvars.sh", "MAR_CHANNEL_ID=firefox-mozilla-beta", "MAR_CHANNEL_ID=firefox-mozilla-release"):
         print "Failed to replace MAR_CHANNEL_ID in desktop config"
 
 #Edit mobile mozconfigs
@@ -156,21 +158,23 @@ def main():
     release_branding_dirs = ["mobile/android/config/mozconfigs/android/","mobile/android/config/mozconfigs/android-armv6/","mobile/android/config/mozconfigs/android-x86/"]
     release_branding_files = ["release","l10n-release","l10n-nightly","nightly"]
 
     for bbd in release_branding_dirs:
         for bbf in release_branding_files:
             if not file_replace(mozilla_release+bbd+bbf, "ac_add_options --with-branding=mobile/android/branding/beta", "ac_add_options --with-branding=mobile/android/branding/official"):
                 print "Failed to replace edots relating to Branding dir's in mobile mozconfig"
 
-    print("Now, go edit any mozilla-release/browser/locales/shipped-locales file if you need to remove some beta locales (eg: mn, sw)")
-    time.sleep(10)
-    raw_input("Hit 'return' to continue to diff's ...")
+    print "Now, go edit any mozilla-release/browser/locales/shipped-locales file if you need to remove some beta locales (eg: mn, sw)"
+    print "Also apply any manual edits, such as disabling features."
+    raw_input("Hit 'return' to display channel, branding, and feature diffs onscreen")
     cmd = 'hg diff -R '+ mozilla_release
     run(cmd)
-    raw_input("if the diff looks good hit return to continue to commit")
-    cmd = 'hg commit -R '+ mozilla_release + ' -u ' + hg_user +' -m "Updating configs CLOSED TREE a=release ba=release"'
+    print
+    print "Double check the diff above."
+    raw_input("If the diff looks good hit return to commit those changes:")
+    cmd = 'hg commit -R '+ mozilla_release + ' -u ' + hg_user +' -m "Updating configs CLOSED TREE DONTBUILD a=release ba=release"'
     run(cmd)
 
-    raw_input("Go ahead and push mozilla-release changes and you are done.")
+    print "Go ahead and push mozilla-release changes."
 
 if __name__ == "__main__":
     main()