# HG changeset patch # User Mykola Nikishov # Date 2015-11-21 15:40:26 # Node ID 3bc7919fb215cadf30672221d482d0908706c2aa # Parent 3553e40d077085b43cf5cddac1b9aa95e41445f0 histedit: edit with custom filename For instance, Emacs allows to open file with special features enabled (AKA mode) based on the path/name of the file [1]. For such cases, use 'hg-histedit-XXX.txt' as filename pattern. [1] https://www.gnu.org/software/emacs/manual/html_node/emacs/Choosing-Modes.html diff --git a/hgext/histedit.py b/hgext/histedit.py --- a/hgext/histedit.py +++ b/hgext/histedit.py @@ -1126,7 +1126,7 @@ def ruleeditor(repo, ui, rules, editcomm rules = '\n'.join([makedesc(repo, act, rev) for [act, rev] in rules]) rules += '\n\n' rules += editcomment - rules = ui.edit(rules, ui.username()) + rules = ui.edit(rules, ui.username(), {'prefix': 'histedit'}) # Save edit rules in .hg/histedit-last-edit.txt in case # the user needs to ask for help after something