@@ -104,9 +104,9 @@ def get_revision_file(self, location: str) -> int:
104104 """Return revision for a file."""
105105 current_rev = self .cmd .info (location )
106106
107- _INI_RE = re .compile (r"^([^:]+):\s+(\S.*)$" , re .MULTILINE )
107+ INI_RE = re .compile (r"^([^:]+):\s+(\S.*)$" , re .MULTILINE )
108108
109- info_list = _INI_RE .findall (current_rev )
109+ info_list = INI_RE .findall (current_rev )
110110 return int (dict (info_list )["Revision" ])
111111
112112 def get_revision (self , location : Optional [str ] = None ) -> int :
@@ -165,10 +165,10 @@ def update_repo(
165165
166166 @classmethod
167167 def _get_svn_url_rev (cls , location : str ) -> tuple [Optional [str ], int ]:
168- _svn_xml_url_re = re .compile ('url="([^"]+)"' )
169- _svn_rev_re = re .compile (r'committed-rev="(\d+)"' )
170- _svn_info_xml_rev_re = re .compile (r'\s*revision="(\d+)"' )
171- _svn_info_xml_url_re = re .compile (r"<url>(.*)</url>" )
168+ svn_xml_url_re = re .compile (r 'url="([^"]+)"' )
169+ svn_rev_re = re .compile (r'committed-rev="(\d+)"' )
170+ svn_info_xml_rev_re = re .compile (r'\s*revision="(\d+)"' )
171+ svn_info_xml_url_re = re .compile (r"<url>(.*)</url>" )
172172
173173 entries_path = pathlib .Path (location ) / ".svn" / "entries"
174174 if entries_path .exists ():
@@ -184,11 +184,11 @@ def _get_svn_url_rev(cls, location: str) -> tuple[Optional[str], int]:
184184 url = entries [0 ][3 ]
185185 revs = [int (d [9 ]) for d in entries if len (d ) > 9 and d [9 ]] + [0 ]
186186 elif data .startswith ("<?xml" ):
187- match = _svn_xml_url_re .search (data )
187+ match = svn_xml_url_re .search (data )
188188 if not match :
189189 raise SvnUrlRevFormattingError (data = data )
190190 url = match .group (1 ) # get repository URL
191- revs = [int (m .group (1 )) for m in _svn_rev_re .finditer (data )] + [0 ]
191+ revs = [int (m .group (1 )) for m in svn_rev_re .finditer (data )] + [0 ]
192192 else :
193193 try :
194194 # Note that using get_remote_call_options is not necessary here
@@ -200,10 +200,10 @@ def _get_svn_url_rev(cls, location: str) -> tuple[Optional[str], int]:
200200 target = pathlib .Path (location ),
201201 xml = True ,
202202 )
203- match = _svn_info_xml_url_re .search (xml )
203+ match = svn_info_xml_url_re .search (xml )
204204 assert match is not None
205205 url = match .group (1 )
206- revs = [int (m .group (1 )) for m in _svn_info_xml_rev_re .finditer (xml )]
206+ revs = [int (m .group (1 )) for m in svn_info_xml_rev_re .finditer (xml )]
207207 except Exception :
208208 url , revs = None , []
209209
0 commit comments