Commits

ZyX_I committed 79117ff

Added glogmaps test, made D and C also close glog window

Comments (0)

Files changed (4)

ftplugin/aurumgraphlog.vim

     let cs=bvar.repo.changesets[hex]
     let epath=escape(bvar.repo.path, ':\')
     if a:0 && a:1
-        return ':e '.fnameescape(s:_r.os.path.join(bvar.repo.path, file))."\n".
+        return ":wincmd c\n:edit ".
+                    \fnameescape(s:_r.os.path.join(bvar.repo.path, file))."\n".
                     \':diffsplit '.fnameescape('aurum://file:'.epath.':'.
                     \                          hex.':'.file)."\n"
     elseif !empty(cs.parents)
-        return ':e '.fnameescape('aurum://file:'.epath.':'.hex.':'.file)."\n".
+        return ":wincmd c\n:edit ".
+                    \fnameescape('aurum://file:'.epath.':'.hex.':'.file)."\n".
                     \':diffsplit '.fnameescape('aurum://file:'.epath.':'.
                     \                          cs.parents[0].':'.file)."\n"
     endif
+:W{{{1 <CR>
+:R AuGlog
+:
+
+:call WriteFile(bufname('%'))
+:bwipeout!
+:W{{{1 branch <CR>
+:R AuGlog
+/(branch/e+2
+:
+
+:call WriteFile(bufname('%'))
+:bwipeout!
+:W{{{1 user <CR>
+:R AuGlog
+/\Vexample.com
+:
+
+:call WriteFile(bufname('%'))
+:bwipeout!
+:W{{{1 date <CR>
+:R AuGlog
+/Feb
+:
+
+:call WriteFile(bufname('%'))
+:bwipeout!
+:W{{{1 changeset <CR>
+:R AuGlog
+/\v\x{12}
+
+:call WriteFile(bufname('%'))
+:bwipeout!
+:W{{{1 gF
+:R AuGlog showfiles
+/Files: .*,/-1
+gF2
+:call WriteFile(bufname('%'))
+:bwipeout!
+:W{{{1 gF+files
+:R AuGlog showfiles
+/Files: /e+2
+gF:call WriteFile(bufname('%'))
+:bwipeout!
+:W{{{1 gu
+:R AuGlog
+gu:call WriteFile(bufname('%'))
+:bwipeout!
+:W{{{1 gD
+:R AuGlog
+gD:call WriteFile(bufname('%'))
+:bwipeout!
+:W{{{1 gb
+:R AuGlog
+/(branch A)
+gb:call WriteFile(bufname('%'))
+:bwipeout!
+:W{{{1 gr
+:R AuGlog
+/(branch A)
+gr:call WriteFile(bufname('%'))
+:bwipeout!
+:W{{{1 d
+:R AuGlog
+/ 1:\x\x\x
+d:call WriteFile(bufname('%'))
+:bwipeout!
+:W{{{1 c
+:R AuGlog
+/ 2:\x\x\x
+c:call WriteFile(bufname('%'))
+:bwipeout!
+:W{{{1 D
+:R AuGlog
+/ 1:\x\x\x
+D:call WriteFile(bufname('%'), 'w$: '.winnr('$'))
+:bwipeout!
+:bwipeout!
+:W{{{1 C
+:R AuGlog
+/ 2:\x\x\x
+C:call WriteFile(bufname('%'), 'w$: '.winnr('$'))
+:bwipeout!
+:bwipeout!
+:W{{{1 o+files
+:R AuGlog showfiles
+/Files: /e+2
+o:call WriteFile(bufname('%'))
+:bwipeout!
+:W{{{1 o
+:R AuGlog showfiles
+/Files: .*,/-1
+o2
+:call WriteFile(bufname('%'))
+:bwipeout!
+:W{{{1 cancel o
+:R AuGlog showfiles
+/Files: .*,/-1
+o0
+:call WriteFile(bufname('%'))
+:bwipeout!
+:source addmessages.vim
+{{{1 <CR>
+aurum://diff:%TMPDIR%/test/glogmapsrepo:bd8865085771912fc9ab56425f385a1751696ec1
+{{{1 branch <CR>
+aurum://glog:%TMPDIR%/test/glogmapsrepo:branch:A,crrestrict:branch
+{{{1 user <CR>
+aurum://glog:%TMPDIR%/test/glogmapsrepo:user:\VA <a@example.com>,crrestrict:user
+{{{1 date <CR>
+aurum://glog:%TMPDIR%/test/glogmapsrepo:date:2002-02,crrestrict:date
+{{{1 changeset <CR>
+aurum://glog:%TMPDIR%/test/glogmapsrepo:revision:bd8865085771912fc9ab56425f385a1751696ec1,crrestrict:revision
+{{{1 gF
+aurum://glog:%TMPDIR%/test/glogmapsrepo:showfiles:1,files:hglines.lst,crrestrict:files
+{{{1 gF+files
+aurum://glog:%TMPDIR%/test/glogmapsrepo:showfiles:1,files:.hgignore,crrestrict:files
+{{{1 gu
+aurum://glog:%TMPDIR%/test/glogmapsrepo:user:\VA <a@example.com>,crrestrict:user
+{{{1 gD
+aurum://glog:%TMPDIR%/test/glogmapsrepo:date:2002-02,crrestrict:date
+{{{1 gb
+aurum://glog:%TMPDIR%/test/glogmapsrepo:branch:A,crrestrict:branch
+{{{1 gr
+aurum://glog:%TMPDIR%/test/glogmapsrepo:revision:1992543408d3ea5517669672c604d27a4f2a98bf,crrestrict:revision
+{{{1 d
+aurum://diff:%TMPDIR%/test/glogmapsrepo::6a040abfa9457d6066c8469fab4f9e3ae1f3e494
+{{{1 c
+aurum://diff:%TMPDIR%/test/glogmapsrepo:1ddeac9b650f689aec0a77b68463ba9de40d9e01
+{{{1 D
+aurum://file:%TMPDIR%/test/glogmapsrepo:6a040abfa9457d6066c8469fab4f9e3ae1f3e494:crepo.zsh
+w$: 2
+{{{1 C
+aurum://file:%TMPDIR%/test/glogmapsrepo:6a040abfa9457d6066c8469fab4f9e3ae1f3e494:crepo.zsh
+w$: 2
+{{{1 o+files
+aurum://file:%TMPDIR%/test/glogmapsrepo:bd8865085771912fc9ab56425f385a1751696ec1:.hgignore
+{{{1 o
+aurum://file:%TMPDIR%/test/glogmapsrepo:a02f2fc6c51afe07a34bd65f5f8bb69d74105054:hglines.lst
+{{{1 cancel o
+aurum://glog:%TMPDIR%/test/glogmapsrepo:showfiles:1,
 syntax on
 let s:outfile=fnamemodify(g:outfile, ':p')
-function s:Run(bang, cmd)
+function s:Run(bang, write, cmd)
     let reporoot=g:curtest.'repo'
     if !a:bang
         if !isdirectory(reporoot)
     if !a:bang
         cd ..
     endif
-    execute 'silent write! >> '.fnameescape(s:outfile)
+    if a:write
+        execute 'silent write! >> '.fnameescape(s:outfile)
+    endif
 endfunction
-command -nargs=1 -bang Run :call s:Run(<bang>0, <q-args>)
+command -nargs=1 -bang Run :call s:Run(<bang>0, 1, <q-args>)
+command -nargs=1 -bang R   :call s:Run(<bang>0, 0, <q-args>)
 function WriteFile(...)
     let r=[]
     if filereadable(s:outfile)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.