Patchwork D6672: automation: extract strings to constants

login
register
mail settings
Submitter phabricator
Date July 23, 2019, 2:21 a.m.
Message ID <differential-rev-PHID-DREV-264xmlkpkyn3t5n2xivv-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/41009/
State Superseded
Headers show

Comments

phabricator - July 23, 2019, 2:21 a.m.
indygreg created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D6672

AFFECTED FILES
  contrib/automation/hgautomation/aws.py

CHANGE DETAILS




To: indygreg, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/contrib/automation/hgautomation/aws.py b/contrib/automation/hgautomation/aws.py
--- a/contrib/automation/hgautomation/aws.py
+++ b/contrib/automation/hgautomation/aws.py
@@ -52,10 +52,14 @@ 
 }
 
 
+AMAZON_ACCOUNT_ID = '801119661308'
 DEBIAN_ACCOUNT_ID = '379101102735'
 UBUNTU_ACCOUNT_ID = '099720109477'
 
 
+WINDOWS_BASE_IMAGE_NAME = 'Windows_Server-2019-English-Full-Base-2019.07.12'
+
+
 KEY_PAIRS = {
     'automation',
 }
@@ -1046,9 +1050,7 @@ 
 
     name = '%s%s' % (prefix, 'windows-dev')
 
-    image = find_image(ec2resource,
-                       '801119661308',
-                       'Windows_Server-2019-English-Full-Base-2019.07.12')
+    image = find_image(ec2resource, AMAZON_ACCOUNT_ID, WINDOWS_BASE_IMAGE_NAME)
 
     config = {
         'BlockDeviceMappings': [