# HG changeset patch # User Gregory Szorc # Date 1549300020 28800 # 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 -r bd3f03d8cc9f -r 0f64091cc851 hgext/rebase.py --- a/hgext/rebase.py Mon Feb 04 08:54:30 2019 -0800 +++ b/hgext/rebase.py Mon Feb 04 09:07:00 2019 -0800 @@ -1278,7 +1278,7 @@ 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 -r bd3f03d8cc9f -r 0f64091cc851 mercurial/bookmarks.py --- a/mercurial/bookmarks.py Mon Feb 04 08:54:30 2019 -0800 +++ b/mercurial/bookmarks.py Mon Feb 04 09:07:00 2019 -0800 @@ -44,7 +44,7 @@ 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 -r bd3f03d8cc9f -r 0f64091cc851 mercurial/dagop.py --- a/mercurial/dagop.py Mon Feb 04 08:54:30 2019 -0800 +++ b/mercurial/dagop.py Mon Feb 04 09:07:00 2019 -0800 @@ -142,7 +142,7 @@ 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 -r bd3f03d8cc9f -r 0f64091cc851 setup.py --- a/setup.py Mon Feb 04 08:54:30 2019 -0800 +++ b/setup.py Mon Feb 04 09:07:00 2019 -0800 @@ -666,7 +666,7 @@ 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: