# HG changeset patch # User Raphaël Gomès # Date 1565083921 -7200 # Node ID ea8da5aa23c6e723d7f0006387a1a20eef58fc9a # Parent 44629ae21b845071bfcb1b6336c74408a3ac4c46 python3: add raw prefix to open()-like functions diff -r 44629ae21b84 -r ea8da5aa23c6 hgext3rd/evolve/evolvecmd.py --- a/hgext3rd/evolve/evolvecmd.py Tue Aug 06 11:30:45 2019 +0200 +++ b/hgext3rd/evolve/evolvecmd.py Tue Aug 06 11:32:01 2019 +0200 @@ -1057,7 +1057,7 @@ if not orig.topic() and repo.vfs.exists('topic'): repo.vfs.unlink('topic') else: - with repo.vfs.open('topic', 'w') as f: + with repo.vfs.open(r'topic', r'w') as f: f.write(orig.topic()) return merge.graft(repo, orig, pctx, ['destination', 'evolving'], True) diff -r 44629ae21b84 -r ea8da5aa23c6 hgext3rd/pullbundle.py --- a/hgext3rd/pullbundle.py Tue Aug 06 11:30:45 2019 +0200 +++ b/hgext3rd/pullbundle.py Tue Aug 06 11:32:01 2019 +0200 @@ -436,7 +436,7 @@ # opening too many file will not work. def data(): - with open(bundlepath, 'rb') as fd: + with open(bundlepath, r'rb') as fd: for chunk in util.filechunkiter(fd): yield chunk return data() diff -r 44629ae21b84 -r ea8da5aa23c6 hgext3rd/topic/__init__.py --- a/hgext3rd/topic/__init__.py Tue Aug 06 11:30:45 2019 +0200 +++ b/hgext3rd/topic/__init__.py Tue Aug 06 11:32:01 2019 +0200 @@ -923,7 +923,7 @@ if newtopic: with repo.wlock(): - with repo.vfs.open('topic', 'w') as f: + with repo.vfs.open(r'topic', r'w') as f: f.write(newtopic) else: if repo.vfs.exists('topic'): @@ -1185,7 +1185,7 @@ hint = _("see 'hg help -e topic.topic-mode' for details") if opts.get('topic'): t = opts['topic'] - with repo.vfs.open('topic', 'w') as f: + with repo.vfs.open(r'topic', r'w') as f: f.write(t) elif opts.get('amend'): pass @@ -1197,7 +1197,7 @@ if not ui.quiet: ui.warn(("(%s)\n") % hint) elif notopic and mayrandom: - with repo.vfs.open('topic', 'w') as f: + with repo.vfs.open(r'topic', r'w') as f: f.write(randomname.randomtopicname(ui)) return orig(ui, repo, *args, **opts) @@ -1241,7 +1241,7 @@ pctx = repo[node] if pctx.phase() > phases.public: t = pctx.topic() - with repo.vfs.open('topic', 'w') as f: + with repo.vfs.open(r'topic', r'w') as f: f.write(t) if t and t != ot: repo.ui.status(_("switching to topic %s\n") % t)