|
|
6646c7 |
--- vim70/runtime/ftplugin/spec.vim.rh1 2006-05-10 19:37:45.000000000 +0200
|
|
|
6646c7 |
+++ vim70/runtime/ftplugin/spec.vim 2006-11-13 12:21:32.000000000 +0100
|
|
|
6646c7 |
@@ -18,11 +18,18 @@
|
|
|
6646c7 |
|
|
|
6646c7 |
if !exists("*s:SpecChangelog")
|
|
|
6646c7 |
function s:SpecChangelog(format)
|
|
|
6646c7 |
+ let save_time = v:lc_time
|
|
|
6646c7 |
if strlen(a:format) == 0
|
|
|
6646c7 |
if !exists("g:spec_chglog_format")
|
|
|
6646c7 |
- let email = input("Email address: ")
|
|
|
6646c7 |
- let g:spec_chglog_format = "%a %b %d %Y " . l:email
|
|
|
6646c7 |
- echo "\r"
|
|
|
6646c7 |
+ if !exists("g:packager")
|
|
|
6646c7 |
+ let email = input("Email address: ")
|
|
|
6646c7 |
+ let g:spec_chglog_format = "%a %b %d %Y " . l:email
|
|
|
6646c7 |
+ echo "\r"
|
|
|
6646c7 |
+ else
|
|
|
6646c7 |
+ let email = g:packager
|
|
|
6646c7 |
+ let g:spec_chglog_format = "%a %b %d %Y " . l:email
|
|
|
6646c7 |
+ echo "\r"
|
|
|
6646c7 |
+ endif
|
|
|
6646c7 |
endif
|
|
|
6646c7 |
let format = g:spec_chglog_format
|
|
|
6646c7 |
else
|
|
|
6646c7 |
@@ -58,7 +65,7 @@
|
|
|
6646c7 |
let line = line+1
|
|
|
6646c7 |
endwhile
|
|
|
6646c7 |
if (nameline != -1 && verline != -1 && relline != -1)
|
|
|
6646c7 |
- let include_release_info = exists("g:spec_chglog_release_info")
|
|
|
6646c7 |
+ let include_release_info = 1
|
|
|
6646c7 |
let name = s:ParseRpmVars(name, nameline)
|
|
|
6646c7 |
let ver = s:ParseRpmVars(ver, verline)
|
|
|
6646c7 |
let rel = s:ParseRpmVars(rel, relline)
|
|
|
6646c7 |
@@ -79,8 +86,10 @@
|
|
|
6646c7 |
endif
|
|
|
6646c7 |
endif
|
|
|
6646c7 |
if (chgline != -1)
|
|
|
6646c7 |
+ execute "language time C"
|
|
|
6646c7 |
let parsed_format = "* ".strftime(format)
|
|
|
6646c7 |
- let release_info = "+ ".name."-".ver."-".rel
|
|
|
6646c7 |
+ execute "language time " . save_time
|
|
|
6646c7 |
+ let release_info = ver."-".rel
|
|
|
6646c7 |
let wrong_format = 0
|
|
|
6646c7 |
let wrong_release = 0
|
|
|
6646c7 |
let insert_line = 0
|
|
|
6646c7 |
@@ -97,15 +106,14 @@
|
|
|
6646c7 |
execute relline
|
|
|
6646c7 |
normal ?
|
|
|
6646c7 |
let rel = substitute(strpart(getline(relline),8), '^[ ]*\([^ ]\+\)[ ]*$','\1','')
|
|
|
6646c7 |
- let release_info = "+ ".name."-".ver."-".rel
|
|
|
6646c7 |
+ let release_info = ver."-".rel
|
|
|
6646c7 |
endif
|
|
|
6646c7 |
endif
|
|
|
6646c7 |
let n = 0
|
|
|
6646c7 |
- call append(chgline+n, parsed_format)
|
|
|
6646c7 |
if include_release_info
|
|
|
6646c7 |
- let n = n + 1
|
|
|
6646c7 |
- call append(chgline+n, release_info)
|
|
|
6646c7 |
+ let parsed_format = parsed_format." ".release_info
|
|
|
6646c7 |
endif
|
|
|
6646c7 |
+ call append(chgline+n, parsed_format)
|
|
|
6646c7 |
let n = n + 1
|
|
|
6646c7 |
call append(chgline+n,"- ")
|
|
|
6646c7 |
let n = n + 1
|