@@ -39,7 +39,7 @@ class FCMBase:
3939 Note that the version for Git has a small handful of methods, mostly
4040 internal and some propeties. These are kept as close as possible to
4141 version in git_bdiff.py.
42-
42+
4343 Attributes used to navigate the horros of FCM and thus used in this
4444 package are therefore preceded with an '_' and shouldn't be what is
4545 being referred to outwith this class. Nor should the original
@@ -60,7 +60,7 @@ def __init__(self, parent=None, repo=None):
6060 kind of 'discovery' that was necessary for FCM that is hoped to
6161 become outdated with Git.
6262 """
63-
63+
6464 # use_mirror checks for SOURCE_UM_MIRROR env var, and if set
6565 # redirects the branch to that value and sets retries.
6666 # Otherwise it returns the branch unchanged and retries=0
@@ -88,7 +88,7 @@ def get_branch_name(self):
8888 For now, define it to be the contants of the URL after .*/main/ has been
8989 stripped off. i.e. it will start with trunk/... or branches/...
9090 """
91-
91+
9292 pattern = rf"{ self .get_repository_root ()} /main/(.*)$"
9393 match = re .match (pattern , self ._branch_url )
9494 if match :
@@ -101,7 +101,7 @@ def run_fcm_command(self, command, max_retries, snooze):
101101 """
102102 Run an fcm command, optionally retrying on failure.
103103 """
104-
104+
105105 retries = 0
106106 while True :
107107 result = subprocess .run (
@@ -156,7 +156,7 @@ def get_branch_parent(self):
156156 Given the raw output from an fcm binfo command - which can be retrieved by
157157 calling get_branch_info() - returns the Branch Parent Field
158158 """
159-
159+
160160 parent = re .search (
161161 r"^Branch Parent:\s*(?P<parent>.*)$" ,
162162 self ._branch_info ,
@@ -182,7 +182,7 @@ def get_url(self):
182182 Given the raw output from an fcm binfo command - which can be retrieved
183183 by calling get_branch_info() - returns the URL field
184184 """
185-
185+
186186 url = re .search (r"^URL:\s*(?P<url>.*)$" , self ._branch_info , flags = re .MULTILINE )
187187 if url :
188188 url = url .group ("url" )
@@ -195,7 +195,7 @@ def is_trunk_test(self, url):
195195 Given an FCM url, returns True if it appears to be pointing to the
196196 UM main trunk
197197 """
198-
198+
199199 search = re .search (
200200 r"""
201201 (svn://fcm\d+/\w+_svn/\w+/trunk|
@@ -212,7 +212,7 @@ def get_repository_root(self):
212212 Given the raw output from an fcm binfo command - which can be retrieved by
213213 calling get_branch_info() - returns the Repository Root field
214214 """
215-
215+
216216 repos_root = re .search (
217217 r"^Repository Root:\s*(?P<url>.*)\s*$" ,
218218 self ._branch_info ,
@@ -229,7 +229,7 @@ def get_latest_commit(self):
229229 Given the raw output from an fcm binfo command - which can be retrieved by
230230 calling get_branch_info() - returns the Last Changed Rev
231231 """
232-
232+
233233 repos_rev = re .search (
234234 r"^Last Changed Rev:\s*(?P<rev>.*)\s*$" ,
235235 self ._branch_info ,
@@ -263,7 +263,7 @@ def has_diverged(self):
263263 Bit vague here, so we're going to check to see if 'parent' had
264264 an '@' in it denoting it's a branch of <something>
265265 """
266-
266+
267267 match = re .match (r".*@(\d+)$" , self .parent )
268268 if match :
269269 return True
@@ -272,7 +272,7 @@ def has_diverged(self):
272272
273273 def files (self ):
274274 """Iterate over files changed on the branch."""
275-
275+
276276 dem_danged_files = self ._get_files ()
277277 for line in dem_danged_files :
278278 if line != "" :
@@ -335,7 +335,7 @@ def get_bdiff_summarize(self, snooze=300, retries=0):
335335 (if the branch is the mirror, allow for a few retries in case
336336 it hasn't picked up the latest commit yet)
337337 """
338-
338+
339339 command = ["fcm" , "bdiff" , "--summarize" , self ._branch ]
340340 return self .run_fcm_command (command , retries , snooze )
341341
@@ -352,5 +352,5 @@ def __init__(self, branch_info: str):
352352
353353 def is_main (self ) -> bool :
354354 """Return True if the branch is the main trunk."""
355-
355+
356356 return self .is_trunk_test (self ._branch_url )
0 commit comments