@@ -111,20 +111,17 @@ def main():
111
111
'project_name': 'locales',
112
112
}
113
113
"""
114
- l10n_subfolders = {}
114
+ l10n_subfolders = {
115
+ "gecko_strings" : "l10n" ,
116
+ "thunderbird" : "l10n" ,
117
+ }
115
118
116
- hg_path = config_parser .get ("config" , "local_hg" )
117
119
git_path = config_parser .get ("config" , "local_git" )
118
120
119
121
need_cleanup = False
120
122
for repository_id , repository in supported_repositories .items ():
121
- # Check if the folder exists as a Mercurial repository. If it doesn't
122
- # assume it's a Git repository.
123
123
print ("--\n Analyze: {}" .format (repository_id ))
124
- if os .path .isdir (os .path .join (hg_path , repository ["folder_name" ])):
125
- folder_path = os .path .join (hg_path , repository ["folder_name" ])
126
- else :
127
- folder_path = os .path .join (git_path , repository ["folder_name" ])
124
+ folder_path = os .path .join (git_path , repository ["folder_name" ])
128
125
129
126
folder_path = os .path .join (folder_path , l10n_subfolders .get (repository_id , "" ))
130
127
if not os .path .isdir (folder_path ):
@@ -146,11 +143,6 @@ def main():
146
143
# This folder is inside the repository but doesn't match
147
144
# any supported locale.
148
145
print ("{} is not a supported locale" .format (folder ))
149
- need_cleanup = True
150
- if args .delete :
151
- full_path = os .path .join (folder_path , folder )
152
- print ("Removing folder: {}" .format (full_path ))
153
- shutil .rmtree (full_path )
154
146
if not need_cleanup :
155
147
print ("Nothing to remove." )
156
148
0 commit comments