Mercurial > hg
comparison tests/drawdag.py @ 41542:8d4ee2d9ffb8
drawdag: use raw strings for docstrings
Avoids SyntaxWarning for invalid \ escape on Python 3.8.
Differential Revision: https://phab.mercurial-scm.org/D5827
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Mon, 04 Feb 2019 09:35:55 -0800 |
parents | 9a813e4c8406 |
children | 2e2076c8c25f |
comparison
equal
deleted
inserted
replaced
41541:595a67a301ee | 41542:8d4ee2d9ffb8 |
---|---|
320 for k, v in remaining.items(): | 320 for k, v in remaining.items(): |
321 if leaf in v: | 321 if leaf in v: |
322 v.remove(leaf) | 322 v.remove(leaf) |
323 | 323 |
324 def _getcomments(text): | 324 def _getcomments(text): |
325 """ | 325 r""" |
326 >>> [pycompat.sysstr(s) for s in _getcomments(br''' | 326 >>> [pycompat.sysstr(s) for s in _getcomments(br''' |
327 ... G | 327 ... G |
328 ... | | 328 ... | |
329 ... I D C F # split: B -> E, F, G | 329 ... I D C F # split: B -> E, F, G |
330 ... \ \| | # replace: C -> D -> H | 330 ... \ \| | # replace: C -> D -> H |
339 continue | 339 continue |
340 yield line.split(b' # ', 1)[1].split(b' # ')[0].strip() | 340 yield line.split(b' # ', 1)[1].split(b' # ')[0].strip() |
341 | 341 |
342 @command(b'debugdrawdag', []) | 342 @command(b'debugdrawdag', []) |
343 def debugdrawdag(ui, repo, **opts): | 343 def debugdrawdag(ui, repo, **opts): |
344 """read an ASCII graph from stdin and create changesets | 344 r"""read an ASCII graph from stdin and create changesets |
345 | 345 |
346 The ASCII graph is like what :hg:`log -G` outputs, with each `o` replaced | 346 The ASCII graph is like what :hg:`log -G` outputs, with each `o` replaced |
347 to the name of the node. The command will create dummy changesets and local | 347 to the name of the node. The command will create dummy changesets and local |
348 tags with those names to make the dummy changesets easier to be referred | 348 tags with those names to make the dummy changesets easier to be referred |
349 to. | 349 to. |