This revision was automatically updated to reflect the committed changes.
Closed by commit rHGbe73fa5b42d3: histedit: modernize write of
histedit-last-edit file (authored by durin42, committed by ).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D2241?vs=5663&id=5677
REVISION DETAIL
https://phab.mercurial-scm.org/D2241
AFFECTED FILES
hgext/histedit.py
CHANGE DETAILS
diff --git a/hgext/histedit.py b/hgext/histedit.py
--- a/hgext/histedit.py
+++ b/hgext/histedit.py
@@ -1415,9 +1415,8 @@
# Save edit rules in .hg/histedit-last-edit.txt in case
# the user needs to ask for help after something
# surprising happens.
-f = open(repo.vfs.join('histedit-last-edit.txt'), 'w')
-f.write(rules)
-f.close()
+with repo.vfs('histedit-last-edit.txt', 'wb') as f:
+f.write(rules)
return rules
To: durin42, #hg-reviewers, indygreg
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel