ZyX_I  committed 02fe47b

@aurum: Fixed :AuMove with two arguments where second one is not a directory
@aurum/commit: Fixed :AuCommit with “all” instead of the globs
@aurum/drivers/git: Added missing error message
tests: Added git :AuUpdate, :AuMove (move and copy) tests, more git :AuCommit tests

  • Participants
  • Parent commits 2dd3d04
  • Branches default

Comments (0)

Files changed (5)

File plugin/aurum.vim

         if fst is# ':'
             let fst=s:_r.cmdutils.getrrf(rrfopts, 'nocurf', -1)[3]
-        let moves[repo.functions.reltorepo(repo, fst)]=
-                    \repo.functions.reltorepo(repo, a:2)
+        let moves = {repo.functions.reltorepo(repo, fst):
+                    \repo.functions.reltorepo(repo, a:2)}
         let globs=filter(copy(a:000), 'v:val isnot# ":"')
         let hascur=(len(globs)!=a:0)

File plugin/aurum/commit.vim

 "▶1 commfunc
 function s:commfunc.function(opts, ...)
     let rrfopts=copy(a:opts)
-    if a:0
+    if a:0 && index(a:000, 'all')==-1
         let rrfopts.files=a:000
     let [repo, rev, files]=s:_r.cmdutils.getrrf(rrfopts,

File plugin/aurum/drivers/git.vim

             \           'from the repository %s: %s',
             \  'grepf': 'Failed to search through the repository %s: %s',
             \   'tagf': 'Failed to get list of tags from the repository %s: %s',
+            \   'addf': 'Failed to add file %s to the repository %s: %s',
             \ 'cbnimp': 'Git driver is not able to close branch',
             \   'nloc': 'Git driver does not suppport local tags or branches',
             \   'chbf': 'Failed to create branch %s in the repository %s: %s',
-:let $LANG="C"
 :let g:curtest='gittest'
 :W{{{1 Annotate
 :Run! AuAnnotate file ./gittestrepo/* | wincmd w
 :edit ./gittestrepo/newfile.vim
 iW In file newfile.vim:write
 :Run! AuCommit message Added\ newfile.vim date 1990-10-11 user ZyX\ <> type unknown ./gittestrepo/newfile.vim
-:WT normal! ggdd
+:WT! normal! ggdd
 :W{{{1 Commit 2
 oW File newfile.vim, second line:write
 :Run! AuCommit date 1990-10-12 user ZyX\ <>
 Added second line to newfile.vim
 // It was not required really:write
+:WT! normal! ggdd
+:W{{{1 Update
+:AuUpdate HEAD^ ./gittestrepo/
 :WT normal! ggdd
+:W{{{1 Update: force
+:AuUpdate! HEAD^^ ./gittestrepo/
+:W{{{1 Update: branch
+:AuUpdate next ./gittestrepo/
+:WT normal! ggdd
+:W{{{1 Move
+:AuMove ./gittestrepo/--force ./gittestrepo/-f
+:AuCommit message Moved\ --force\ to\ -f repo ./gittestrepo/ all
+:AuLog ./gittestrepo/ showrenames showcopies limit 1
+:set modifiable noreadonly
+:1delete _
+:/Commited/delete _
+:Run! echo
+:W{{{1 Move: copy
+:AuMove copy ./gittestrepo/-f ./gittestrepo/--force
+:AuCommit message Copied\ -f\ to\ --force repo ./gittestrepo/ all
+:AuLog ./gittestrepo/ showrenames showcopies limit 1
+:set modifiable noreadonly
+:1delete _
+:/Commited/delete _
+:Run! echo

File test/git.ok

Binary file modified.