ZyX_I avatar ZyX_I committed 0fbb212 Merge

Merge

Comments (0)

Files changed (31)

 
   - Partially committing changes ([:AuRecord](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line398-0)).
 
-  - Viewing file state at particular revision ([aurum://file](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line664-0), [:AuFile](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line161-0)).
+  - Viewing file state at particular revision ([aurum://file](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line670-0), [:AuFile](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line161-0)).
 
   - Viewing uncommited changes in a vimdiff, as well as changes between 
     specific revisions ([:AuVimDiff](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line441-0)). It is also possible to open multiple 
   - Viewing working directory status ([:AuStatus](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line402-0)).
 
   - Commiting changes ([:AuCommit](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line102-0)), commit messages are remembered in case of 
-    rollback ([g:aurum_remembermsg](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line1030-0)).
+    rollback ([g:aurum_remembermsg](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line1036-0)).
 
   - Obtaining various URL’s out of remote repository URL (like URL of the HTML 
     version of the current file with URL fragment pointing to the current line 
 
   - Frontends for various other VCS commands.
 
-Most commands can be reached with a set of mappings (see [aurum-mappings](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line826-0)), 
+Most commands can be reached with a set of mappings (see [aurum-mappings](http://vimpluginloader.sourceforge.net/doc/aurum.txt.html#line832-0)), 
 all mappings are customizable.
 
 

autoload/aurum.vim

 scriptencoding utf-8
 execute frawor#Setup('0.1', {'@%aurum/repo': '5.0',
             \                '@aurum/cache': '2.0',
-            \            '@%aurum/cmdutils': '3.0',})
+            \            '@%aurum/cmdutils': '4.0',})
 "▶1 getcrf
 function s:F.id(val)
     return a:val

autoload/aurum/annotate.vim

 "▶1 
 scriptencoding utf-8
-execute frawor#Setup('1.0', {'@%aurum/cmdutils': '3.0',
+execute frawor#Setup('1.0', {'@%aurum/cmdutils': '4.0',
             \                 '@%aurum/bufvars': '0.0',
             \                    '@%aurum/edit': '1.0',
             \                          '@aurum': '1.0',

autoload/aurum/branch.vim

 scriptencoding utf-8
 execute frawor#Setup('0.0', {'@aurum': '1.0',
-            \      '@%aurum/cmdutils': '3.0',})
+            \      '@%aurum/cmdutils': '4.0',})
 let s:_messages={
             \ 'bexsts': 'Error while creating branch %s for repository %s: '.
             \           'branch already exists',

autoload/aurum/cmdutils.vim

 "▶1
 scriptencoding utf-8
-execute frawor#Setup('3.1', {'@/resources': '0.0',
+execute frawor#Setup('4.0', {'@/resources': '0.0',
             \                       '@/os': '0.0',
             \               '@%aurum/repo': '5.0',
             \               '@%aurum/edit': '1.0',
             \ 'nocurf': 'Failed to deduce which file was meant',
             \'nocfile': 'Unsure what should be commited',
         \}
+let s:r={}
 "▶1 globescape :: path → glob
-function s:F.globescape(path)
+function s:r.globescape(path)
     return escape(a:path, '\*?[]{}')
 endfunction
 "▶1 getdifffile :: bvar + cursor → file
-function s:F.getdifffile(bvar)
+function s:r.getdifffile(bvar)
     if len(a:bvar.files)==1
         return a:bvar.files[0]
     endif
                 \                         a:bvar.opts)
 endfunction
 "▶1 getfile :: [path] → path
-function s:F.getfile(files)
+function s:r.getfile(files)
     let file=0
     if !empty(a:files)
         if len(a:files)==1
     let r.repo=a:bvar.repo
     let  r.rev=empty(a:bvar.rev2) ? a:bvar.rev1 : a:bvar.rev2
     " XXX Maybe it should pull in all filenames instead when act='getfiles'?
-    let r.file=s:F.getdifffile(a:bvar)
+    let r.file=s:r.getdifffile(a:bvar)
     if r.file is 0 && a:failmsg isnot 0
         return 0
     endif
     if a:act is# 'getfiles'
         let r.files=a:bvar.files
     elseif a:act isnot# 'getsilent'
-        let r.file=s:F.getfile(a:bvar.files)
+        let r.file=s:r.getfile(a:bvar.files)
         if r.file is 0 && a:failmsg isnot 0
             return 0
         endif
 "▲2
 "▶1 getrrf :: opts, failmsg, act + buf → (hasbuf, repo, rev, file)
 let s:rrffailresult=[0, 0, 0, 0]
-function s:F.getrrf(opts, failmsg, act)
+function s:r.getrrf(opts, failmsg, act)
     let hasbuf=0
     let file=0
     "▶2 a:opts.file file → (repo?)
         if index(a:opts.files, ':')!=-1
             let newopts=copy(a:opts)
             unlet newopts.files
-            let [repo, rev, file]=s:F.getrrf(newopts, 'nocurf', 'getfile')[1:]
+            let [repo, rev, file]=s:r.getrrf(newopts, 'nocurf', 'getfile')[1:]
             if repo is 0
                 unlet repo
                 let repo=s:_r.repo.get(file)
             let file=expand('%')
         else
             let repo=s:_r.repo.get(':')
-            call s:F.checkrepo(repo)
+            call s:r.checkrepo(repo)
             let file=repo.functions.reltorepo(repo, expand('%'))
         endif
         let  rev=0
         "▶2 repo
         if !exists('repo')
             let repo=s:_r.repo.get(a:opts.repo)
-            call s:F.checkrepo(repo)
+            call s:r.checkrepo(repo)
             if file isnot 0
                 let file=repo.functions.reltorepo(repo, file)
             endif
                 \   (file))]
 endfunction
 "▶1 checkrepo
-function s:F.checkrepo(repo)
+function s:r.checkrepo(repo)
     if type(a:repo)!=type({})
         call s:_f.throw('nrepo')
     endif
     return 1
 endfunction
 "▶1 checkedgetrepo
-function s:F.checkedgetrepo(repopath)
+function s:r.checkedgetrepo(repopath)
     let repo=s:_r.repo.get(a:repopath)
-    call s:F.checkrepo(repo)
+    call s:r.checkrepo(repo)
     return repo
 endfunction
 "▶1 closebuf :: bvar → + buf
-function s:F.closebuf(bvar)
+function s:r.closebuf(bvar)
     let r=''
     if has_key(a:bvar, 'prevbuf') && bufexists(a:bvar.prevbuf)
         let r.=':buffer '.a:bvar.prevbuf."\n"
     return r.':if bufexists('.buf.')|bwipeout '.buf."|endif\n"
 endfunction
 "▶1 getexsttrckdfiles
-function s:F.getexsttrckdfiles(repo, ...)
+function s:r.getexsttrckdfiles(repo, ...)
     let cs=a:repo.functions.getwork(a:repo)
     let r=copy(a:repo.functions.getcsprop(a:repo, cs, 'allfiles'))
     let status=a:repo.functions.status(a:repo)
     return r
 endfunction
 "▶1 getaddedermvdfiles
-function s:F.getaddedermvdfiles(repo)
+function s:r.getaddedermvdfiles(repo)
     let status=a:repo.functions.status(a:repo)
     return status.unknown+filter(copy(status.removed),
                 \         'filereadable(s:_r.os.path.join(a:repo.path, v:val))')
 endfunction
 "▶1 filterfiles
-function s:F.filterfiles(repo, globs, files)
+function s:r.filterfiles(repo, globs, files)
     if empty(a:globs)
         return []
     endif
     endwhile
     return r
 endfunction
-"▶1 update
-" TODO Investigate whether this function should be moved to cmdutils, or to 
-" maputils which is probably to be created
-function s:F.update(repo, rev, count)
-    let rev=a:rev
-    if a:count>1
-        let rev=a:repo.functions.getnthparent(a:repo, rev, a:count-1).hex
-    endif
-    return a:repo.functions.update(a:repo, rev, 0)
-endfunction
 "▶1 Post cmdutils resource
-call s:_f.postresource('cmdutils', {'globescape': s:F.globescape,
-            \                           'getrrf': s:F.getrrf,
-            \                      'getdifffile': s:F.getdifffile,
-            \                        'checkrepo': s:F.checkrepo,
-            \                   'checkedgetrepo': s:F.checkedgetrepo,
-            \                         'closebuf': s:F.closebuf,
-            \                'getexsttrckdfiles': s:F.getexsttrckdfiles,
-            \               'getaddedermvdfiles': s:F.getaddedermvdfiles,
-            \                      'filterfiles': s:F.filterfiles,
-            \                           'update': s:F.update,
-            \})
+call s:_f.postresource('cmdutils', s:r)
 "▶1
 call frawor#Lockvar(s:, '_pluginloaded,_r')
 " vim: ft=vim ts=4 sts=4 et fmr=▶,▲

autoload/aurum/commit.vim

             \                  '@/options': '0.0',
             \                     '@aurum': '1.0',
             \             '@%aurum/status': '1.0',
-            \           '@%aurum/cmdutils': '3.0',
+            \           '@%aurum/cmdutils': '4.0',
             \            '@%aurum/bufvars': '0.0',
             \               '@%aurum/edit': '1.0',
             \               '@aurum/cache': '2.1',})

autoload/aurum/diff.vim

 "▶1 
 scriptencoding utf-8
-execute frawor#Setup('0.0', {'@%aurum/cmdutils': '3.1',
+execute frawor#Setup('0.0', {'@%aurum/cmdutils': '4.0',
+            \                '@%aurum/maputils': '0.0',
             \                 '@%aurum/bufvars': '0.0',
             \               '@%aurum/lineutils': '0.0',
             \                 '@%aurum/vimdiff': '1.0',
         let cmd.=s:_r.cmdutils.closebuf(bvar)
     elseif a:action is# 'update'
         let rev=(empty(bvar.rev1)?(bvar.rev2):(bvar.rev1))
-        call s:_r.cmdutils.update(bvar.repo, rev, v:count)
+        call s:_r.maputils.update(bvar.repo, rev, v:count)
         return ''
     elseif a:action is# 'previous' || a:action is# 'next'
         let c=((a:action is# 'previous')?(v:count1):(-v:count1))

autoload/aurum/file.vim

 "▶1 
 scriptencoding utf-8
-execute frawor#Setup('0.0', {'@%aurum/cmdutils': '3.1',
+execute frawor#Setup('0.0', {'@%aurum/cmdutils': '4.0',
+            \                '@%aurum/maputils': '0.0',
             \                 '@%aurum/bufvars': '0.0',
             \               '@%aurum/lineutils': '0.0',
             \                 '@%aurum/vimdiff': '1.0',
     if a:action is# 'exit'
         let cmd.=s:_r.cmdutils.closebuf(bvar)
     elseif a:action is# 'update'
-        call s:_r.cmdutils.update(bvar.repo, bvar.rev, v:count)
+        call s:_r.maputils.update(bvar.repo, bvar.rev, v:count)
         return ''
     elseif a:action is# 'previous' || a:action is# 'next'
         let c=((a:action is# 'previous')?(v:count1):(-v:count1))

autoload/aurum/grep.vim

 scriptencoding utf-8
 execute frawor#Setup('0.0', {'@aurum': '1.0',
-            \      '@%aurum/cmdutils': '3.0',
+            \      '@%aurum/cmdutils': '4.0',
             \          '@%aurum/edit': '1.0',
             \             '@/options': '0.0',})
 let s:_messages={

autoload/aurum/hyperlink.vim

 scriptencoding utf-8
 execute frawor#Setup('0.0', {'@aurum': '1.0',
-            \      '@%aurum/cmdutils': '3.0',
+            \      '@%aurum/cmdutils': '4.0',
             \             '@/options': '0.0',})
 let s:_messages={
             \'uknurl': 'Failed to process url %s of repository %s',

autoload/aurum/junk.vim

 scriptencoding utf-8
 execute frawor#Setup('0.0', {'@aurum': '1.0',
-            \      '@%aurum/cmdutils': '3.0',})
+            \      '@%aurum/cmdutils': '4.0',})
 let s:_messages={
             \'nofiles': 'No files were specified',
         \}

autoload/aurum/log.vim

 "▶1
 scriptencoding utf-8
-execute frawor#Setup('1.1', {'@%aurum/cmdutils': '3.0',
+execute frawor#Setup('1.1', {'@%aurum/cmdutils': '4.0',
             \           '@%aurum/log/templates': '0.0',
             \               '@%aurum/lineutils': '0.0',
             \                 '@%aurum/bufvars': '0.0',

autoload/aurum/maputils.vim

+"▶1
+scriptencoding utf-8
+execute frawor#Setup('0.0', {'@/resources': '0.0',
+            \                       '@/os': '0.0',})
+let s:_messages={
+            \'plinst': 'If you install Command-T, Ctrlp or FuzzyFinder '.
+            \          'you will be prompted with much less sucking interface',
+        \}
+let s:r={}
+"▶1 update
+function s:r.update(repo, rev, count)
+    let rev=a:rev
+    if a:count>1
+        let rev=a:repo.functions.getnthparent(a:repo, rev, a:count-1).hex
+    endif
+    return a:repo.functions.update(a:repo, rev, 0)
+endfunction
+"▶1 listplugs
+let s:F.listplugs={}
+let s:plug=0
+"▶2 commandt
+let s:F.listplugs.commandt={}
+function s:F.listplugs.commandt.init()
+    try
+        execute 'rubyfile' fnameescape(s:_r.os.path.join(s:_frawor.runtimepath,
+                    \'ruby', 'aurum-command-t-rubyinit.rb'))
+        return 1
+    catch
+        return 0
+    endtry
+endfunction
+function s:F.listplugs.commandt.call(files, cbargs, pvargs)
+    let [b:aurum_callback_fun; b:aurum_addargs]=a:cbargs
+    ruby $aurum_old_command_t = $command_t
+    ruby $command_t = $aurum_command_t
+    ruby $command_t.show_aurum_finder
+    autocmd BufUnload <buffer> ruby $command_t = $aurum_old_command_t
+endfunction
+"▶2 ctrlp
+function s:Accept(mode, str)
+    let d={}
+    let d.cbfun=b:aurum_callback_fun
+    let addargs=b:aurum_addargs
+    call ctrlp#exit()
+    return call(d.cbfun, [a:str]+addargs, {})
+endfunction
+let s:_functions+=['s:Accept']
+let s:ctrlp_ext_var={
+            \'init': '<SNR>'.s:_sid.'_Eval("s:ctrlp_files")',
+            \'accept': '<SNR>'.s:_sid.'_Accept',
+            \'lname': 'changeset files',
+            \'sname': 'changeset file',
+            \'type': 'path',
+        \}
+let s:ctrlp_id=0
+let s:ctrlp_files=[]
+let s:F.listplugs.ctrlp={}
+function s:F.listplugs.ctrlp.init()
+    try
+        runtime plugin/ctrlp.vim
+        call add(g:ctrlp_ext_vars, s:ctrlp_ext_var)
+        let s:ctrlp_id=g:ctrlp_builtins+len(g:ctrlp_ext_vars)
+        lockvar! s:ctlp_id
+        return 1
+    catch
+        return 0
+    endtry
+endfunction
+function s:F.listplugs.ctrlp.call(files, cbargs, pvargs)
+    let s:ctrlp_files=a:files
+    call ctrlp#init(s:ctrlp_id)
+    let [b:aurum_callback_fun; b:aurum_addargs]=a:cbargs
+endfunction
+"▶2 fuf
+let s:F.listplugs.fuf={}
+function s:F.listplugs.fuf.init()
+    try
+        runtime plugin/fuf.vim
+        call fuf#addMode('aurum')
+        return 1
+    catch
+        return 0
+    endtry
+endfunction
+function s:F.listplugs.fuf.call(files, cbargs, pvargs)
+    call fuf#aurum#setAuVars({'files': a:files, 'cbargs': a:cbargs,
+                \                               'pvargs': a:pvargs})
+    call fuf#launch('aurum', '', 0)
+endfunction
+"▶1 promptuser
+function s:r.promptuser(files, cbargs, pvargs)
+    if s:plug is 0
+        for plug in values(s:F.listplugs)
+            if plug.init()
+                unlet s:plug
+                let s:plug=plug
+                break
+            endif
+        endfor
+        if s:plug is 0
+            let s:plug=-1
+        endif
+        lockvar s:plug
+    endif
+    if s:plug is -1
+        call s:_f.warn('plinst')
+        let choice=inputlist(['Select file (0 to cancel):']+
+                    \        map(copy(a:files), '(v:key+1).". ".v:val'))
+        if choice
+            return call(a:cbargs[0], [a:files[choice-1]]+a:cbargs[1:], {})
+        endif
+    else
+        return s:plug.call(a:files, a:cbargs, a:pvargs)
+    endif
+endfunction
+"▶1 readfilewrapper :: file, repo, rev → [String]
+function s:r.readfilewrapper(file, repo, rev)
+    return a:repo.functions.readfile(a:repo, a:rev, a:file)
+endfunction
+"▶1 Post maputils resource
+call s:_f.postresource('maputils', s:r)
+"▶1
+call frawor#Lockvar(s:, 'plug,ctrlp_id,ctrlp_files')
+" vim: ft=vim ts=4 sts=4 et fmr=▶,▲

autoload/aurum/move.vim

 scriptencoding utf-8
 execute frawor#Setup('0.0', {'@aurum': '1.0',
-            \      '@%aurum/cmdutils': '3.0',
+            \      '@%aurum/cmdutils': '4.0',
             \          '@%aurum/edit': '1.0',
             \                  '@/os': '0.0',
             \               '@/table': '0.0',})

autoload/aurum/name.vim

 scriptencoding utf-8
 execute frawor#Setup('0.0', {'@aurum': '1.0',
-            \      '@%aurum/cmdutils': '3.0',})
+            \      '@%aurum/cmdutils': '4.0',})
 let s:_messages={
             \ 'nunsup': 'Naming is not supported for repository %s',
             \'ukntype': 'Unknown label type: %s. Supported types: %s',

autoload/aurum/other.vim

 scriptencoding utf-8
 execute frawor#Setup('0.0', {'@aurum': '1.0',
-            \      '@%aurum/cmdutils': '3.0',
+            \      '@%aurum/cmdutils': '4.0',
             \                  '@/os': '0.0',})
 function s:cmd.function(bang, action, rev, url, repopath)
     let repo=s:_r.cmdutils.checkedgetrepo(a:repopath)

autoload/aurum/record.vim

             \                   '@aurum': '1.0',
             \             '@aurum/cache': '2.1',
             \           '@%aurum/commit': '1.0',
-            \         '@%aurum/cmdutils': '3.0',
+            \         '@%aurum/cmdutils': '4.0',
             \        '@%aurum/lineutils': '0.0',
             \             '@%aurum/edit': '1.0',
             \          '@%aurum/bufvars': '0.0',})

autoload/aurum/status.vim

 "▶1 
 scriptencoding utf-8
-execute frawor#Setup('1.1', {'@%aurum/cmdutils': '3.0',
+execute frawor#Setup('1.1', {'@%aurum/cmdutils': '4.0',
             \                    '@%aurum/edit': '1.0',
             \                          '@aurum': '1.0',
             \                       '@/options': '0.0',

autoload/aurum/track.vim

 scriptencoding utf-8
 execute frawor#Setup('0.0', {'@aurum': '1.0',
-            \      '@%aurum/cmdutils': '3.0',})
+            \      '@%aurum/cmdutils': '4.0',})
 function s:cmd.function(...)
     let globs=filter(copy(a:000), 'v:val isnot# ":"')
     let hascur=!(a:0 && len(globs)==a:0)

autoload/aurum/update.vim

 scriptencoding utf-8
 execute frawor#Setup('0.0', {'@aurum': '1.0',
-            \      '@%aurum/cmdutils': '3.0',})
+            \      '@%aurum/cmdutils': '4.0',})
 function s:cmd.function(bang, rev, repopath)
     let repo=s:_r.cmdutils.checkedgetrepo(a:repopath)
     if a:rev is 0

autoload/aurum/vimdiff.vim

 "▶1 
 scriptencoding utf-8
-execute frawor#Setup('1.0', {'@%aurum/cmdutils': '3.0',
+execute frawor#Setup('1.0', {'@%aurum/cmdutils': '4.0',
             \                    '@%aurum/edit': '1.3',
             \                          '@aurum': '1.0',
             \                      '@/mappings': '0.0',

autoload/fuf/aurum.vim

+"▶1 
+execute frawor#Setup('0.0', {})
+let s:_messages={
+            \'invcall': 'Invalid call. You must call '.
+            \           'fuf#aurum#setAuVars() first',
+        \}
+"▶1 Global functions
+function fuf#aurum#createHandler(base)
+    if !exists('s:vars')
+        call s:_f.throw('invcall')
+    endif
+    let handler=copy(s:handler)
+    let handler._aurum=s:vars
+    unlet s:vars
+    return a:base.concretize(handler)
+endfunction
+let s:_functions+=['fuf#aurum#createHandler']
+function fuf#aurum#getSwitchOrder()
+    return -1
+endfunction
+let s:_functions+=['fuf#aurum#getSwitchOrder']
+function fuf#aurum#getEditableDataNames()
+    return []
+endfunction
+let s:_functions+=['fuf#aurum#getEditableDataNames']
+function fuf#aurum#renewCache()
+endfunction
+let s:_functions+=['fuf#aurum#renewCache']
+function fuf#aurum#requiresOnCommandPre()
+    return 0
+endfunction
+let s:_functions+=['fuf#aurum#requiresOnCommandPre']
+function fuf#aurum#onInit()
+endfunction
+let s:_functions+=['fuf#aurum#onInit']
+function fuf#aurum#setAuVars(vars)
+    let s:vars=a:vars
+endfunction
+let s:_functions+=['fuf#aurum#setAuVars']
+"▶1 s:handler
+let s:handler={}
+function s:handler.getModeName()
+    return 'changeset files'
+endfunction
+function s:handler.getPrompt()
+    return fuf#formatPrompt('>Changeset file[]>', self.partialMatching, '')
+endfunction
+function s:handler.getPreviewHeight()
+    return g:fuf_previewHeight
+endfunction
+function s:handler.isOpenable(enteredPattern)
+    return 1
+endfunction
+function s:handler.makePatternSet(patternBase)
+    return fuf#makePatternSet(a:patternBase, 's:interpretPrimaryPatternForPath',
+                \             self.partialMatching)
+endfunction
+function s:handler.makePreviewLines(word, count)
+    let lines=call(self._aurum.pvargs[0], [a:word]+self._aurum.pvargs[1:], {})
+    return fuf#makePreviewLinesAround(lines, [], a:count,
+                \                     self.getPreviewHeight())
+endfunction
+function s:handler.getCompleteItems(patternPrimary)
+    return self.items
+endfunction
+function s:handler.onOpen(word, mode)
+    return call(self._aurum.cbargs[0], [a:word]+self._aurum.cbargs[1:], {})
+endfunction
+function s:handler.onModeEnterPre()
+endfunction
+function s:handler.onModeEnterPost()
+    let self.items=map(copy(self._aurum.files),
+                \      'extend(fuf#makePathItem(v:val, "", 0), '.
+                \              '{"index": v:key+1})')
+    let self.items=fuf#mapToSetAbbrWithSnippedWordAsPath(self.items)
+endfunction
+function s:handler.onModeLeavePost(opened)
+endfunction
+"▶1 
+call frawor#Lockvar(s:, '')
+" vim: ft=vim ts=4 sts=4 et fmr=▶,▲
   customized using |g:frawormap_mgid| and |g:frawormap_mgid_mapname|.
 - All buffers that define mappings also define Exit mapping (with default 
   LHS=X)
+- OpenAny/AnnotateAny mappings require one of Command-T, Ctrlp or FuzzyFinder 
+  plugins installed. Otherwise they will show |inputlist()| that is unusable 
+  with large number of files.
+  Note: currently if you install two or all of them the behavior is undefined 
+        (depends on how keys “commandt”, “ctrlp” and “fuf” are arranged inside 
+        a |Dictionary|).
 
 aurum://annotate:{repo}:{rev}:{file}                        *aurum://annotate*
     Annotate file {file} from repository {repo} at revision {rev}.
          getexsttrckdfiles _r.cmdutils functions.
     3.0: Removed _r.cmdutils.nogetrepoarg.
     3.1: Added _r.cmdutils.update (moved from @aurum/repo).
+    4.0: Moved _r.cmdutils.update to @%aurum/maputils
 @%aurum:
     0.1: Added |aurum#branch()| function.
 @aurum/cache:

ftplugin/aurumannotate.vim

 execute frawor#Setup('0.0', {'@%aurum/bufvars': '0.0',
             \                '@%aurum/vimdiff': '1.0',
             \               '@%aurum/annotate': '1.0',
-            \               '@%aurum/cmdutils': '3.1',
+            \               '@%aurum/cmdutils': '4.0',
+            \               '@%aurum/maputils': '0.0',
             \                   '@%aurum/edit': '1.2',
             \                     '@/mappings': '0.0',
             \                           '@/os': '0.0',})
         endif
     "▶2 `update' action
     elseif a:action is# 'update'
-        call s:_r.cmdutils.update(bvar.repo, hex, v:count)
+        call s:_r.maputils.update(bvar.repo, hex, v:count)
     "▶2 `previous' and `next' actions
     elseif a:action is# 'previous' || a:action is# 'next'
         let c=((a:action is# 'previous')?(v:count1):(-v:count1))

ftplugin/aurumlog.vim

 endif
 setlocal noswapfile
 setlocal nomodeline
-execute frawor#Setup('0.1', {'@%aurum/cmdutils': '3.1',
+execute frawor#Setup('0.1', {'@%aurum/cmdutils': '4.0',
+            \                '@%aurum/maputils': '0.0',
             \                 '@%aurum/bufvars': '0.0',
             \                    '@%aurum/edit': '1.0',
             \                 '@%aurum/vimdiff': '1.0',
     endif
 endfunction
 "▶1 getfile
-function s:F.getfile(bvar, files, hex, more)
+function s:F.getfile(bvar, files, hex, more, cbargs, pvargs)
     if empty(a:files)
         return 0
     endif
     endif
     let file=0
     if len(files)==1
-        let file=files[0]
+        return call(a:cbargs[0], [files[0]]+a:cbargs[1:], {})
     else
-        let choice=inputlist(['Select file (0 to cancel):']+
-                    \        map(copy(files), '(v:key+1).". ".v:val'))
-        if choice
-            let file=files[choice-1]
-        endif
+        return s:_r.maputils.promptuser(files, a:cbargs, a:pvargs)
     endif
-    return file
 endfunction
 "▶1 gethexfile
-function s:F.gethexfile(...)
+function s:F.gethexfile(more, cbargs)
     let bvar=s:_r.bufvars[bufnr('%')]
     let [blockstart, blockend, hex]=bvar.getblock(bvar)
     let spname=s:F.findCurSpecial(bvar, hex, blockstart[0])
     let cs=bvar.repo.changesets[hex]
     let file=0
+    let cbargs=copy(a:cbargs)
+    let cbargs[0]=s:F.callbacks[cbargs[0]]
+    let pvargs=[s:_r.maputils.readfilewrapper, bvar.repo, hex]
+    call extend(cbargs, [bvar, hex], 1)
     if spname=~#'\v^file\d+$'
         " XXX If fileN special exists, then files property was definitely added, 
         " so no need to use getcsprop()
-        let file=cs.files[str2nr(spname[4:])]
+        return call(cbargs[0], [cs.files[str2nr(spname[4:])]]+cbargs[1:], {})
     else
         let file=s:F.getfile(bvar,
                     \        bvar.repo.functions.getcsprop(bvar.repo, cs,
-                    \                                      (((a:0 && !a:1))?
+                    \                                      ((a:more)?
                     \                                           ('allfiles'):
                     \                                           ('files'))),
-                    \        hex, (a:0 && !a:1))
-    endif
-    return [hex, file]
-endfunction
-"▶1 open
-function s:F.open(...)
-    let [hex, file]=call(s:F.gethexfile, a:000, {})
-    if file is 0
-        return 0
-    endif
-    let bvar=s:_r.bufvars[bufnr('%')]
-    call s:F.cwin(bvar)
-    call s:_r.mrun('silent edit', 'file', bvar.repo, hex, file)
-    return 1
-endfunction
-"▶1 annotate
-function s:F.annotate(...)
-    if call(s:F.open, a:000, {})
-        AuAnnotate
+                    \        hex, a:more, cbargs, pvargs)
     endif
 endfunction
-"▶1 diff
-function s:F.diff(...)
-    let [hex, file]=s:F.gethexfile()
-    if file is 0
-        return ''
-    endif
-    let bvar=s:_r.bufvars[bufnr('%')]
-    call s:F.cwin(bvar)
+"▶1 Callbacks
+let s:F.callbacks={}
+"▶2 open
+function s:F.callbacks.open(file, bvar, hex)
+    call s:F.cwin(a:bvar)
+    call s:_r.mrun('silent edit', 'file', a:bvar.repo, a:hex, a:file)
+endfunction
+"▶2 annotate
+function s:F.callbacks.annotate(file, bvar, hex)
+    call s:F.callbacks.open(a:file, a:bvar, a:hex)
+    AuAnnotate
+endfunction
+"▶2 diff
+function s:F.callbacks.diff(file, bvar, hex, ...)
+    call s:F.cwin(a:bvar)
     if a:0 && a:1
-        call s:_r.mrun('silent edit', 'diff', bvar.repo, hex, '', [file], {})
+        call s:_r.mrun('silent edit', 'diff', a:bvar.repo,a:hex,'',[a:file],{})
     else
-        call s:_r.mrun('silent edit', 'diff', bvar.repo, '', hex, [file], {})
+        call s:_r.mrun('silent edit', 'diff', a:bvar.repo,'',a:hex,[a:file],{})
     endif
 endfunction
+"▶2 filehistory
+function s:F.callbacks.filehistory(file, bvar, hex)
+    let crrcond=((has_key(a:bvar.opts, 'crrestrict'))?
+                \   (string(a:bvar.opts.crrestrict).' isnot# v:key &&'):
+                \   (''))
+    let opts=filter(copy(a:bvar.opts), crrcond.'index(s:ignkeys, v:key)==-1')
+    call extend(opts, {'files': [s:_r.cmdutils.globescape(a:file)],
+                \ 'crrestrict': 'files'})
+    call s:_r.run('silent edit', 'log', a:bvar.repo, opts)
+endfunction
 "▶1 vimdiff
-function s:F.vimdiff(...)
-    let [hex, file]=s:F.gethexfile()
-    if file is 0
-        return
-    endif
-    let bvar=s:_r.bufvars[bufnr('%')]
-    let cs=bvar.repo.changesets[hex]
-    call s:F.cwin(bvar)
+function s:F.callbacks.vimdiff(file, bvar, hex, ...)
+    let cs=a:bvar.repo.changesets[a:hex]
+    call s:F.cwin(a:bvar)
     if a:0 && a:1
         execute 'silent edit'
-                    \ fnameescape(s:_r.os.path.join(bvar.repo.path, file))
-        call s:_r.vimdiff.split(s:_r.fname('file', bvar.repo, hex, file), 0)
+                    \ fnameescape(s:_r.os.path.join(a:bvar.repo.path, a:file))
+        call s:_r.vimdiff.split(s:_r.fname('file',a:bvar.repo,a:hex,a:file), 0)
     elseif !empty(cs.parents)
-        call s:_r.run('silent edit', 'file', bvar.repo, hex, file)
-        call s:_r.vimdiff.split(s:_r.fname('file', bvar.repo, cs.parents[0],
-                    \                      file), 0)
+        call s:_r.run('silent edit', 'file', a:bvar.repo, a:hex, a:file)
+        call s:_r.vimdiff.split(s:_r.fname('file', a:bvar.repo, cs.parents[0],
+                    \                      a:file), 0)
     else
-        call s:_f.throw('nopars', hex)
+        call s:_f.throw('nopars', a:hex)
     endif
 endfunction
 "▶1 findfirstvisible :: n → hex
 function s:F.prev()
     return s:F.findfirstvisible(v:count1)
 endfunction
-"▶1 filehistory
-function s:F.filehistory()
-    let [hex, file]=s:F.gethexfile()
-    if file is 0
-        return ''
-    endif
-    let bvar=s:_r.bufvars[bufnr('%')]
-    let crrcond=((has_key(bvar.opts, 'crrestrict'))?
-                \   (string(bvar.opts.crrestrict).' isnot# v:key &&'):
-                \   (''))
-    let opts=filter(copy(bvar.opts), crrcond.'index(s:ignkeys, v:key)==-1')
-    call extend(opts, {'files': [s:_r.cmdutils.globescape(file)],
-                \ 'crrestrict': 'files'})
-    return ':silent edit '.fnameescape(s:_r.fname('log', bvar.repo, opts))."\n"
-endfunction
 "▶1 update
 function s:F.update()
     let bvar=s:_r.bufvars[bufnr('%')]
     let hex=bvar.getblock(bvar)[2]
-    call s:_r.cmdutils.update(bvar.repo, hex, v:count)
+    call s:_r.maputils.update(bvar.repo, hex, v:count)
     return "\<C-\>\<C-n>:silent edit\n"
 endfunction
 "▶1 AuLog mapping group
     return ':<C-u>call <SNR>'.s:_sid.'_Eval(''s:F.'.a:f.
                 \                   '('.string(string(a:000))[2:-3].')'')<CR>'
 endfunction
+function s:c(f, m, ...)
+    return ':<C-u>call call(<SNR>'.s:_sid.'_Eval("s:F.gethexfile"), '.
+                \'['.a:m.', ["'.a:f.'", '.string(a:000)[1:-2].']], {})<CR>'
+endfunction
 call s:_f.mapgroup.add('AuLog', {
             \      'Enter': {'lhs': "\n", 'rhs': s:m('cr'),             },
-            \       'File': {'lhs': 'gF', 'rhs': s:F.filehistory        },
+            \       'File': {'lhs': 'gF', 'rhs': s:c('filehistory', 0)  },
             \       'User': {'lhs': 'gu', 'rhs': s:m('cr', 'user')      },
             \       'Date': {'lhs': 'gM', 'rhs': s:m('cr', 'time')      },
             \     'Branch': {'lhs': 'gb', 'rhs': s:m('cr', 'branch')    },
             \    'RFVdiff': {'lhs': 'gC', 'rhs': [1], 'func': s:F.fvdiff},
             \      'Fdiff': {'lhs': 'gd', 'rhs': s:m('cr', 'curdiff')   },
             \     'RFdiff': {'lhs': 'gc', 'rhs': s:m('cr', 'revdiff')   },
-            \       'Diff': {'lhs':  'd', 'rhs': s:m('diff', 1)         },
-            \      'Rdiff': {'lhs':  'c', 'rhs': s:m('diff')            },
-            \      'Vdiff': {'lhs':  'D', 'rhs': s:m('vimdiff', 1)      },
-            \     'RVdiff': {'lhs':  'C', 'rhs': s:m('vimdiff')         },
+            \       'Diff': {'lhs':  'd', 'rhs': s:c('diff', 0, 1)      },
+            \      'Rdiff': {'lhs':  'c', 'rhs': s:c('diff', 0)         },
+            \      'Vdiff': {'lhs':  'D', 'rhs': s:c('vimdiff', 0, 1)   },
+            \     'RVdiff': {'lhs':  'C', 'rhs': s:c('vimdiff', 0)      },
             \       'Next': {'lhs':  'K', 'rhs': s:F.next               },
             \       'Prev': {'lhs':  'J', 'rhs': s:F.prev               },
-            \       'Open': {'lhs':  'o', 'rhs': s:m('open')            },
-            \    'OpenAny': {'lhs':  'O', 'rhs': s:m('open', 0)         },
-            \   'Annotate': {'lhs':  'a', 'rhs': s:m('annotate')        },
-            \'AnnotateAny': {'lhs':  'A', 'rhs': s:m('annotate', 0)     },
+            \       'Open': {'lhs':  'o', 'rhs': s:c('open', 0)         },
+            \    'OpenAny': {'lhs':  'O', 'rhs': s:c('open', 1)         },
+            \   'Annotate': {'lhs':  'a', 'rhs': s:c('annotate', 0)     },
+            \'AnnotateAny': {'lhs':  'A', 'rhs': s:c('annotate', 1)     },
             \     'Update': {'lhs':  'U', 'rhs': s:F.update             },
             \       'Exit': {'lhs':  'X', 'rhs': ':<C-u>bwipeout<CR>'   },
             \}, {'func': s:F.cr, 'silent': 1, 'mode': 'n'})
 delfunction s:m
+delfunction s:c
 "▶1
 call frawor#Lockvar(s:, '_r')
 " vim: ft=vim ts=4 sts=4 et fmr=▶,▲

ftplugin/aurumstatus.vim

 setlocal nomodeline
 execute frawor#Setup('0.0', {'@%aurum/bufvars': '0.0',
             \                '@%aurum/vimdiff': '1.0',
-            \               '@%aurum/cmdutils': '3.0',
+            \               '@%aurum/cmdutils': '4.0',
             \                   '@%aurum/edit': '1.2',
             \                 '@%aurum/commit': '1.0',
             \                     '@/mappings': '0.0',

ruby/aurum-command-t-rubyinit.rb

+require 'command-t/aurum_controller'
+require 'command-t/vim'
+$aurum_command_t = CommandT::AurumController.new

ruby/command-t/aurum_controller.rb

+require 'command-t/finder/aurum_finder'
+require 'command-t/controller'
+require 'command-t/vim'
+
+module CommandT
+    class AurumController < Controller
+        def show_aurum_finder
+            @path          = VIM::pwd
+            @active_finder = aurum_finder
+            show
+        end
+
+        def aurum_finder
+            CommandT::AurumFinder.new
+        end
+    end
+end

ruby/command-t/finder/aurum_finder.rb

+require 'command-t/ext'
+require 'command-t/scanner/aurum_scanner'
+require 'command-t/finder'
+
+module CommandT
+    class AurumFinder < Finder
+        def initialize
+            @scanner = AurumScanner.new
+            @matcher = Matcher.new @scanner, :always_show_dot_files => true
+        end
+
+        def open_selection command, selection, options
+            selection = selection.gsub(/["\\\n]/) {|s|
+                {'"'  => "\\\"",
+                 "\n" => "\\n",
+                 "\\" => "\\\\"}[s]}
+            ::VIM::evaluate "call(b:aurum_callback_fun, [\"#{selection}\"]+b:aurum_addargs, {})"
+        end
+    end
+end

ruby/command-t/scanner/aurum_scanner.rb

+require 'command-t/scanner'
+
+module CommandT
+    class AurumScanner < Scanner
+        def paths
+            @paths ||= (::VIM::evaluate "a:files").clone
+        end
+    end
+end
 | o---+  Changeset 7:c06107b7bcbe751d2dd40faf4179ee7d6aac44ac (branch C)
 | o | |  Changeset 10:c4110a066208167dae46b08f4e0d8d2b37e842f3 (branch C)
 o  Changeset 0:99ea42d70fbe32af955de907352999b1d94bef5f
+>>> Messages:
+Frawor:autoload/aurum/maputils:plinst:If you install Command-T, Ctrlp or FuzzyFinder you will be prompted with much less sucking interface
+Frawor:autoload/aurum/maputils:plinst:If you install Command-T, Ctrlp or FuzzyFinder you will be prompted with much less sucking interface
+Frawor:autoload/aurum/maputils:plinst:If you install Command-T, Ctrlp or FuzzyFinder you will be prompted with much less sucking interface
+Frawor:autoload/aurum/maputils:plinst:If you install Command-T, Ctrlp or FuzzyFinder you will be prompted with much less sucking interface
+Frawor:autoload/aurum/maputils:plinst:If you install Command-T, Ctrlp or FuzzyFinder you will be prompted with much less sucking interface
+Frawor:autoload/aurum/maputils:plinst:If you install Command-T, Ctrlp or FuzzyFinder you will be prompted with much less sucking interface
+Frawor:autoload/aurum/maputils:plinst:If you install Command-T, Ctrlp or FuzzyFinder you will be prompted with much less sucking interface
+<<< Messages^
 {{{1 U
 @  Changeset 4:7e16e7cbaf9ec5b0e65832bc6f057ba825c38cac
 @  Changeset 3:a16a47a8d7aafc115651bfee6f1202093765365d
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.