Commits

ZyX_I  committed c2e4cb1

@aurum/cmdutils: It appears that getrrf performs really bad when file is not\
revision-controlled. Make it throw nrepo exception instead
@aurum/cache: Make getcrf catch this exception.

  • Participants
  • Parent commits e1ddbe6

Comments (0)

Files changed (2)

File plugin/aurum/cache.vim

                 \localtime()-cbvar._timerepo<cbvar._maxtimerepo
         return [cbvar, cbvar.repo, cbvar.__relfname]
     endif
-    let [hasbuf, repo, rev, file]=s:_r.cmdutils.getrrf({}, 0, 'get')
+    try
+        silent let [hasbuf, repo, rev, file]=s:_r.cmdutils.getrrf({'repo': ':'},
+                    \                                             0, 'get')
+    catch /^Frawor:[^:]\+:nrepo:/
+        return [cbvar, 0, 0]
+    endtry
     if repo isnot 0
         let cbvar.repo=repo
         let cbvar._timerepo=localtime()

File plugin/aurum/cmdutils.vim

             let file=expand('%')
         else
             let repo=s:_r.repo.get(':')
+            call s:F.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)
-            if type(repo)!=type({})
-                call s:_f.throw('nrepo')
-            endif
-            if file isnot 0
-                let file=repo.functions.reltorepo(repo, file)
-            endif
+            call s:F.checkrepo(repo)
+            let file=repo.functions.reltorepo(repo, file)
         endif
         "▶2 rev
         if a:act is# 'getfiles'