Mercurial > hg
diff mercurial/revlogutils/nodemap.py @ 44462:6aee0647e026
nodemap: fix missing r-prefix on regular expression
Looking at this regular expression, it's pretty obvious from reading
it that it wanted to match literal ., but since the r was missing on
the pattern it was matching any character. I guess we're just lucky
nothing bad happened as a result. This was automatically fixed by
pyupgrade, but I split it out into its own change because it seemed
important.
Differential Revision: https://phab.mercurial-scm.org/D8254
author | Augie Fackler <augie@google.com> |
---|---|
date | Fri, 06 Mar 2020 13:54:35 -0500 |
parents | 336ec75ed1ac |
children | 283fd803afa5 |
line wrap: on
line diff
--- a/mercurial/revlogutils/nodemap.py Fri Mar 06 23:04:58 2020 +0100 +++ b/mercurial/revlogutils/nodemap.py Fri Mar 06 13:54:35 2020 -0500 @@ -275,7 +275,7 @@ def _other_rawdata_filepath(revlog, docket): prefix = revlog.nodemap_file[:-2] - pattern = re.compile(b"(^|/)%s-[0-9a-f]+\.nd$" % prefix) + pattern = re.compile(br"(^|/)%s-[0-9a-f]+\.nd$" % prefix) new_file_path = _rawdata_filepath(revlog, docket) new_file_name = revlog.opener.basename(new_file_path) dirpath = revlog.opener.dirname(new_file_path)