changeset 6203:fbbf69c71aa4

evolve: shorter code to write current topic
author Anton Shestakov <av6@dwimlabs.net>
date Sun, 13 Mar 2022 18:43:35 +0300
parents fe8e88ea296d
children 364ef033da03
files hgext3rd/evolve/evolvecmd.py
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/evolve/evolvecmd.py	Sun Mar 13 18:21:57 2022 +0300
+++ b/hgext3rd/evolve/evolvecmd.py	Sun Mar 13 18:43:35 2022 +0300
@@ -1001,8 +1001,7 @@
         if not orig.topic() and repo.vfs.exists(b'topic'):
             repo.vfs.unlink(b'topic')
         else:
-            with repo.vfs.open(b'topic', b'w') as f:
-                f.write(orig.topic())
+            repo.vfs.write(b'topic', orig.topic())
 
     stats = merge.graft(repo, orig, pctx, [b'destination', b'evolving'], True)