diff --git a/mercurial/match.py b/mercurial/match.py
index 132470ee53fe4b81e4dce13ad58a215ed9e6f28e_bWVyY3VyaWFsL21hdGNoLnB5..bfbbf48d51e800e23afa3a3fa8b535d4050c0723_bWVyY3VyaWFsL21hdGNoLnB5 100644
--- a/mercurial/match.py
+++ b/mercurial/match.py
@@ -554,7 +554,7 @@
 
 
 class patternmatcher(basematcher):
-    """Matches a set of (kind, pat, source) against a 'root' directory.
+    r"""Matches a set of (kind, pat, source) against a 'root' directory.
 
     >>> kindpats = [
     ...     (b're', br'.*\.c$', b''),
@@ -1172,7 +1172,7 @@
 
 
 def patkind(pattern, default=None):
-    '''If pattern is 'kind:pat' with a known kind, return kind.
+    r'''If pattern is 'kind:pat' with a known kind, return kind.
 
     >>> patkind(br're:.*\.c$')
     're'