1
1
" Vim script
2
2
" Author: Peter Odding <peter@peterodding.com>
3
- " Last Change: May 26 , 2011
3
+ " Last Change: September 4 , 2011
4
4
" URL: http://peterodding.com/code/vim/publish/
5
5
6
+ let g: xolox #publish#version = ' 1.7.3'
7
+
6
8
function ! xolox#publish#resolve_files (directory , pathnames) " {{{1
7
9
" Create a dictionary that maps the fully resolved pathnames of the files to
8
10
" be published to the absolute pathnames provided by the user. This enables
@@ -47,21 +49,21 @@ function! xolox#publish#find_tags(files_to_publish) " {{{1
47
49
let tag_name = string (entry.name)
48
50
let this_path = string (entry.filename)
49
51
let other_path = string (other.filename)
50
- let msg = " publish.vim: Ignoring duplicate tag %s! (duplicate is in %s, first was in %s)"
51
- call xolox#misc#msg#warn (msg, tag_name, this_path, other_path)
52
+ let msg = " publish.vim %s : Ignoring duplicate tag %s! (duplicate is in %s, first was in %s)"
53
+ call xolox#misc#msg#warn (msg, g: xolox #publish# version , tag_name, this_path, other_path)
52
54
endif
53
55
endif
54
56
endif
55
57
endfor
56
58
if num_duplicates > 3
57
59
let more = num_duplicates - 3
58
- let msg = " publish.vim: Ignored %s more duplicate tag%s!"
59
- call xolox#misc#msg#warn (msg, more , more == 1 ? ' ' : ' s' )
60
+ let msg = " publish.vim: %s Ignored %s more duplicate tag%s!"
61
+ call xolox#misc#msg#warn (msg, g: xolox #publish# version , more , more == 1 ? ' ' : ' s' )
60
62
endif
61
63
unlet s: cached_contents
62
- let msg = " publish.vim: Found %i tag%s to publish in %s."
64
+ let msg = " publish.vim %s : Found %i tag%s to publish in %s."
63
65
let numtags = len (tags_to_publish)
64
- call xolox#misc#timer#stop (msg, numtags, numtags != 1 ? ' s' : ' ' , start )
66
+ call xolox#misc#timer#stop (msg, g: xolox #publish# version , numtags, numtags != 1 ? ' s' : ' ' , start )
65
67
return tags_to_publish
66
68
endfunction
67
69
@@ -147,17 +149,17 @@ function! xolox#publish#rsync_check(target) " {{{1
147
149
endif
148
150
endif
149
151
endif
150
- call xolox#misc#timer#stop (" publish.vim: Checked rsync support in %s." , start )
152
+ call xolox#misc#timer#stop (" publish.vim %s : Checked rsync support in %s." , g: xolox #publish# version , start )
151
153
return result
152
154
endfunction
153
155
154
156
function ! xolox#publish#run_rsync (target, tempdir) " {{{1
155
157
let start = xolox#misc#timer#start ()
156
158
let target = fnameescape (a: target . ' /' )
157
159
let tempdir = fnameescape (a: tempdir . ' /' )
158
- call xolox#misc#msg#info (" publish.vim: Uploading files to %s using rsync." , a: target )
160
+ call xolox#misc#msg#info (" publish.vim %s : Uploading files to %s using rsync." , g: xolox #publish# version , a: target )
159
161
execute ' !rsync -vr' tempdir target
160
- call xolox#misc#timer#stop (" publish.vim: Finished uploading in %s." , start )
162
+ call xolox#misc#timer#stop (" publish.vim %s : Finished uploading in %s." , g: xolox #publish# version , start )
161
163
if v: shell_error
162
164
throw " publish.vim: Failed to run rsync!"
163
165
endif
@@ -174,12 +176,12 @@ function! xolox#publish#create_dirs(target_path) " {{{1
174
176
if ! isdirectory (current_directory)
175
177
let msg = " Failed to create directory %s! What now?"
176
178
if confirm (printf (msg, string (current_directory)), " &Abort\n &Ignore" ) == 1
177
- let msg = " publish.vim: Failed to create %s, aborting .."
178
- call xolox#misc#msg#warn (msg, string (current_directory))
179
+ let msg = " publish.vim %s : Failed to create %s, aborting .."
180
+ call xolox#misc#msg#warn (msg, g: xolox #publish# version , string (current_directory))
179
181
return 0
180
182
else
181
- let msg = " publish.vim: Failed to create %s, ignoring .."
182
- call xolox#misc#msg#warn (msg, string (current_directory))
183
+ let msg = " publish.vim %s : Failed to create %s, ignoring .."
184
+ call xolox#misc#msg#warn (msg, g: xolox #publish# version , string (current_directory))
183
185
continue
184
186
endif
185
187
endif
0 commit comments