# HG changeset patch # User Anton Shestakov # Date 1647186215 -10800 # Node ID fbbf69c71aa48820357e25837982275a4dcec11d # Parent fe8e88ea296d8624d725fc2747b45f02bbb9400f evolve: shorter code to write current topic diff -r fe8e88ea296d -r fbbf69c71aa4 hgext3rd/evolve/evolvecmd.py --- 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)