changeset 12:a7bf37a97a1b

Clean the 'HG:' lines from the commit message (apparently 'hg commit' doesn't do it with -o).
author Ludovic Chabant <ludovic@chabant.com>
date Mon, 12 Dec 2011 15:59:15 -0800
parents b4baab0a4a92
children 298261c939b3
files plugin/lawrencium.vim
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugin/lawrencium.vim	Mon Dec 12 15:21:20 2011 -0800
+++ b/plugin/lawrencium.vim	Mon Dec 12 15:59:15 2011 -0800
@@ -468,8 +468,14 @@
         return
     endif
 
+    call s:trace("Committing with log file: " . a:log_file)
+
+    " Clean up all the 'HG:' lines from the commit message.
+    let l:lines = readfile(a:log_file)
+    call filter(l:lines, "v:val !~# '\\v^HG:'")
+    call writefile(l:lines, a:log_file)
+
     " Get the repo and commit with the given message.
-    call s:trace("Committing with log file: " . a:log_file)
     let l:repo = s:hg_repo()
     let l:output = l:repo.RunCommand('commit', '-l', a:log_file)
     if a:show_output