1 " perforcebugrep.vim: Generate perforcebugrep.txt for perforce plugin.
2 " Author: Hari Krishna (hari_vim at yahoo dot com)
3 " Last Change: 29-Aug-2006 @ 17:57
5 " Requires: Vim-7.0, perforce.vim(4.0)
7 " Licence: This program is free software; you can redistribute it and/or
8 " modify it under the terms of the GNU General Public License.
9 " See http://www.gnu.org/copyleft/gpl.txt
11 if !exists("loaded_perforce")
12 runtime plugin/perforce.vim
14 if !exists("loaded_perforce") || loaded_perforce < 400
15 echomsg "perforcebugrep: You need a newer version of perforce.vim plugin"
19 " Make sure line-continuations won't cause any problem. This will be restored
24 " Based on $VIM/bugreport.vim
27 PFInitialize " Make sure it is autoloaded.
30 call delete('perforcebugrep.txt')
32 !echo "uname -a" >perforcebugrep.txt
33 !uname -a >>perforcebugrep.txt
36 redir >>perforcebugrep.txt
39 echo "Perforce plugin version: " . loaded_perforce
40 echo "Genutils plugin version: " . loaded_genutils
42 echo "--- Perforce Plugin Settings ---"
43 for nextSetting in perforce#PFGet('s:settings')
44 let value = perforce#PFCall('s:_', nextSetting)
45 echo nextSetting.': '.value
47 echo "s:p4Contexts: " . string(perforce#PFCall('s:_', 'Contexts'))
48 echo "g:p4CurDirExpr: " . perforce#PFCall('s:_', 'CurDirExpr')
49 echo "g:p4CurPresetExpr: " . perforce#PFCall('s:_', 'CurPresetExpr')
50 echo "s:p4Client: " . perforce#PFCall('s:_', 'Client')
51 echo "s:p4User: " . perforce#PFCall('s:_', 'User')
52 echo "s:p4Port: " . perforce#PFCall('s:_', 'Port')
54 echo "--- Current Buffer ---"
55 echo "Current buffer: " . expand('%')
56 echo "Current directory: " . getcwd()
57 let tempDir = perforce#PFCall('s:_', 'TempDir')
58 if isdirectory(tempDir)
59 echo 'temp directory "' . tempDir . '" exists'
61 echo 'temp directory "' . tempDir . '" does NOT exist'
63 if exists('b:p4OrgFileName')
64 echo 'b:p4OrgFileName: ' . b:p4OrgFileName
66 if exists('b:p4Command')
67 echo 'b:p4Command: ' . b:p4Command
69 if exists('b:p4Options')
70 echo 'b:p4Options: ' . b:p4Options
72 if exists('b:p4FullCmd')
73 echo 'b:p4FullCmd: '. b:p4FullCmd
75 if exists('g:p4FullCmd')
76 echo 'g:p4FullCmd: '. g:p4FullCmd
80 echo "--- p4 info ---"
81 let info = perforce#PFCall('perforce#PFIF', '1', '4', 'info')
82 " The above resets redir.
83 redir >>perforcebugrep.txt
97 " vim6:fdm=marker et sw=2