# HG changeset patch # User Gregory Szorc # Date 2019-02-04 17:07:00 # Node ID 0f64091cc85163856f50b9bcf9f850c562d6a97a # Parent bd3f03d8cc9fe098868e01f7ed727dbf095907bc global: make some docstrings raw strings Python 3.8 emits a SyntaxWarning when a str/bytes contains invalid \ escapes. Various docstrings in our code base contain invalid \ escapes. This commit turns those docstrings into raw strings. Differential Revision: https://phab.mercurial-scm.org/D5816 diff --git a/hgext/rebase.py b/hgext/rebase.py --- a/hgext/rebase.py +++ b/hgext/rebase.py @@ -1278,7 +1278,7 @@ def rebasenode(repo, rev, p1, base, coll return stats def adjustdest(repo, rev, destmap, state, skipped): - """adjust rebase destination given the current rebase state + r"""adjust rebase destination given the current rebase state rev is what is being rebased. Return a list of two revs, which are the adjusted destinations for rev's p1 and p2, respectively. If a parent is diff --git a/mercurial/bookmarks.py b/mercurial/bookmarks.py --- a/mercurial/bookmarks.py +++ b/mercurial/bookmarks.py @@ -44,7 +44,7 @@ def _getbkfile(repo): return fp class bmstore(object): - """Storage for bookmarks. + r"""Storage for bookmarks. This object should do all bookmark-related reads and writes, so that it's fairly simple to replace the storage underlying diff --git a/mercurial/dagop.py b/mercurial/dagop.py --- a/mercurial/dagop.py +++ b/mercurial/dagop.py @@ -142,7 +142,7 @@ def _genrevancestors(repo, revs, followf def revancestors(repo, revs, followfirst=False, startdepth=None, stopdepth=None, cutfunc=None): - """Like revlog.ancestors(), but supports additional options, includes + r"""Like revlog.ancestors(), but supports additional options, includes the given revs themselves, and returns a smartset Scan ends at the stopdepth (exlusive) if specified. Revisions found diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -666,7 +666,7 @@ class buildhgexe(build_ext): self.addlongpathsmanifest() def addlongpathsmanifest(self): - """Add manifest pieces so that hg.exe understands long paths + r"""Add manifest pieces so that hg.exe understands long paths This is an EXPERIMENTAL feature, use with care. To enable long paths support, one needs to do two things: