hgext3rd/topic/__init__.py
changeset 4812 67567d7f1174
parent 4807 ea8da5aa23c6
child 4814 48b30ff742cb
--- a/hgext3rd/topic/__init__.py	Tue Aug 06 11:35:09 2019 +0200
+++ b/hgext3rd/topic/__init__.py	Tue Aug 06 15:06:27 2019 +0200
@@ -923,7 +923,7 @@
 
     if newtopic:
         with repo.wlock():
-            with repo.vfs.open(r'topic', r'w') as f:
+            with repo.vfs.open(b'topic', b'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(r'topic', r'w') as f:
+            with repo.vfs.open(b'topic', b'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(r'topic', r'w') as f:
+            with repo.vfs.open(b'topic', b'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(r'topic', r'w') as f:
+            with repo.vfs.open(b'topic', b'w') as f:
                 f.write(t)
             if t and t != ot:
                 repo.ui.status(_("switching to topic %s\n") % t)