# HG changeset patch # User Raphaël Gomès # Date 1565082436 -7200 # Node ID 16c1398b006312b555b580ee9d9cc0c8edaad1d7 # Parent fa534a8c58634442662c3c141494de537248da47 python3: prefix all regex to work with python 2 and 3 diff -r fa534a8c5863 -r 16c1398b0063 docs/test2rst.py --- a/docs/test2rst.py Tue Aug 06 00:16:05 2019 +0200 +++ b/docs/test2rst.py Tue Aug 06 11:07:16 2019 +0200 @@ -14,10 +14,10 @@ ''' ignored_patterns = [ - re.compile('^#if'), - re.compile('^#else'), - re.compile('^#endif'), - re.compile('#rest-ignore$'), + re.compile(r'^#if'), + re.compile(r'^#else'), + re.compile(r'^#endif'), + re.compile(r'#rest-ignore$'), ] diff -r fa534a8c5863 -r 16c1398b0063 hgext3rd/evolve/evolvecmd.py --- a/hgext3rd/evolve/evolvecmd.py Tue Aug 06 00:16:05 2019 +0200 +++ b/hgext3rd/evolve/evolvecmd.py Tue Aug 06 11:07:16 2019 +0200 @@ -48,7 +48,7 @@ shorttemplate = utility.shorttemplate stacktemplate = utility.stacktemplate _bookmarksupdater = rewriteutil.bookmarksupdater -sha1re = re.compile(r'\b[0-9a-f]{6,40}\b') +sha1re = re.compile(br'\b[0-9a-f]{6,40}\b') eh = exthelper.exthelper() mergetoolopts = commands.mergetoolopts diff -r fa534a8c5863 -r 16c1398b0063 hgext3rd/evolve/exthelper.py --- a/hgext3rd/evolve/exthelper.py Tue Aug 06 00:16:05 2019 +0200 +++ b/hgext3rd/evolve/exthelper.py Tue Aug 06 11:07:16 2019 +0200 @@ -88,7 +88,7 @@ def _newdoregister(self, name, *args, **kwargs): if kwargs.pop('helpbasic', False): - name = '^' + name + name = r'^' + name return olddoregister(self, name, *args, **kwargs) self.command._doregister = _newdoregister diff -r fa534a8c5863 -r 16c1398b0063 hgext3rd/evolve/obshistory.py --- a/hgext3rd/evolve/obshistory.py Tue Aug 06 00:16:05 2019 +0200 +++ b/hgext3rd/evolve/obshistory.py Tue Aug 06 11:07:16 2019 +0200 @@ -766,11 +766,11 @@ BRANCHCHANGED = 1 << 6 # the branch changed METABLACKLIST = [ - re.compile('^__touch-noise__$'), - re.compile('^branch$'), - re.compile('^.*-source$'), - re.compile('^.*_source$'), - re.compile('^source$'), + re.compile(br'^__touch-noise__$'), + re.compile(br'^branch$'), + re.compile(br'^.*-source$'), + re.compile(br'^.*_source$'), + re.compile(br'^source$'), ] def ismetablacklisted(metaitem): diff -r fa534a8c5863 -r 16c1398b0063 hgext3rd/topic/__init__.py --- a/hgext3rd/topic/__init__.py Tue Aug 06 00:16:05 2019 +0200 +++ b/hgext3rd/topic/__init__.py Tue Aug 06 11:07:16 2019 +0200 @@ -264,8 +264,8 @@ return None context.basectx.topicidx = _contexttopicidx -stackrev = re.compile(r'^s\d+$') -topicrev = re.compile(r'^t\d+$') +stackrev = re.compile(br'^s\d+$') +topicrev = re.compile(br'^t\d+$') hastopicext = common.hastopicext