comparison autoload/lawrencium/commit.vim @ 140:652a6f5df0f3

Fixed for broken things after the reorganization.
author Ludovic Chabant <ludovic@chabant.com>
date Mon, 13 Jun 2016 21:55:40 -0700
parents 065625e1bb31
children
comparison
equal deleted inserted replaced
139:065625e1bb31 140:652a6f5df0f3
18 let l:filenames = a:1 18 let l:filenames = a:1
19 endif 19 endif
20 endif 20 endif
21 21
22 " Open a commit message file. 22 " Open a commit message file.
23 let l:commit_path = s:tempname('hg-editor-', '.txt') 23 let l:commit_path = lawrencium#tempname('hg-editor-', '.txt')
24 let l:split = a:vertical ? 'vsplit' : 'split' 24 let l:split = a:vertical ? 'vsplit' : 'split'
25 execute l:split . ' ' . l:commit_path 25 execute l:split . ' ' . l:commit_path
26 call append(0, ['', '']) 26 call append(0, ['', ''])
27 call append(2, split(s:HgCommit_GenerateMessage(l:repo, l:filenames), '\n')) 27 call append(2, split(s:HgCommit_GenerateMessage(l:repo, l:filenames), '\n'))
28 call cursor(1, 1) 28 call cursor(1, 1)
110 endif 110 endif
111 111
112 call lawrencium#trace("Committing with log file: " . a:log_file) 112 call lawrencium#trace("Committing with log file: " . a:log_file)
113 113
114 " Clean all the 'HG: ' lines. 114 " Clean all the 'HG: ' lines.
115 let l:is_valid = s:clean_commit_file(a:log_file) 115 let l:is_valid = lawrencium#clean_commit_file(a:log_file)
116 if !l:is_valid 116 if !l:is_valid
117 call lawrencium#error("abort: Empty commit message") 117 call lawrencium#error("abort: Empty commit message")
118 return 118 return
119 endif 119 endif
120 120